nonebot-bison/.pre-commit-config.yaml
Azide 32e3bcc022
🐛 修正项目的代码警告 (#614)
* 🐛 调整ruff的pytest警告

* 🐛 调整导入关系警告

* 🐛 删除奇怪无用的赋值和取值逻辑

*  不同测试部分所用变量应加以区分

* 🐛 subs_io model添加默认值

* 🐛 修完所有的 ruff PT001 警告

* 🔧 按ruff建议修改ruff配置

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-17 18:24:20 +08:00

71 lines
1.9 KiB
YAML

default_install_hook_types: [pre-commit, prepare-commit-msg]
ci:
autofix_commit_msg: ":lipstick: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: main
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
exclude: "admin-frontend/"
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.8.0
hooks:
- id: eslint
additional_dependencies:
- "eslint@8.57.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",
--rule,
"import/no-unresolved: off",
]
- repo: https://github.com/nonebot/nonemoji
rev: v0.1.4
hooks:
- id: nonemoji
stages: [prepare-commit-msg]
exclude: "CHANGELOG.md"