@linters/eslint-config-angular

1.12.3 • Public • Published

Eslint Config Angular

Plugins

This configuration uses the following plugins:

  • @angular-eslint/eslint-plugin
  • @angular-eslint/eslint-plugin-template
  • @linters/eslint-config-typescript

Install

$ yarn add eslint @angular-eslint/builder:lint @linters/eslint-config-angular -D

Add lint section to your architect:

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "your-project-name": {
      ...
      "architect": {
        ...
        "lint": {
          "builder": "@angular-eslint/builder:lint",
          "options": {
            "lintFilePatterns": [
              "src/**/*.ts",
              "src/**/*.html"
            ]
          }
        }
      }
    }
  },
  "defaultProject": "your-project-name"
}

Usage

Angular eslint configuration is a bit more complicated because we need to lint HTML files and Angular components can have special eslint rules too.

Rename a .eslintrc.json to .eslintrc.js and replace its contents:

module.exports = {
  extends: ['@linters/eslint-config-angular'],
}

Package Sidebar

Install

npm i @linters/eslint-config-angular

Weekly Downloads

32

Version

1.12.3

License

none

Unpacked Size

17.1 kB

Total Files

8

Last publish

Collaborators

  • michal.jarnot