AtomLinter / linter-stylelint

A plugin for Atom Linter providing an interface to stylelint.
https://atom.io/packages/linter-stylelint
115 stars 37 forks source link

Report invalid points nicely #309

Open FezVrasta opened 7 years ago

FezVrasta commented 7 years ago

Stylelint throws errors randomly while I write, it works correctly but this plugin spawns hundred of popups with the errors. Can you just add an option to disable them all?

Arcanemagus commented 7 years ago

Those errors are actual errors and should be fixed not just ignored, without knowing what they say I can't really proceed any further. Can you copy the text of one of them here?

FezVrasta commented 7 years ago

At the moment I'm not able to reproduce them anymore, but they talked about a line number that exceeded the length of the file if I remember correctly 🤔

Arcanemagus commented 7 years ago

Ah, that would be stylelint reporting an invalid point, looks like this project doesn't have the nice way of reporting that implemented yet.

Arcanemagus commented 7 years ago

The next time you see that please save the file and put it in a new issue along with your stylelint configuration so we can track down what rule is buggy 😉.

FezVrasta commented 7 years ago
Error: Column start (11) greater than line length (9)
Error: Column start (11) greater than line length (9)
    at Object.rangeFromLineNumber (/Users/federicozivolo/.atom/packages/linter-stylelint/node_modules/atom-linter/lib/index.js:179:11)
    at /Users/federicozivolo/.atom/packages/linter-stylelint/node_modules/lazy-req/index.js:20:26
    at createRange (/Users/federicozivolo/.atom/packages/linter-stylelint/lib/index.js:61:10)
    at /Users/federicozivolo/.atom/packages/linter-stylelint/lib/index.js:149:14
    at Array.map (native)
    at parseResults (/Users/federicozivolo/.atom/packages/linter-stylelint/lib/index.js:141:37)
    at /Users/federicozivolo/.atom/packages/linter-stylelint/lib/index.js:213:10
    at next (<anonymous>)
    at step (/Users/federicozivolo/.atom/packages/linter-stylelint/lib/index.js:11:273)

here it is

The file is just:

.ListItem
  displ
setalosas commented 6 years ago

I have endless of these errors too:

linter-registry.js:137 [Linter] Error running stylelint Error: Column start (168) greater than line length (0) for line 596
    at generateRange (C:\Users\chuck\.atom\packages\linter-js-standard\node_modules\atom-linter\lib\index.js:181)
    at createRange (helpers.js:48)
    at helpers.js:76
    at Array.map (<anonymous>)
    at parseResults (helpers.js:68)
    at Object.<anonymous> (helpers.js:233)
    at Generator.next (<anonymous>)
    at step (helpers.js:183)
    at <anonymous>

I debugged a few, it gives back a column/line which has no connection to reality, like here column 169 is quite impossible as there are no longer lines than 90 characters in this file.

I just add this here because in other threads this bug is reported fixed. It's definitely not fixed.

Arcanemagus commented 6 years ago

@setalosas Please see https://github.com/AtomLinter/linter-stylelint/issues/309#issuecomment-274139028.