ngrx / platform

Reactive State for Angular
https://ngrx.io
Other
7.96k stars 1.95k forks source link

feat(eslint-plugin): support ESLint v9 (and v8) #4371

Closed timdeschryver closed 1 month ago

timdeschryver commented 1 month ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #4365

What is the new behavior?

Does this PR introduce a breaking change?

[x] Yes
[ ] No
BREAKING CHANGE:

The configuration of several rules are changed, making the rules more strict (warnings became errors).
Configuration names are renamed to be more clear and follow the naming convention of other plugins.
For an overview of the configuration rules and available configurations see https://ngrx.io/guide/eslint-plugin.

Other information

After this PR, #4299 can be picked up. The docs still need to be updated, which is something I plan to do in the next days/weeks.

Some highlights:

Public:

const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
// πŸ‘‡
const ngrx = require("@ngrx/eslint-plugin/v9");

module.exports = tseslint.config(
  {
    files: ["**/*.ts"],
    extends: [
      eslint.configs.recommended,
      ...tseslint.configs.recommended,
      ...angular.configs.tsRecommended,
      // πŸ‘‡
      ...ngrx.configs.recommended,
    ],
    processor: angular.processInlineTemplates,
);

Internal:

It works πŸŽ‰ Left: ESLint v9 Right: ESLint v8

image

netlify[bot] commented 1 month ago

Deploy Preview for ngrx-io canceled.

Name Link
Latest commit 72d12fc94ac65d84148c17c0d2766de6b32d8e32
Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/6660754b030a2f0008872acc