Socket
Book a DemoInstallSign in
Socket

@s-libs/eslint-config-ng

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-libs/eslint-config-ng

This library provides some default config you can use for ESLint in an Angular project.

20.0.0
latest
Source
npmnpm
Version published
Weekly downloads
46
820%
Maintainers
1
Weekly downloads
 
Created
Source

This library provides some default config you can use for ESLint in an Angular project.

Follow these instructions to get all the community-recommended config from ESLint, @typescript-eslint, and @angular-eslint.

  • First install Angular ESLint, following their instructions for your situation. Make sure it is working with their default config.

  • npm install --save-dev @s-libs/eslint-config-ng

  • Change eslint.config.js in your root directory to this, and make adjustments to suit your needs:

    // @ts-check
    const tseslint = require("typescript-eslint");
    const slibs = require("@s-libs/eslint-config-ng");
    
    module.exports = tseslint.config(...slibs, {
      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" }],
      },
    });
    

Strict Config

Use these instructions for much stricter linting, start with the instructions above then continue with these. It starts with all rules from the libraries above, then turns off or modifies rules that Simonton Software subjectively thinks makes the config better.

  • Follow the instructions above for recommended config and ensure it works.

  • npm install --save-dev eslint-config-prettier

  • Change the require in eslint.config.js to @s-libs/eslint-config-ng/strict

  • Add languageOptions to the eslint.config.js file you created, so it looks like this:

    // @ts-check
    const tseslint = require("typescript-eslint");
    const slibs = require("@s-libs/eslint-config-ng/strict");
    
    module.exports = tseslint.config(...slibs, {
      files: ["**/*.ts"],
      languageOptions: { parserOptions: { projectService: true } },
      rules: {
        "@angular-eslint/directive-selector": ["error", { type: "attribute", prefix: "app", style: "camelCase" }],
        "@angular-eslint/component-selector": ["error", { type: "element", prefix: "app", style: "kebab-case" }],
      },
    });
    

Warning: the configs from underlying libraries is not as stable as the ones used for their "recommended" configs. It can change with minor version updates to the underlying libraries.

FAQs

Package last updated on 19 Jun 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.