2022-06-03 08:09:47 -06:00
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pycqa/isort
|
2023-01-30 11:43:15 +01:00
|
|
|
rev: 5.12.0
|
2022-06-03 08:09:47 -06:00
|
|
|
hooks:
|
|
|
|
|
- id: isort
|
|
|
|
|
files: ^engine
|
|
|
|
|
args: [--settings-file=engine/pyproject.toml, --filter-files]
|
2022-12-30 16:03:39 +00:00
|
|
|
- id: isort
|
|
|
|
|
name: isort - pd-migrator
|
|
|
|
|
files: ^tools/pagerduty-migrator
|
2023-01-09 17:50:55 +02:00
|
|
|
args:
|
|
|
|
|
[--settings-file=tools/pagerduty-migrator/.isort.cfg, --filter-files]
|
2023-01-20 09:19:41 +01:00
|
|
|
- id: isort
|
|
|
|
|
name: isort - dev/scripts
|
|
|
|
|
files: ^dev/scripts
|
|
|
|
|
args: [--settings-file=dev/scripts/.isort.cfg, --filter-files]
|
2022-06-03 08:09:47 -06:00
|
|
|
|
|
|
|
|
- repo: https://github.com/psf/black
|
2023-11-30 08:47:41 -05:00
|
|
|
rev: 23.11.0
|
2022-06-03 08:09:47 -06:00
|
|
|
hooks:
|
|
|
|
|
- id: black
|
|
|
|
|
files: ^engine
|
|
|
|
|
args: [--config=engine/pyproject.toml]
|
2022-12-30 16:03:39 +00:00
|
|
|
- id: black
|
|
|
|
|
name: black - pd-migrator
|
|
|
|
|
files: ^tools/pagerduty-migrator
|
2023-01-20 09:19:41 +01:00
|
|
|
- id: black
|
|
|
|
|
name: black - dev/scripts
|
|
|
|
|
files: ^dev/scripts
|
2022-06-03 08:09:47 -06:00
|
|
|
|
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
2023-11-30 08:47:41 -05:00
|
|
|
rev: 6.1.0
|
2022-06-03 08:09:47 -06:00
|
|
|
hooks:
|
|
|
|
|
- id: flake8
|
|
|
|
|
files: ^engine
|
|
|
|
|
args: [--config=engine/tox.ini]
|
|
|
|
|
additional_dependencies:
|
2023-11-29 12:04:48 -03:00
|
|
|
- flake8-bugbear
|
2022-06-03 08:09:47 -06:00
|
|
|
- flake8-tidy-imports
|
2022-12-30 16:03:39 +00:00
|
|
|
- id: flake8
|
|
|
|
|
name: flake8 - pd-migrator
|
|
|
|
|
files: ^tools/pagerduty-migrator
|
|
|
|
|
# Make sure config is compatible with black
|
2023-07-26 14:45:44 +01:00
|
|
|
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
2023-08-03 08:35:08 +02:00
|
|
|
args: ["--max-line-length=88", "--extend-ignore=E203,E501"]
|
2023-01-20 09:19:41 +01:00
|
|
|
- id: flake8
|
|
|
|
|
name: flake8 - dev/scripts
|
|
|
|
|
files: ^dev/scripts
|
|
|
|
|
# Make sure config is compatible with black
|
2023-07-26 14:45:44 +01:00
|
|
|
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
2023-08-03 08:35:08 +02:00
|
|
|
args: ["--max-line-length=88", "--extend-ignore=E203,E501"]
|
2022-06-03 08:09:47 -06:00
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
2022-10-24 14:27:03 +02:00
|
|
|
rev: v8.25.0
|
2022-06-03 08:09:47 -06:00
|
|
|
hooks:
|
|
|
|
|
- id: eslint
|
2023-11-29 06:16:13 +01:00
|
|
|
entry: bash -c "cd grafana-plugin && eslint --max-warnings=0 --fix ${@/grafana-plugin\//}" --
|
2022-06-03 08:09:47 -06:00
|
|
|
types: [file]
|
2023-11-29 06:16:13 +01:00
|
|
|
files: ^grafana-plugin/src/(?:(?!autogenerated).)*\.(js|jsx|ts|tsx)$
|
2022-06-03 08:09:47 -06:00
|
|
|
additional_dependencies:
|
2022-10-24 14:27:03 +02:00
|
|
|
- eslint@^8.25.0
|
2022-06-03 08:09:47 -06:00
|
|
|
- eslint-plugin-import@^2.25.4
|
|
|
|
|
- eslint-plugin-rulesdir@^0.2.1
|
2022-10-24 14:27:03 +02:00
|
|
|
- "@grafana/eslint-config@^5.0.0"
|
|
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
|
|
|
rev: "v2.7.1"
|
|
|
|
|
hooks:
|
|
|
|
|
- id: prettier
|
2022-12-01 14:26:54 +01:00
|
|
|
name: prettier
|
|
|
|
|
types_or: [css, javascript, jsx, ts, tsx]
|
2022-10-24 14:27:03 +02:00
|
|
|
files: ^grafana-plugin/src
|
|
|
|
|
additional_dependencies:
|
2023-01-09 17:50:55 +02:00
|
|
|
- prettier@2.8.2
|
2022-12-01 14:26:54 +01:00
|
|
|
- id: prettier
|
|
|
|
|
name: prettier - json
|
|
|
|
|
types_or: [json]
|
|
|
|
|
additional_dependencies:
|
2023-01-09 17:50:55 +02:00
|
|
|
- prettier@2.8.2
|
2022-06-03 08:09:47 -06:00
|
|
|
|
|
|
|
|
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
|
|
|
|
|
rev: v13.13.1
|
|
|
|
|
hooks:
|
|
|
|
|
- id: stylelint
|
2023-11-29 06:16:13 +01:00
|
|
|
entry: bash -c "cd grafana-plugin && stylelint --fix ${@/grafana-plugin\//}" --
|
2022-06-03 08:09:47 -06:00
|
|
|
types: [file]
|
|
|
|
|
files: ^grafana-plugin/src/.*\.css$
|
|
|
|
|
additional_dependencies:
|
|
|
|
|
- stylelint@^13.13.1
|
2022-10-24 14:27:03 +02:00
|
|
|
- stylelint-prettier@^2.0.0
|
2022-06-03 08:09:47 -06:00
|
|
|
- stylelint-config-standard@^22.0.0
|
2022-10-24 14:27:03 +02:00
|
|
|
- stylelint-config-prettier@^9.0.3
|
2022-12-01 14:26:54 +01:00
|
|
|
|
|
|
|
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
|
|
|
rev: v0.32.2
|
|
|
|
|
hooks:
|
|
|
|
|
- id: markdownlint
|
|
|
|
|
name: markdownlint
|
2023-08-03 08:35:08 +02:00
|
|
|
entry: >
|
|
|
|
|
markdownlint --fix --ignore grafana-plugin/node_modules --ignore grafana-plugin/dist --ignore docs **/*.md
|
2022-12-01 14:26:54 +01:00
|
|
|
- id: markdownlint
|
2023-07-13 15:38:35 +01:00
|
|
|
name: markdownlint - docs/sources
|
|
|
|
|
entry: markdownlint --fix --ignore README.md -c ./docs/.markdownlint.json ./docs/sources/**/*.md
|
2023-08-03 08:35:08 +02:00
|
|
|
|
|
|
|
|
- repo: https://github.com/adrienverge/yamllint
|
|
|
|
|
rev: v1.32.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: yamllint
|
|
|
|
|
name: yamllint
|
|
|
|
|
entry: yamllint -c .yamllint.yml
|
|
|
|
|
types: [yaml]
|