Overview
Spend less time reviewing pull requests.
Make learning your rules simpler for new additions to the team.
Keep your code more consistent and more reliable...
Or don't. You're the boss.
Manicure your CSS with Polish.
Features:
- Totally unopinionated.
- Totally plugin based.
- Totally named in honor of the nail polish emoji.
Polish works with CSS, SCSS, Sass, and Less.
Quickstart
Do this:
var polish = require('polish-css');
Then do this:
var stylesheet = '#css { color: red; }',
pathToStylesheet = '/path/to/stylesheet',
myPrivateModules = require('./path/to/private/modules'),
pluginsToUse = [
{
module : 'polish-no-styling-ids',
severity : 2
},
{
module : myPrivateModules.someLinter,
severity : 2,
lintingOption : ['.things', '.to', '.pass', '.to', '.the', '.linter']
}
],
results;
results = polish(stylesheet, pathToStylesheet, pluginsToUse);
polish.reporter(pathToStylesheet, results.errors, results.warnings);
Linters can be ignored on a per-ruleset basis using inline commenting:
#wont-be-reported {
color: pink;
}
Installation
Install from npm:
npm install polish-css
If you want to use the CLI, install Polish globally:
npm install -g polish-css
Example plugins
License
This project is licensed under the terms of the MIT license.