ccbikai / stylelint-processor-html

Please Use stylelint-processor-arbitrary-tags
https://github.com/mapbox/stylelint-processor-arbitrary-tags
8 stars 3 forks source link

line mapping not working right #1

Open xmoki opened 8 years ago

xmoki commented 8 years ago

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

robdodson commented 7 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

abdonrd commented 7 years ago

+1 on this!

jbreuer95 commented 7 years ago

+1

KangdaOOLin commented 7 years ago

I have the same question, and i use the stylelint-webpack-plugin: https://github.com/JaKXz/stylelint-webpack-plugin/issues/68

ccbikai commented 7 years ago

I tested , it,s right

image

image

What is your stylelint version ?

KangdaOOLin commented 7 years ago

use the stylelint cli to check code, it's right. Maybe this bug casued by stylelint-webpack-plugin

abdonrd commented 7 years ago

I have the same issue:

screen shot 2017-04-20 at 10 30 32 am
Villae commented 7 years ago

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 :)

runfastlynda commented 7 years ago

+1

GeoffZhu commented 6 years ago

+1