npm.io
22.5.0 • Published 1 week ago

@angular-eslint/schematics

Licence
MIT
Version
22.5.0
Deps
7
Size
107 kB
Vulns
0
Weekly
0
Stars
1.8K

@angular-eslint/schematics

Please see https://github.com/angular-eslint/angular-eslint for full usage instructions and guidance.

The @angular-eslint/schematics package is a set of custom Angular CLI Schematics which are used to add and update dependencies and configuration files which are relevant for running ESLint on an Angular workspace.

Options

--skip-install

Skips installing npm packages when running ng add @angular-eslint/schematics. This can be useful when the schematic is executed as part of a larger workflow that handles dependency installation separately.

ng add @angular-eslint/schematics --skip-install
--tseslint-preset

Chooses which typescript-eslint shared config the generated eslint.config.js extends. Defaults to recommended.

Allowed values:

  • recommendedtseslint.configs.recommended + tseslint.configs.stylistic (default)
  • stricttseslint.configs.strict + tseslint.configs.stylistic
  • recommendedTypeCheckedtseslint.configs.recommendedTypeChecked + tseslint.configs.stylisticTypeChecked, and enables parserOptions.projectService
  • strictTypeCheckedtseslint.configs.strictTypeChecked + tseslint.configs.stylisticTypeChecked, and enables parserOptions.projectService

Type-checked presets make linting more powerful but slower. See RULES_REQUIRING_TYPE_INFORMATION.md. strictTypeChecked currently flags Angular CLI's generated src/main.ts bootstrap .catch(...) callback; that is expected from the preset.

ng add @angular-eslint/schematics --tseslint-preset=strictTypeChecked

The same option is accepted by add-eslint-to-project, application, and library. It is applied when the root ESLint config is created.

--set-parser-options-project

Enables parserOptions.projectService in the generated ESLint config so that rules requiring type information can run, without changing the typescript-eslint preset. Type-checked tseslintPreset values imply this option.

ng add @angular-eslint/schematics --set-parser-options-project