You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thrown error should have clear message property without note about path to current file or csscomb and gonzales versions.
If we csscomb core will throw error in this format then linters will can collect invalid files with errors in and output the result it at the end of linting all the files like this
CSScomb linting failed for these files:
! css/asd.css
! css/qwe.css
css/asd.css
1 | asd{
2*| asd
3 | }
css/qwe.css
1 | asd{
2*| color: red !important;
3 | }
Total: 2 bad files.
The text was updated successfully, but these errors were encountered:
There are 4 types of errors in CSScomb based on who is responsible for breaking stuff:
User (e.g. unacceptable value in config, something weird in comb.use())
Third-party developer
Parser
Linter
processString method throws only parsing errors, so they have nothing to do with linting.
What you need for a linter (as I think) is a separate method lintString (see csscomb/csscomb.js#261) that will return a list of errors:
[{file: "css/asd.css",line: 2,column: 9,message: "Missing semicolon"},{file: "css/qwe.css",line: 2,column: 11,message: "Extra space after colon"}]
And inside your plugin you can decide yourself how you'll print those errors.
error
should havefile
property which should be relative path to file:error
should have clearmessage
property without note about path to current file or csscomb and gonzales versions.If we csscomb core will throw error in this format then linters will can collect invalid files with errors in and output the result it at the end of linting all the files like this
The text was updated successfully, but these errors were encountered: