npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@netural/eslint-config-angular

v4.0.5

Published

Netural ESLint flat config for Angular + TypeScript projects

Downloads

952

Readme

@netural/eslint-config-angular

Netural's shared ESLint flat config for Angular + TypeScript projects.

Requires ESLint v9+ and the flat config format.
For ESLint v8 (legacy .eslintrc format), use v3 of this package.


What's included

This config extends and builds on:

On top of those bases, the following opinions are enforced:

| Category | Rules | |---|---| | Code style | curly: error, no-console: warn (allows warn/error) | | TypeScript | Explicit function return types, explicit member accessibility (lifecycle hooks excluded), array syntax for array types, strict naming conventions | | Safety | @typescript-eslint/no-unused-vars: warn, @typescript-eslint/no-array-constructor: error, no-object-constructor: error | | Naming | camelCase variables/properties, UPPER_CASE enums & exported consts, StrictPascalCase types/interfaces/booleans (with is/should/has/can/will prefix) | | RxJS | Subjects (Subject, BehaviorSubject, ReplaySubject, AsyncSubject) must be readonly | | Angular | Empty lifecycle methods warned, input rename off |


Installation

Install the package and its peer dependencies:

npm install --save-dev \
  @netural/eslint-config-angular \
  eslint \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser \
  @angular-eslint/eslint-plugin

Usage

In your project's eslint.config.js:

// eslint.config.js
const neuralAngularConfig = require("@netural/eslint-config-angular");

module.exports = [
  ...neuralAngularConfig,

  // Optional: project-specific overrides
  {
    rules: {
      // override specific rules here
    },
  },
];

Or with ESM (eslint.config.mjs):

// eslint.config.mjs
import neuralAngularConfig from "@netural/eslint-config-angular";

export default [
  ...neuralAngularConfig,
];

Restricting to TypeScript files

If you only want the config to apply to .ts files (recommended for Angular projects):

// eslint.config.js
const neuralAngularConfig = require("@netural/eslint-config-angular");

module.exports = [
  ...neuralAngularConfig.map((config) => ({
    ...config,
    files: ["**/*.ts"],
  })),
];

Migrating from v3 to v4

v4 switches from the legacy .eslintrc extends format to ESLint's flat config format. The package now exports a plain array of config objects, so FlatCompat is no longer needed for this package.

Before (v3 with FlatCompat)

// eslint.config.mjs
import { FlatCompat } from '@eslint/eslintrc';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const compat = new FlatCompat({ baseDirectory: path.dirname(fileURLToPath(import.meta.url)) });

export default [
  // ...
  ...compat
    .extends(
      'plugin:@typescript-eslint/recommended',
      'plugin:@angular-eslint/recommended',
      '@netural/eslint-config-angular'
    )
    .map((config) => ({ ...config, files: ['**/*.ts'] })),
];

After (v4 — direct import + spread)

// eslint.config.mjs
import neturalConfig from '@netural/eslint-config-angular';

export default [
  // ...
  // @netural/eslint-config-angular is now a flat config – spread it directly.
  // It already includes @typescript-eslint/recommended and @angular-eslint/recommended.
  ...neturalConfig.map((config) => ({
    ...config,
    files: ['**/*.ts'],
  })),
];

Key changes:

  • Remove FlatCompat and its extends(...) call for this package entirely.
  • Import @netural/eslint-config-angular directly and spread it.
  • The config already bundles @typescript-eslint/recommended and @angular-eslint/recommended, so those no longer need to be listed separately.
  • FlatCompat may still be needed for other legacy configs in your project (e.g. eslint:recommended via @eslint/js, or other third-party configs not yet on flat config).

Peer dependencies

| Package | Minimum version | |---|---| | eslint | >= 9 | | @typescript-eslint/eslint-plugin | >= 7 | | @typescript-eslint/parser | >= 7 | | @angular-eslint/eslint-plugin | >= 17 |


Progressive strictness

The following rules are intentionally left off by default because they require type-aware linting (a parserOptions.project setup) and can produce many errors in codebases that aren't fully typed yet. Enable them incrementally as your project reaches stricter typing:

// eslint.config.js — project-specific overrides
{
  rules: {
    "@typescript-eslint/no-unsafe-call": "error",
    "@typescript-eslint/no-unsafe-member-access": "error",
    "@typescript-eslint/no-unsafe-argument": "error",
    "@typescript-eslint/no-unsafe-assignment": "error",
    "@typescript-eslint/member-ordering": "error",
  },
}

Versioning

This package follows Semantic Versioning. Breaking changes to rules or peer dependency requirements will be released as major versions.


License

ISC © Netural GmbH