analytics/.pre-commit-config.yaml
Mackenzie 9c2fd9aca5
1. Remove the "airbnb" eslint plugin since it conflicts with prettier (#1374)
and so was just annoying
2. Get rid of all existing ESLint errors.
2a. Turned off `react/display-name` because I couldn't figure out how to
make that wrapped component have a display name. If anyone can figure it
out, that'd be great, because that makes things nicer when using the
React debugger.
2b. The part where it says `plausible()` is undefined in `app.js` is
bothering me. I disabled the check because I can't figure out where that
actually comes from to put in the proper import.
2c. Told ESLint we're using Babel.
3. Added `npm run format` and `npm run lint` commands.
2021-10-11 14:48:19 +02:00

33 lines
994 B
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.2.1"
hooks:
- id: prettier
files: "assets/js|assets/css"
args: [--config, assets/.prettierrc.json]
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 'f792d6b'
hooks:
- id: stylelint
additional_dependencies:
- stylelint@13.2.1
- stylelint-config-standard@20.0.0
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v7.15.0'
hooks:
- id: eslint
files: "assets/js"
additional_dependencies:
- eslint@7.2.0
- eslint-plugin-import@2.22.1
- eslint-plugin-jsx-a11y@6.4.1
- eslint-plugin-react@7.21.5
- eslint-plugin-react-hooks@4.2.0
- repo: https://gitlab.com/jvenom/elixir-pre-commit-hooks
rev: v1.0.0
hooks:
- id: mix-format