npm.io
0.27.0 • Published 5 months ago

@perfective/eslint-config-angular

Licence
MIT
Version
0.27.0
Deps
0
Size
22 kB
Vulns
0
Weekly
0
Stars
3

Perfective ESLint Config for Angular

@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.

Setup

  1. Require @perfective/eslint-config-angular and its peer dependencies as dev dependencies:

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

    Required peer dependencies are installed automatically.

  2. Import perfectiveEslintAngularConfig to eslint.config.js:

    import { perfectiveEslintAngularConfig } from '@perfective/eslint-config-angular';
    
    export default perfectiveEslintAngularConfig();
  3. 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-library

    Import 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.ts files and dist directories are ignored by the configuration. node_modules and dot-files are ignored by the eslint. If more directories or file types need to be ignored, see the .eslintignore file docs.

Read the full documentation in the repository.

Keywords