bedrock/.pre-commit-config.yaml

98 строки
2.7 KiB
YAML

# Global excludes, override per repo below if different excludes required.
exclude: >
(?x)^(
docs
| node_modules
| assets
| static
| bedrock/externalfiles/files_cache
| git-repos
)
repos:
# Note: hooks that add content must run before ones which check formatting, lint, etc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-shebang-scripts-are-executable
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: insert-license
language: python
files: \.py$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- id: insert-license
exclude: media\/.*\/libs\/.*$
files: \.js$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- /*|*|*/
- id: insert-license
files: \.scss$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- //
- id: insert-license
files: \.sh$
args:
- --license-filepath
- license_header/mpl2_header.txt
- id: insert-license
files: \.html$ # jinja2
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- '{#||#}'
- id: insert-license
files: \.ftl$ # fluent templates
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/mozilla-l10n/moz-fluent-linter
rev: v0.4.5
hooks:
- id: fluent_linter
files: \.ftl$
args: [--config, .github/l10n/linter_config.yml, l10n/en/, l10n/en-US/, l10n-pocket/en/]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 0.0.2
hooks:
- id: stylelint
additional_dependencies:
- "stylelint@16.0.2"
- "stylelint-config-standard-scss@12.0.0"
- "postcss-scss@4.0.9"
- "postcss@8.4.32"
- repo: https://github.com/eslint/eslint
rev: v8.56.0
hooks:
- id: eslint
additional_dependencies:
- "eslint-config-prettier@9.1.0"
# Additional excludes in /.eslintignore file