ESlint rules for Angular applications.
Install from npm
npm i @lcgroup.tools/linters --save-dev
Include configurations:
.eslintrc.js
module.exports = {
extends: ['./node_modules/@lcgroup.tools/linters/eslint'],
};
.prettierrc.js
module.exports = {
...require('./node_modules/@lcgroup.tools/linters/prettier/prettier.config.js'),
};
Add npm-script:
"lint": "npx eslint --config ./.eslintrc.js --debug "src/**/*.{js,ts,html}"",
"lint:fix": "npx eslint --config ./.eslintrc.js --fix --debug "src/**/*.{js,ts,html}""
Add .eslintignore
file
dist
node_modules
coverage
*.less
*.css
stylelint.config.js
const styleLint = require('@lcgroup.tools/linters/stylelint/stylelint.config.js');
module.exports = {
...styleLint,
rules: {
...styleLint.rules,
'no-empty-source': null,
},
};
Add npm-script:
"lint": "npx stylelint --config ./.stylelintrc \"src/**/*.less\"",
"lint:fix": "npx stylelint --config ./.stylelintrc --fix \"src/**/*.less\""
.vscode/settings.json
"stylelint.validate": [
"css",
"less",
"postcss",
"scss"
],