Open xmoki opened 8 years ago
similar issue. I have inline style tags in my html and I don't think stylelint is properly accounting for the lines of HTML that precede the style tag
+1 on this!
+1
I have the same question, and i use the stylelint-webpack-plugin
: https://github.com/JaKXz/stylelint-webpack-plugin/issues/68
I tested , it,s right
What is your stylelint version ?
use the stylelint cli
to check code, it's right. Maybe this bug casued by stylelint-webpack-plugin
I have the same issue:
As I stated in stylelint-webpack-plugin issue: https://github.com/JaKXz/stylelint-webpack-plugin/issues/68#issuecomment-319923698
I changed stylelint-processor-html to @mapbox/stylelint-processor-arbitrary-tags as @repsac-by suggested in the vue-loader issue: https://github.com/vuejs/vue-loader/issues/303#issuecomment-282131495
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, maybe the bug has something do with this stylelint-processor-html :)
+1
+1
I'm using stylelint for .vue files (vuejs.org) and stylelint-processor-html works and displays the errors/sugestions but with line numbers way off.
My .vue file has 181 lines, and all stylelint suggestions begin at line 283