Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with eslint-plugin-vue new rules #8

Merged
merged 5 commits into from
Nov 23, 2018

Conversation

vilaboim
Copy link
Contributor

I added eslint-plugin-vue@next as a peerDependency, fixing the problem reported at #6 😅

@vilaboim vilaboim added the bug Something isn't working label Oct 30, 2018
@vilaboim vilaboim self-assigned this Oct 30, 2018
@pablohpsilva
Copy link
Contributor

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)

@vilaboim
Copy link
Contributor Author

vilaboim commented Nov 4, 2018

@pablohpsilva did you install eslint-plugin-vue?
Can you show your package.json and .eslintrc?

@alexbruno
Copy link

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"

@vilaboim
Copy link
Contributor Author

vilaboim commented Nov 8, 2018

@alexbruno and @pablohpsilva, I'm working on it. 😉

@vilaboim
Copy link
Contributor Author

@alexbruno I guess we cannot have a .eslintignore on our side, but I improved the README to help the users.

@vilaboim vilaboim merged commit 0316dd4 into master Nov 23, 2018
@vilaboim vilaboim deleted the hotfix/eslint-plugin-vue branch November 23, 2018 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants