-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow turning on/off rules #77
Comments
Could this be solved with #76? |
#76 is a bit more than we need. The ability to turn on/off rules is already in the API, it just needs to be exposed. |
Did you have a system similar to JSLint in mind for this? For example, at the top of a file to be parsed: It can use the id property of each rule. |
Yes, though the values need to be quoted if it has a dash /*csslint "empty-rules": false, floats: false */ |
It seems JSLint detects this special comment in the parser itself. Do you think it should be in the parser for CSSLint as well? What I ended up doing with my JSLint Rhino command is automatically concatenate an options config file to each input and then run JSLint on the joint file. However, this messes up all the line numbers by 1 since I've modified the input to the lint. Essentially, do you think these directives should be part of the input file (like JSLint and Vim options etc) or maybe CSSLint should take a different approach? Maybe included as a -c option on the command line or as a .csslintconf file in a directory of CSS? (Just throwing out some possibilities. Not sure what my preference is yet. At least for my work JS files, it wasn't feasible to add the same options line to every file.) |
The parser is generic and will treat this like any other comment. CSS Lint itself will look for it and set the options appropriately. You'll also be able to specify options on the command line as well when the next version comes out. |
In both the Web UI and in the CLI, we need to allow people to turn on/off specific rules.
The text was updated successfully, but these errors were encountered: