I am using pre-commit for several hooks within a multi language project. All my existing hooks are working. I am now trying to get a eslint
hook setup that will include Vue 2
files.
Here's my .pre-commit-config.yaml
for the eslint
section:
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v7.18.0'
hooks:
- id: eslint
types_or: [javascript, jsx, ts, tsx, vue]
additional_dependencies:
- eslint-plugin-vue@v7.5.0
This works for javascript files but completely ignores the Vue 2 files. I have setup the above config based on this: Eslint for vue and pre-commit eslint.
I have tried adding the following .eslintrc
file in the root of the project which hasn't helped:
module.exports = {
extends: [
'plugin:vue/recommended'
]
}
The Vue files are completely ignored.