@sagent/lint
v0.0.19
Published
## HOW LINT SCSS IN AN APP/PROJECT
Downloads
1
Readme
Sagent Lint - npm package containing all linters
HOW LINT SCSS IN AN APP/PROJECT
- Install npm package
npm i --save-dev @sagent/brand
- Install stylelint
npm install --save-dev stylelint stylelint-config-standard-scss
- Add script (optional) to package.json of the app
{
"scripts": [
"style-lint": "npx stylelint \"**/*.scss\"",
]
}
- Add config file to the root of the app/lib
.stylelintrc
or.stylelintrc.json
{
"extends": [
"stylelint-config-standard-scss",
"./src/lib/stylelint/sagent-stylelint-rules"
]
}
- Run script
npm run style-lint
AVAILABLE PLUGINS
https://github.com/stylelint/awesome-stylelint#plugins
ESLINT
- Install
npm i @sagent/lint
- Modify
.eslintrc.json
or.eslintrc
in the project root
{
...
"overrides": [
{
"files": [
"*.ts"
],
...
"extends": [
"./node_modules/@sagent/lint/src/eslint/sagent-eslint-rules-for-ts.json"
],
...
},
{
"files": [
"*.html"
],
"extends": [
"./node_modules/@sagent/lint/src/eslint/sagent-eslint-rules-for-html.json"
],
...
}
]
}
- Rules included in the config @typescript-eslint and @angular-eslint