@dscheerens/eslint-config-angular

4.0.0 • Public • Published

NPM Version

Angular ESLint configuration

This NPM package contains an (opiniated) ESLint configuration for Angular.

Installation

First, make sure you have the following dev dependencies installed:

  • @angular-eslint/eslint-plugin
  • @angular-eslint/eslint-plugin-template
  • @angular-eslint/template-parser
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • eslint

You can install them all at once using the following command:

npm install --save-dev eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser

Next, install this package:

npm install --save-dev @dscheerens/eslint-config-angular

Usage

Below you can find an example .eslintrc.json file that makes use of this package.

{
  "root": true,
  "overrides": [
    {
      "files": ["*.ts"],
      "parserOptions": {
        "project": ["./tsconfig.json"],
        "createDefaultProgram": true
      },
      "extends": ["@dscheerens/eslint-config-angular/typescript"]
    },
    {
      "files": ["*.spec.ts"],
      "extends": ["@dscheerens/eslint-config-angular/spec"]
    },
    {
      "files": ["*.html"],
      "extends": ["@dscheerens/eslint-config-angular/html"]
    }
  ]
}

Package Sidebar

Install

npm i @dscheerens/eslint-config-angular

Weekly Downloads

6

Version

4.0.0

License

MIT

Unpacked Size

33.9 kB

Total Files

6

Last publish

Collaborators

  • dscheerens