@lego/stylelint-config-prettier
Purpose
This is a stand-alone all-round configuration that inherits prettier configurations from
@lego/prettier-config
and is tailored towards usage with stylelint.
NOTE: if you are using @lego/stylelint-config
you don't need to worry about this configuration, it
will automatically be included
Installation
Install this config package:
npm i -D @lego/stylelint-config-prettier
Standalone Usage
Extend your .stylelintrc
config file, and make sure @lego/stylelint-config-prettier
is at the end:
{
"extends": ["stylelint-prettier", "@lego/stylelint-config-prettier"]
}
or your stylelint.config.js
config file is you want
module.exports = {
extends: ['stylelint-prettier', '@lego/stylelint-config-prettier'],
};
Rules
This package currently implements rules from the following stylelint extensions:
- https://github.com/prettier/stylelint-config-prettier
- https://github.com/prettier/stylelint-prettier
Overriding Rules
With the above tslint.json
configuration example, you can still use or override already defined
rules as such:
{
"extends": ["tslint:latest", "@lego/stylelint-config-prettier"],
"rules": {
"prettier": [true, {
"printWidth": 100,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"proseWrap": "preserve"',
}],
}
}