Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@epam/eslint-config-angular

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epam/eslint-config-angular

It's a configuration on top of the standard `@angular-eslint` rules which enables stricter rules, adds some more plugins to ensure a smooth development process by elimination topics to discuss during PR reviews.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-88.89%
Maintainers
0
Weekly downloads
 
Created
Source

ESLint config Angular

It's a configuration on top of the standard @angular-eslint rules which enables stricter rules, adds some more plugins to ensure a smooth development process by elimination topics to discuss during PR reviews.

There are extra rules that enforce better consistency in *.html and *.ts files, and common pitfalls when working with RxJS.

Quick start

Before using this package, you should have angular-eslint set up.

Install the package

npm i -D @epam/eslint-config-angular

Rename your eslint.config.js to eslint.config.mjs and replace the contents with following

import eslintConfigAngular from "@epam/eslint-config-angular";

export default [
  ...eslintConfigAngular,
  {
    files: ["**/*.ts"],
    rules: {
      "@angular-eslint/directive-selector": [
        "error",
        {
          type: "attribute",
          prefix: "app",
          style: "camelCase",
        },
      ],
      "@angular-eslint/component-selector": [
        "error",
        {
          type: "element",
          prefix: "app",
          style: "kebab-case",
        },
      ],
    },
  },
];

Opting-out from rules

Follow the regular ESLint approach for opting-out from rules you don't like or want to make adjustments for.

Rules and plugins

This package does not provide rules of its own, it only extends and applies extra rules from packages:

*.html

Extends:

  • @angular-eslint/template/recommended
  • @angular-eslint/template/accessibility
RuleValue
@angular-eslint/template/no-duplicate-attributeserror
@angular-eslint/template/elements-contenterror
@angular-eslint/template/alt-texterror
@angular-eslint/template/label-has-associated-controlerror
@angular-eslint/template/no-positive-tabindexerror
@angular-eslint/template/valid-ariaerror
@angular-eslint/template/banana-in-boxerror
@angular-eslint/template/eqeqeqerror
{
allowNullOrUndefined: true
}
@angular-eslint/template/no-anyerror
*.ts

Extends:

  • eslint/recommended
  • typescript-eslint/recommended
  • typescript-eslint/stylistic
  • sonarjs/recommended
  • angular-eslint/tsRecommended
  • rxjs/recommended
RuleValue
rxjs/no-ignored-observableerror
rxjs/no-unbound-methodserror
rxjs/throw-errorerror
rxjs/no-compaterror

Keywords

FAQs

Package last updated on 24 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc