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

The line number of the .vue file error message is incorrect #68

Closed
KangdaOOLin opened this issue Feb 14, 2017 · 4 comments
Closed

The line number of the .vue file error message is incorrect #68

KangdaOOLin opened this issue Feb 14, 2017 · 4 comments

Comments

@KangdaOOLin
Copy link

version

0.6.0

webpack config

plugins: [
  ...
  new StyleLintPlugin({
      context: dirs.dev, // src
      syntax: 'scss',
      files: ['**/*.css', '**/*.scss', '**/*.vue']
  })
]

what's error

qq 20170214172626
the line number of the .vue file error message is incorrect !

@KangdaOOLin
Copy link
Author

I use the stylelint cli to check the .vue file styles, the line number is correct.
qq 20170214174518
so, I think the cause the error line number should happen to style-webpack-plugin

@Villae
Copy link

Villae commented Aug 3, 2017

I changed stylelint-processor-html to @mapbox/stylelint-processor-arbitrary-tags as @repsac-by suggested in the vue-loader issue: vuejs/vue-loader#303 (comment)

Now I get correct line numbers via stylelint-webpack-plugin.

Also, I reproduced this line number issue directly via stylelint-command (with stylelint-processor-html), when using wildcards in filename:

PS C:\xyz-vuejs-app> stylelint src/**/*.vue --syntax scss
src/components/DevMenu.vue
46:12 × Expected "#ffff00" to be "#ff0" color-hex-length

It works correctly without wildcards:
PS C:\xyz-vuejs-app> stylelint src/components/DevMenu.vue --syntax scss
src/components/DevMenu.vue
115:12 × Expected "#ffff00" to be "#ff0" color-hex-length

And that 115 is the correct line number.
That "src/**/*.vue" works fine with mapbox/stylelint-processor-arbitrary-tags

So, I think that issue is somewhere else than in this webpack-plugin, maybe in stylelint-processor-html :)

@beeplin
Copy link

beeplin commented Aug 27, 2017

+1

@JaKXz JaKXz added upstream and removed upstream labels Dec 6, 2017
@JaKXz
Copy link
Contributor

JaKXz commented Dec 6, 2017

@Villae thank you for your solution. Sounds like this is actually a downstream issue, & that's new. I'm going to close this for now, hopefully more recent versions have helped but feel free to reopen if not.

@JaKXz JaKXz closed this as completed Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants