@cloudflight/eslint-plugin-angular

1.1.2 • Public • Published

@cloudflight/eslint-plugin-angular

The Cloudflight ESLint Plugin for Angular provides multiple configurations of ESLint rules recommended by Cloudflight.

You can find the directory of all rules including their reasoning here.

Dependencies

The following dependencies are required:

"eslint": ">=9.0.0 < 10.0.0"

Usage

In your package.json add the following:

"devDependencies": {
    ...
    "@cloudflight/eslint-plugin-angular": "<version>",
    ...
}

The plugin provides 3 different configurations:

  • cloudflightAngularConfig
    • Both of the below 2 configurations
  • cloudflightAngularTemplateConfig
    • Only contains rules for HTML files
  • cloudflightAngularTypescriptConfig
    • Only contains rules for TS files

Now open your eslint.config.mjs and add one of the configurations:

import { cloudflightAngularConfig } from '@cloudflight/eslint-plugin-angular';
import { includeIgnoreFile } from '@eslint/compat';
import { dirname, normalize, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';

const directory = dirname(fileURLToPath(import.meta.url));
const gitignorePath = normalize(resolve(directory, '.gitignore'));

export default [
    includeIgnoreFile(gitignorePath),
    ...cloudflightAngularConfig({
        rootDirectory: import.meta.dirname,
    }),
];

See Custom Configuration for more complicated project setups.

/@cloudflight/eslint-plugin-angular/

    Package Sidebar

    Install

    npm i @cloudflight/eslint-plugin-angular

    Weekly Downloads

    503

    Version

    1.1.2

    License

    Apache-2.0

    Unpacked Size

    20.1 kB

    Total Files

    13

    Last publish

    Collaborators

    • cloudflight-admin
    • jenglisch