Closed vilaboim closed 5 years ago
I've created a simple Home.vue
file and ran the eslint on it and got an error. Both the file and the error can be found below:
<template>
<span>{{ vaca }}</span>
</template>
<script>
export default {
data () {
return {
vaca: 'vaca'
}
}
}
</script>
/Users/pablohpsilva/Code/gandalf-lint-vue/test/Home.vue
1:1 error Definition for rule 'vue/no-spaces-around-equal-signs-in-attribute' was not found vue/no-spaces-around-equal-signs-in-attribute
✖ 1 problem (1 error, 0 warnings)
@pablohpsilva did you install eslint-plugin-vue? Can you show your package.json and .eslintrc?
Hello everybody!
I tried it in a @vue/cli project and it works, but needs some workaround.
Only .vue
files can be linted. Many .js
files shall not pass.
It tries to lint all .js
files into the project (including .eslintrc.js
, .postcssrc.js
, babel.config.js
, jest.config.js
, vue.config.js
) when using default eslint settings at the project, just switching extends
to @softboxlab/eslint-config-gandalf-lint-vue
and running default lint
script from package.json
.
It is necessary to create a new script command to lint only .vue
files, like:
"glint": "npx eslint src/**/*.vue"
@alexbruno and @pablohpsilva, I'm working on it. 😉
@alexbruno I guess we cannot have a .eslintignore on our side, but I improved the README to help the users.
I added eslint-plugin-vue@next as a peerDependency, fixing the problem reported at #6 😅