Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

line mapping not working right #1

Open
xmoki opened this issue Sep 4, 2016 · 10 comments
Open

line mapping not working right #1

xmoki opened this issue Sep 4, 2016 · 10 comments

Comments

@xmoki
Copy link

xmoki commented Sep 4, 2016

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
Copy link

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
Copy link

abdonrd commented Dec 13, 2016

+1 on this!

@jbreuer95
Copy link

+1

@KangdaOOLin
Copy link

I have the same question, and i use the stylelint-webpack-plugin: webpack-contrib/stylelint-webpack-plugin#68

@ccbikai
Copy link
Owner

ccbikai commented Feb 23, 2017

I tested , it,s right

image

image

What is your stylelint version ?

@KangdaOOLin
Copy link

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

@abdonrd
Copy link

abdonrd commented Apr 20, 2017

I have the same issue:

screen shot 2017-04-20 at 10 30 32 am

@Villae
Copy link

Villae commented Aug 3, 2017

As I stated in stylelint-webpack-plugin issue: webpack-contrib/stylelint-webpack-plugin#68 (comment)

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, maybe the bug has something do with this stylelint-processor-html :)

@runfastlynda
Copy link

+1

@GeoffZhu
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants