-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
ESLint validation not working if VUE component script is located in separate file #1602
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
Comments
@Akryum thanks for pointing out, but putting '// @vue/component' did not change anything it may be convenient to put JS source file for components in separate files as support for autocomplete and other features in VUE components is not great for all IDEs and logically it seems that
and
should be treated the same way (without adding extra comments) |
You need to put // @vue/component
export default {
props: { ... }
} |
@Akryum it is not working here is repo https://bitbucket.org/yegor_sytnyk/vue_cli_eslint_bug/src/master/ the same ESLint warning is reported inside vue component but ignored if the code is referenced via src path |
After reproducing this, I think it's an issue with vue-loader 15 (and |
Fixed in vue-loader 15.2.5. |
Version
3.0.0-rc.2
Reproduction link
https://codesandbox.io/s/ly7ywz0409
Steps to reproduce
Move script part of vue component into separate JS file (HelloWorld.vue.js)
Reference in main component (HelloWorld.vue: <script src="./HelloWorld.vue.js'></script>)
Add code which violete ESLint rules
What is expected?
To see warning/error report in a console (via vue-cli)
What is actually happening?
Nothing is reported (code is not checked)
The text was updated successfully, but these errors were encountered: