@perfective/eslint-config-angular provides
a shareable ESLint configuration
for Angular development.
@perfective/eslint-config-angular adds the following ESLint plugins to the
@perfective/eslint-config configuration:
To simplify configuring ESLint support in the IDEs and editors, the severity of all fixable rules is a warning. It allows distinguishing errors that have to be fixed manually from issues that will be fixed automatically.
-
Require
@perfective/eslint-config-angularand its peer dependencies as dev dependencies:npm install --save-dev @perfective/eslint-config-angular
Required peer dependencies are installed automatically.
-
Import
perfectiveEslintAngularConfigtoeslint.config.js:import { perfectiveEslintAngularConfig } from '@perfective/eslint-config-angular'; export default perfectiveEslintAngularConfig();
-
Optional Install optional peer dependencies to add tool-specific linting rules.
npm install --save-dev \ eslint-plugin-cypress \ eslint-plugin-jest \ eslint-plugin-jest-dom \ eslint-plugin-testing-libraryImport configurations to
eslint.config.js.import { perfectiveEslintAngularConfig } from '@perfective/eslint-config-angular'; // Optional dependencies. import { cypressConfig } from '@perfective/eslint-config/cypress'; import { jestConfig, jestTypescriptConfig } from '@perfective/eslint-config/jest'; import { jestDomConfig } from '@perfective/eslint-config/jest-dom'; import { testingLibraryConfig } from '@perfective/eslint-config/testing-library'; export default perfectiveEslintAngularConfig([ cypressConfig, jestConfig, jestTypescriptConfig, jestDomConfig, testingLibraryConfig, ]);
Note*.d.tsfiles anddistdirectories are ignored by the configuration.node_modulesand dot-files are ignored by theeslint. If more directories or file types need to be ignored, see the.eslintignorefile docs.
The following is the list of available packages and their exports.
-
perfectiveEslintAngularConfig(configs: Linter.Config[] = []): Linter.Config[]— creates a list of flat configs.