@krema/angular-eslint-stylelint-builder
v1.4.0
Published
Angular CLI builder for ESLint and stylelint
Downloads
8,493
Readme
Angular ESLint + Stylelint Linter
An Angular CLI builder inspired by @angular-eslint/builder for linting Angular applications using ESLint and stylelint.
The library works with following Angular versions:
Prerequisites
Installed and configured eslint and stylelint e.g. via .eslintrc
and .stylelintrc
.
For more information on converting TSLint to ESLint in Angular projects please see the following @angular-eslint project.
Install
npm install --save-dev @krema/angular-eslint-stylelint-builder
Usage
Add the builder @krema/angular-eslint-stylelint-builder:lint" to the lint task in your angular.json.
angular.json
projects → <my-project> → architect → lint
Replace the builder of @angular-eslint
with @krema/angular-eslint-stylelint-builder
:
"lint": {
- "builder": "@angular-eslint/builder:lint",
+ "builder": "@krema/angular-eslint-stylelint-builder:lint",
"options": {
- "lintFilePatterns": ["**/*.ts"]
+ "eslintFilePatterns": ["**/*.ts"],
+ "stylelintFilePatterns": ["**/*.scss"]
}
}
Run ng lint
:
Configuration
The following options can be configured: