mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-05 11:26:43 +08:00
update pre-commit
This commit is contained in:
parent
584041aba6
commit
ee01773e64
@ -20,12 +20,27 @@ repos:
|
||||
hooks:
|
||||
- id: prettier
|
||||
types_or: [markdown, ts, tsx]
|
||||
exclude: 'admin-frontend/'
|
||||
|
||||
- repo: local
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: v8.20.0
|
||||
hooks:
|
||||
- id: admin-eslint
|
||||
name: eslint
|
||||
entry: bash -c 'yarn --cwd admin-frontend lint || exit 0'
|
||||
language: system
|
||||
pass_filenames: false
|
||||
- id: eslint
|
||||
additional_dependencies:
|
||||
- "eslint@8.2.0"
|
||||
- "@typescript-eslint/eslint-plugin"
|
||||
- "@typescript-eslint/parser"
|
||||
- "eslint-config-airbnb"
|
||||
- "eslint-config-airbnb-typescript"
|
||||
- "eslint-import-resolver-typescript"
|
||||
- "eslint-plugin-import"
|
||||
- "eslint-plugin-jsx-a11y"
|
||||
- "eslint-plugin-react"
|
||||
- "eslint-plugin-react-hooks"
|
||||
- "eslint-plugin-react-redux"
|
||||
types_or: [ts, tsx]
|
||||
types: []
|
||||
files: ^admin-frontend/
|
||||
args: [--fix, -c, './admin-frontend/.eslintrc.json']
|
||||
|
||||
exclude: 'CHANGELOG.md'
|
||||
|
@ -13,7 +13,6 @@
|
||||
"@types/node": "^17.0.25",
|
||||
"@types/react": "^18.0.6",
|
||||
"@types/react-dom": "^18.0.2",
|
||||
"eslint": "^7.32.0 || ^8.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-redux": "^8.0.1",
|
||||
@ -48,6 +47,7 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0 || ^8.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
||||
"@typescript-eslint/parser": "^5.31.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
|
@ -19,13 +19,13 @@ function App() {
|
||||
|
||||
return (
|
||||
globalConfLoaded
|
||||
&& (
|
||||
<Routes>
|
||||
<Route path="/auth/:code" element={<Auth />} />
|
||||
<Route path="/unauthed" element={<Unauthed />} />
|
||||
<Route path="/home" element={<Home />} />
|
||||
</Routes>
|
||||
)
|
||||
? (
|
||||
<Routes>
|
||||
<Route path="/auth/:code" element={<Auth />} />
|
||||
<Route path="/unauthed" element={<Unauthed />} />
|
||||
<Route path="/home" element={<Home />} />
|
||||
</Routes>
|
||||
) : <div>loading</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -86,14 +86,16 @@ async def get_subs_info(jwt_obj: dict):
|
||||
group_id = group["id"]
|
||||
raw_subs = await config.list_subscribe(group_id, "group")
|
||||
subs = list(
|
||||
map(lambda sub: {
|
||||
map(
|
||||
lambda sub: {
|
||||
"platformName": sub.target.platform_name,
|
||||
"targetName": sub.target.name,
|
||||
"cats": sub.categories,
|
||||
"tags": sub.tags
|
||||
},
|
||||
raw_subs)
|
||||
)
|
||||
"tags": sub.tags,
|
||||
},
|
||||
raw_subs,
|
||||
)
|
||||
)
|
||||
res[group_id] = {"name": group["name"], "subscribes": subs}
|
||||
return res
|
||||
|
||||
@ -111,8 +113,14 @@ async def add_group_sub(
|
||||
tags: list[str],
|
||||
):
|
||||
await config.add_subscribe(
|
||||
int(group_number), "group", T_Target(target), target_name, platform_name, cats, tags
|
||||
)
|
||||
int(group_number),
|
||||
"group",
|
||||
T_Target(target),
|
||||
target_name,
|
||||
platform_name,
|
||||
cats,
|
||||
tags,
|
||||
)
|
||||
return {"status": 200, "msg": ""}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user