Skip to content

Conversation

@westonruter
Copy link
Contributor

It is not currently possible to pass a custom CSSLInt ruleset to the css-lint addon. The second argument to CSSLint.verify() is the ruleset, which is options here:

https://github.com/CSSLint/csslint/blob/a4361d4b4cdfa9f04ebe7e8e3a4d4e991e6af5c8/src/core/CSSLint.js#L166-L175

There should be parity with the the javascript-lint addon which passes the options to JSHINT:

https://github.com/codemirror/CodeMirror/blob/883fd008d29fdcaab18b50f47c248e3d112f39ed/addon/lint/javascript-lint.js#L24-L31

And similarly for the html-lint addon:

https://github.com/codemirror/CodeMirror/blob/883fd008d29fdcaab18b50f47c248e3d112f39ed/addon/lint/html-lint.js#L30-L40

Incidentally, the csslint rule for HTMLHint does allow you to pass in a custom ruleset, but this only works htmlmixed mode.

@marijnh
Copy link
Member

marijnh commented Aug 28, 2017

Good idea. Merged as 06ed8a1

@marijnh marijnh closed this Aug 28, 2017
@westonruter westonruter deleted the fix/csslint-options-passing branch August 28, 2017 21:52
@Aaronius
Copy link

Aaronius commented Sep 5, 2017

Thank you so much for this! I just ran into this and am so glad to see support has been added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants