mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
chore: switch to pre-commit
This commit is contained in:
@@ -1,9 +1,27 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
# Ruff version.
|
# Ruff version.
|
||||||
rev: v0.11.7
|
rev: v0.11.7
|
||||||
hooks:
|
hooks:
|
||||||
# Run the linter of backend.
|
# Run the linter of backend.
|
||||||
- id: ruff
|
- id: ruff
|
||||||
# Run the formatter of backend.
|
args: [--fix]
|
||||||
- id: ruff-format
|
# Run the formatter of backend.
|
||||||
|
- id: ruff-format
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
|
rev: v3.1.0
|
||||||
|
hooks:
|
||||||
|
- id: prettier
|
||||||
|
types_or: [javascript, jsx, ts, tsx, json, css, scss, yaml]
|
||||||
|
additional_dependencies:
|
||||||
|
- prettier@3.1.0
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: lint-staged
|
||||||
|
name: lint-staged
|
||||||
|
entry: cd web && pnpm lint-staged
|
||||||
|
language: system
|
||||||
|
types: [javascript, jsx, ts, tsx]
|
||||||
|
pass_filenames: false
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ stage_order = [
|
|||||||
|
|
||||||
|
|
||||||
async def make_app(loop: asyncio.AbstractEventLoop) -> app.Application:
|
async def make_app(loop: asyncio.AbstractEventLoop) -> app.Application:
|
||||||
|
|
||||||
# 确定是否为调试模式
|
# 确定是否为调试模式
|
||||||
if 'DEBUG' in os.environ and os.environ['DEBUG'] in ['true', '1']:
|
if 'DEBUG' in os.environ and os.environ['DEBUG'] in ['true', '1']:
|
||||||
constants.debug_mode = True
|
constants.debug_mode = True
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
cd web
|
|
||||||
pnpm lint-staged
|
|
||||||
@@ -7,9 +7,14 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"prepare": "cd .. && husky web/.husky",
|
|
||||||
"lint-staged": "lint-staged"
|
"lint-staged": "lint-staged"
|
||||||
},
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js,jsx,ts,tsx}": [
|
||||||
|
"next lint --fix",
|
||||||
|
"prettier --write"
|
||||||
|
]
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^5.0.1",
|
"@hookform/resolvers": "^5.0.1",
|
||||||
"@radix-ui/react-checkbox": "^1.3.1",
|
"@radix-ui/react-checkbox": "^1.3.1",
|
||||||
@@ -49,7 +54,6 @@
|
|||||||
"eslint-config-next": "15.2.4",
|
"eslint-config-next": "15.2.4",
|
||||||
"eslint-config-prettier": "^10.1.2",
|
"eslint-config-prettier": "^10.1.2",
|
||||||
"eslint-plugin-prettier": "^5.2.6",
|
"eslint-plugin-prettier": "^5.2.6",
|
||||||
"husky": "^9.1.7",
|
|
||||||
"lint-staged": "^15.5.1",
|
"lint-staged": "^15.5.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"tw-animate-css": "^1.2.9",
|
"tw-animate-css": "^1.2.9",
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export default function PluginConfigPage() {
|
|||||||
const taskId = resp.task_id;
|
const taskId = resp.task_id;
|
||||||
|
|
||||||
let alreadySuccess = false;
|
let alreadySuccess = false;
|
||||||
|
console.log('taskId:', taskId);
|
||||||
|
|
||||||
// 每秒拉取一次任务状态
|
// 每秒拉取一次任务状态
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user