Related to https://github.com/grafana/oncall-private/issues/2615 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --------- Co-authored-by: Dominik <dominik.broj@grafana.com>
113 lines
3.7 KiB
YAML
113 lines
3.7 KiB
YAML
repos:
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 5.12.0
|
|
hooks:
|
|
- id: isort
|
|
files: ^engine
|
|
args: [--settings-file=engine/pyproject.toml, --filter-files]
|
|
- id: isort
|
|
name: isort - pd-migrator
|
|
files: ^tools/pagerduty-migrator
|
|
args:
|
|
[--settings-file=tools/pagerduty-migrator/.isort.cfg, --filter-files]
|
|
- id: isort
|
|
name: isort - dev/scripts
|
|
files: ^dev/scripts
|
|
args: [--settings-file=dev/scripts/.isort.cfg, --filter-files]
|
|
|
|
- repo: https://github.com/psf/black
|
|
rev: 23.7.0
|
|
hooks:
|
|
- id: black
|
|
files: ^engine
|
|
args: [--config=engine/pyproject.toml]
|
|
- id: black
|
|
name: black - pd-migrator
|
|
files: ^tools/pagerduty-migrator
|
|
- id: black
|
|
name: black - dev/scripts
|
|
files: ^dev/scripts
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: 7.0.0
|
|
hooks:
|
|
- id: flake8
|
|
files: ^engine
|
|
args: [--config=engine/tox.ini]
|
|
additional_dependencies:
|
|
- flake8-bugbear
|
|
- flake8-tidy-imports
|
|
- id: flake8
|
|
name: flake8 - pd-migrator
|
|
files: ^tools/pagerduty-migrator
|
|
# Make sure config is compatible with black
|
|
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
|
args: ["--max-line-length=88", "--extend-ignore=E203,E501"]
|
|
- id: flake8
|
|
name: flake8 - dev/scripts
|
|
files: ^dev/scripts
|
|
# Make sure config is compatible with black
|
|
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
|
args: ["--max-line-length=88", "--extend-ignore=E203,E501"]
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
rev: v8.25.0
|
|
hooks:
|
|
- id: eslint
|
|
entry: bash -c "cd grafana-plugin && eslint --max-warnings=0 --fix ${@/grafana-plugin\//}" --
|
|
types: [file]
|
|
files: ^grafana-plugin/src/(?:(?!autogenerated).)*\.(js|jsx|ts|tsx)$
|
|
additional_dependencies:
|
|
- eslint@^8.25.0
|
|
- eslint-plugin-import@^2.25.4
|
|
- eslint-plugin-rulesdir@^0.2.1
|
|
- eslint-plugin-unused-imports@^3.1.0
|
|
- "@grafana/eslint-config@^5.0.0"
|
|
- eslint-plugin-promise@^6.1.1
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: "v2.7.1"
|
|
hooks:
|
|
- id: prettier
|
|
name: prettier
|
|
types_or: [css, javascript, jsx, ts, tsx]
|
|
files: ^grafana-plugin/src
|
|
additional_dependencies:
|
|
- prettier@2.8.2
|
|
- id: prettier
|
|
name: prettier - json
|
|
types_or: [json]
|
|
additional_dependencies:
|
|
- prettier@2.8.2
|
|
|
|
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
|
|
rev: v13.13.1
|
|
hooks:
|
|
- id: stylelint
|
|
entry: bash -c "cd grafana-plugin && stylelint --fix ${@/grafana-plugin\//}" --
|
|
types: [file]
|
|
files: ^grafana-plugin/src/.*\.css$
|
|
additional_dependencies:
|
|
- stylelint@^13.13.1
|
|
- stylelint-prettier@^2.0.0
|
|
- stylelint-config-standard@^22.0.0
|
|
- stylelint-config-prettier@^9.0.3
|
|
|
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
rev: v0.32.2
|
|
hooks:
|
|
- id: markdownlint
|
|
name: markdownlint
|
|
entry: >
|
|
markdownlint --fix --ignore grafana-plugin/node_modules --ignore grafana-plugin/dist --ignore docs **/*.md
|
|
- id: markdownlint
|
|
name: markdownlint - docs/sources
|
|
entry: markdownlint --fix --ignore README.md -c ./docs/.markdownlint.json ./docs/sources/**/*.md
|
|
|
|
- repo: https://github.com/adrienverge/yamllint
|
|
rev: v1.32.0
|
|
hooks:
|
|
- id: yamllint
|
|
name: yamllint
|
|
entry: yamllint -c .yamllint.yml
|
|
types: [yaml]
|