2.1.0 • Published 6 months ago

@coara/eslint-config-ng v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

@coara/eslint-config-ng

This package has been updated to work with Angular v19.

Installation

$ npm i -D @coara/eslint-config-ng

Usage

  1. Run Angular ESLint:

    ng add angular-eslint
  2. Install @coara/eslint-config-ng:

    npm i -D @coara/eslint-config-ng
  3. Replace the file content and configure the parser's relative path:

    // eslint.config.js
    
    import createEslintConfig from "@coara/eslint-config-ng";
    import { dirname } from "path";
    import { fileURLToPath } from "url";
    
    const __filename = fileURLToPath(import.meta.url);
    const __dirname = dirname(__filename);
    export default createEslintConfig({
      project: "./tsconfig.json",
      tsconfigRootDir: __dirname,
    });
  4. Add module compatibility:

    // package.json
    {
      "type": "module"
    }
  5. Recommended: Install Prettier:

    npm install prettier --save-dev
  6. Recommended: Configure Prettier with the print width option:

    // prettier.config.js
    export default {
      printWidth: 120,
    };
  7. Optional: For VSCode auto formatting, linter fixes, and differentiating linter from TypeScript errors:

    // .vscode/settings.json
    {
      "editor.defaultFormatter": "esbenp.prettier-vscode",
      "eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      },
      "eslint.useFlatConfig": true,
      "editor.formatOnSave": true
    }
2.0.15

9 months ago

2.0.3

10 months ago

2.0.16

9 months ago

2.0.2

10 months ago

2.0.13

9 months ago

2.0.5

10 months ago

2.0.14

9 months ago

2.0.4

10 months ago

2.0.11

9 months ago

2.0.7

10 months ago

2.0.12

9 months ago

2.0.6

10 months ago

2.0.9

10 months ago

2.0.8

10 months ago

2.1.0

6 months ago

2.0.1

10 months ago

2.0.0

10 months ago

2.0.17

9 months ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.27

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.23

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago