18.1.1 • Published 10 months ago
@protoarch.angular/linters v18.1.1
@protoarch.angular/linters
ESlint, Stylelint & Prettier rules for Angular applications.
Setup
Install from npm
npm i @protoarch.angular/linters --save-dev
ESLint + Prettier
Include configurations:
.eslintrc.js
const {join} = require('path');
module.exports = {
root: true,
extends: ['./node_modules/@protoarch.angular/linters/eslint/index.js'],
parserOptions: {
ecmaVersion: 2022,
project: join(__dirname, './tsconfig.json'),
sourceType: 'module',
},
};
.prettierrc.js
module.exports = {
...require('./node_modules/@protoarch.angular/linters/prettier/prettier.config.js'),
};
Add npm-script:
"lint": "npm exec -- eslint --config ./.eslintrc.js --debug "src/**/*.{js,ts,html}"",
"lint:fix": "npm exec -- eslint --config ./.eslintrc.js --fix --debug "src/**/*.{js,ts,html}""
Add .eslintignore
file
dist
node_modules
coverage
*.less
*.css
Stylelint
stylelint.config.js
const styleLint = require('@protoarch.angular/linters/stylelint/stylelint.config.js');
module.exports = {
...styleLint,
rules: {
...styleLint.rules,
'no-empty-source': null,
},
};
Add npm-script:
"lint": "npm exec -- stylelint --config ./.stylelintrc \"src/**/*.less\"",
"lint:fix": "npm exec -- stylelint --config ./.stylelintrc --fix \"src/**/*.less\""
VSCODE
.vscode/settings.json
"stylelint.validate": [
"css",
"less",
"postcss",
"scss"
],
WebStorm
Configure pattern in Preferences > Stylelint
{**/*,*}.{css,less,pcss,scss}
18.1.1
10 months ago
18.1.0
11 months ago
18.0.0
1 year ago
18.1.0-alpha.3
11 months ago
18.1.0-alpha.4
11 months ago
18.1.0-alpha.1
11 months ago
18.1.0-alpha.2
11 months ago
18.1.0-alpha.7
11 months ago
18.1.0-alpha.5
11 months ago
18.1.0-alpha.6
11 months ago
17.0.2
1 year ago
17.0.1
1 year ago
17.0.0
1 year ago
17.0.0-0
2 years ago
14.0.0-1
3 years ago
14.0.0-0
3 years ago
14.0.0-2
3 years ago
14.0.0
3 years ago
14.0.1
3 years ago
14.0.2
3 years ago
13.1.0
3 years ago
13.0.1
3 years ago
13.0.0
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago