# Changelog

## Next

## 6.1.0

- Bumped `dprint@^0.56.0`: Avoid hard to track glibc and plugin override issues
- Fixed crashes when linting `.html` with `angular-eslint < 21.3`, by patching the template parser's returned AST to include a `body`/`sourceType`
- Change `@stylistic/arrow-parens` to `always` in stylistic preset
- Disabled `@stylistic/jsx-wrap-multilines` and set `@stylistic/no-extra-parens`'s `ignoreJSX` to `none` in stylistic preset, to match `dprint-plugin-typescript@0.97`'s `"jsx.multiLineParens": "never"`
- Moved `import-x/newline-after-import` from base to stylistic preset, now covered by `dprint-plugin-typescript@0.97`'s `"module.blankLinesAfterImports": 1` (note dprint doesn't cover CommonJS `require()` calls)
- Updated copyright headers to use `SPDX-FileCopyrightText`

## 6.0.4

- Avoid runtime patching the same package multiple times if imported from 2 locations
- Explicitly disabled the following rules in `.html` in Angular preset, as they don't parse:
  - `@stylistic/lines-around-comment`
  - `@stylistic/padding-line-between-statements`
  - `@stylistic/spaced-comment`

## 6.0.3

- Fixed `angular-file-naming` plugin on ESLint v10 by using `fixupPluginRules`
- Pinned `eslint-plugin-no-relative-import-paths` to `^1.6` + `fixupPluginRules` rather than patched github repo
- Updated `eslint-plugin-prefer-arrow-functions` to `^3.10`
- Reverted the 6.0.2 `languageOptions.parserOptions.projectService.allowDefaultProject` change
- `eslint-rule-composer` and `eslint-plugin-react` are now patched at runtime (in-memory, when `base.mjs`/`react.mjs` are imported) instead of at install time, so `node_modules` is never written to

## 6.0.2

- ~~Added `languageOptions.parserOptions.projectService.allowDefaultProject: ["*.config.{[cm]js,js}"]` for `"files": ["*.config.{[cm][jt]s,[jt]s}"]`~~
- Explicitly disabled the following rules in `.html` in Angular preset, as they don't parse:
  - `unicorn/prefer-string-raw`
  - `sonarjs/code-eval`
  - `@typescript-eslint/consistent-type-imports`

## 6.0.1

- Removed `@nx` patching. This will be updated in a later update.

## 6.0.0

### Changes that may require manual intervention

- Removed the `typescript.mjs` preset. All base presets now individually account for JS/TS.
  - Remove `eslint-config-beslogic/typescript.mjs` import and change `eslint-config-beslogic/javascript.mjs` to `eslint-config-beslogic/base.mjs`
- Applied non-[TypeChecked](https://typescript-eslint.io/getting-started/typed-linting/) `typescript-eslint` rules directly on the `javascript.mjs`/`base.mjs` preset
  - A handful of core ESLint rules will now gain the `@typescript-eslint/` prefix on javascript files
- Enabled `prefer-destructuring` for arrays
- Many `autofix/*` rules are back to being the core eslint rules
- Re-enabled `sonarjs/no-nested-functions` with a threshold of `5`
- Migrated from `eslint-plugin-no-autofix` to `eslint-plugin-autofix`
  - All `autofix/` in rule prefixes are gone
  - `no-autofix/prefer-arrow-functions/prefer-arrow-functions` is no `prefer-arrow-functions-no-autofix/prefer-arrow-functions`
- Dropped support for `typescript@<5` (replace `tsconfig.4.3.json` with `tsconfig.5.0.json` or `tsconfig.5.6.json`)
- Migrated from `eslint-plugin-mui-sx-order`'s `mui/sort-sx-keys` to `mui-sx-order/sort-sx-properties`
- Account for `eslint.config.[cm]?ts`
- Fixed `prefer-arrow-functions/prefer-arrow-functions` to account for Angular Lifecycle methods and re-enabled for classes in Angular preset
- Set `@typescript-eslint/consistent-type-definitions` to `interface` in `.d.ts` files to promote consistent style with module augmentation
- Decreased cognitive-complexity rules' threshold to `12`, which is still enough to pass on create-react-app's `serviceWorkerRegistration.js` template
- Dropped custom support for `react-redux`. You can use the recommended preset from `eslint-plugin-react-redux` directly to achieve the same.
- `react/function-component-definition` now prefers `function-declaration` for `namedComponents`
- `prefer-arrow-functions/prefer-arrow-functions` will now allow named functions in jsx

### Minor Rule fixes

- Fixed `@stylistic/no-extra-parens`'s detection of TSDoc `@type` comment on `eslint-stylistic@<5.9.0`. Allowing parenthesis for type casting
- `n/no-extraneous-import` no longer includes `ws`
- Disabled `import-x/default` and `import-x/named` in TypeScript files
- Improve information around `no-console`
- Added to `ESNext.Array` TSConfig's `compilerOptions.lib` to allow using `Array#toReversed()` and `Array#toSorted()`
- Added tsconfig dot-dirs mention to README
- MUI preset no longer requires or conflicts with the TypeScript preset
- MUI spacing shorthands are now also forbidden inside the `sx` prop, not only as direct component props
- Allow `mx`, `my`, `px`, `py` CSS shorthand for MUI because there's no long form equivalent
- `import-x` rules can now be aware of `jsconfig.json`. In node preset they can not be aware of `jsconfig.json` and `tsconfig.json`
- Disabled `prefer-destructuring` and `@typescript-eslint/prefer-destructuring` for arrays
- Fixed `no-restricted-globals` matching "confusing browser globals" against global object outside NodeJS preset since `eslint@9.39`

### Changed dependencies

- Added support for ESLint v10
  - This currently requires a postinstall patch to the following packages: `eslint-rule-composer`, `eslint-plugin-react`, `eslint-plugin-react-redux`. Note that the patch is only ran if `eslint>=10` is detected
- Bumped `eslint`+`@eslint-js` to `^9.38 || ^10`
- Removed `@eslint/config-helpers`
- Moved `dprint` to `peerDependencies`
- Bumped `dprint` to `^0.47` for wasm 4 plugin support
- Bumped `eslint-plugin-rxjs-angular-x` to `^0.1 || ^1.0.1`
- Bumped `eslint-plugin-rxjs-x` to `^0.8 || ^1.0.2`
- Bumped `eslint-plugin-sonarjs` to `^3.0.2 || ^4`
- Bumped `eslint-plugin-unicorn` to `^65.0.1`

## 5.2.3

- `unicorn/prevent-abbreviations` in `react` preset allow "Prop" abbreviation to allow "PropTypes" constants
- Added `"incremental": true` and `"strictNullChecks": true` to shared `tsconfig.json`
- Fixed type-checking issues in source so that pure-JS projects with `"checkJs": true` don't fail type-checking

## 5.2.2

- Don't sort alphabetically in `@stylistic/jsx-sort-props` in non-extra-strict preset

## 5.2.1

- Replaced `react/jsx-sort-props` with `@stylistic/jsx-sort-props`
- Configured `@stylistic/jsx-sort-props` to prefer reserved keywords (then) shorthands first, and prefer multilines last.

## 5.1.2

- Move `optionalDependencies` to `peerDependencies` marked with `peerDependenciesMeta.optional`
- Move `eslint` from `dependencies` to `peerDependencies`
- Bumped `eslint` to `^9.17`

## 5.1.0

### Javascript / TypeScript

- Account for ESLint version-specific new settings and rules
- If ESLint-Config-Beslogic cannot infer the TypeScript version, `latest` will now be assumed instead of `4.9` (at the moment this only affects setting `languageOptions.parserOptions.emitDecoratorMetadata` in Angular preset)
- Migrated from `eslint-plugin-prefer-arrow@^1.2` to `eslint-plugin-prefer-arrow-functions@^3.9.1`
  - This changes the rule name from `prefer-arrow/prefer-arrow-functions` to `prefer-arrow-functions/prefer-arrow-functions`
  <!-- - All functions named like an Angular Lifecycle Methods should now be excluded independent of the file name -->
- `unicorn/prevent-abbreviations` updates:
  - Disallowed `frac` as an abbreviation (proposes `fraction`)
  - Added `dependency`/`dependencies` as suggestions for the abbreviation `dep`/`deps`
  - Allowed `prev` as an abbreviation in the React preset
- `no-console` is now always a warning. `no-restricted-globals` is used to catch leftover `console.log`
- Fixed an issue with rule `id-length`'s `exceptionPatterns` configuration where most symbols would be ignored due to a partial match
- Updated `id-length`'s max length from `32` to `40`
- Merged `id-length` and `no-autofix/id-length` configurations
- Enabled rule `import-x/no-extraneous-dependencies`
- Stopped checking for `builtinGlobals` in rule `no-shadow`
- Updated and simplified documentation concerning [`dprint`](https://github.com/Beslogic/shared-configs/blob/main/README.md#packagejson)

### React

- `react/require-default-props` now expects using default arguments instead of `.defaultProps` on function components
- Disabled rule `react-hooks/set-state-in-effect`
- Added `Link` to the components `jsx-a11y/anchor-is-valid` checks out of the box
- Restricted the replacement suggestions for `'` and `"` in `react/no-unescaped-entities` to make intent clearer
- Disabled rule `react/jsx-no-leaked-render`
- Enabled rule `react/prop-types` in the React preset, but left it disabled for TypeScript

### Stylistic

Configured the following rules to be closer to what dprint results in:

- Configured `@stylistic/jsx-one-expression-per-line` to `{ allow: 'single-line' }`
- Configured `react/jsx-curly-spacing` to `{ "when": "never", "children": true }`

## 5.0.0

- Dropped support for ESLint v8
  - Note that we'll no longer be supporting the `ESLint-Config-Beslogic@v3` branch with the old-style configs
  - Speedup due to removing compatibility layers
- Dropped support for Angular v18
- Removed all `languageOptions.parserOptions.project` configs in favor of `languageOptions.parserOptions.projectService: true`
- Using `eslint-plugin-import-x`'s new resolver system
- Wrapped `eslint-plugin-extra-rules` in `fixupPluginRules` to fix `extra-rules/potential-point-free` on ESLint v9
- Exposed a pre-configured object for `@typescript-eslint/explicit-module-boundary-types` for libraries
- Let `eslint-plugin-n` completely configure `languageOptions` for Node (with automatic ESM vs CommonJS detection)
- Added names to all config objects

### Rule configuration changes

Given the nature of extending `all` and `recommended` configurations by default, I won't be listing all new rules here.

- `no-relative-import-paths/no-relative-import-paths`: Allow 1 parent level in imports
- Enabled `n/no-top-level-await`, but with `ignoreBin: true`. The rule can be bypassed by setting a hash-bang comment to your script files
- Stylistic: Try to get `@stylistic/indent` to match DPrint a bit more on nested ternary expressions
- Stylistic: Allow extra parents on nested conditional/ternary expressions
- Disallow `unknown` in `@typescript-eslint/no-base-to-string`, `@typescript-eslint/only-throw-error` and `"@typescript-eslint/prefer-promise-reject-errors`
- Disallow `any` in `@typescript-eslint/no-base-to-string`, `@typescript-eslint/only-throw-error` and `"@typescript-eslint/prefer-promise-reject-errors` in extra-strict preset
- Enabled `@typescript-eslint/prefer-nullish-coalescing` in non-strict preset, but with leaner configs. Should do nothing if `StrictNullChecks` is not enabled in your `tsconfig.json`
- Allow `while(true)` for `@typescript-eslint/no-unnecessary-condition`
- Enable autofixes for `no-new-native-nonconstructor`
- Added `reportUsedIgnorePattern: true` to `autofix/no-unused-vars`
- Updated rule `no-fallthrough` with `{commentPattern: "/(falls?\s?through|defaults?)/i", "reportUnusedFallthroughComment": true}`
- Rule `rxjs/no-finnish` was moved from the Angular preset to the RxJS preset
- Enabled rule `testing-library/no-test-id-queries` as warning in extra-strict preset
- Angular lifecycle hook prototype methods are now checked using `@angular-eslint/require-lifecycle-on-prototype` rather than `no-restricted-syntax`
- New `no-restricted-syntax` rule to enforce naming eslint configuration objects when using `defineConfig`
- Added some custom `no-restricted-syntax` from <https://typescript-eslint.io/troubleshooting/faqs/general/#how-can-i-ban-specific-language-feature>:
  - Ban accessing `constructor.name`
  - Ban static `this`
  - Ban `const` enums. This replaces `etc/no-const-enum`

Disabled rules:

- Disabled rule `@angular-eslint/no-conflicting-lifecycle`
- Disabled rule `unicorn/better-regex`
- Dropped `eslint-plugin-etc`. All the interesting rules now have an equivalent in other plugins
- Disabled `@eslint-community/eslint-comments/no-unused-disable` rule in favor of `linterOptions.reportUnusedDisableDirectives`

### Dependency updates

#### Necessary to ensure proper ESLint v9 compatibility

- Migrated from `eslint-plugin-rxjs@^5.0.3` to `eslint-plugin-rxjs-angular-x@^0.1.0`
- Migrated from `"github:Beslogic/eslint-plugin-rxjs-angular#dist` to `eslint-plugin-rxjs-x@^0.8`
- Migrated `eslint-plugin-jest-formatting` to `eslint-plugin-jest`
- Bumped `eslint` to `^9.12`
- Bumped `eslint-plugin-jest` to `^28.8.3 || ^29.0.1`
- Bumped `eslint-plugin-sonarjs` tot `^3.0.2`
- Bumped `eslint-plugin-unicorn` to `^56.0.1`
- Bumped `eslint-plugin-react-redux` to `^4.2.0`
- Bumped `eslint-plugin-testing-library` `^7.2.0`
- Bumped `@eslint-community/eslint-plugin-eslint-comments` to `^4.3`
- Bumped `eslint-plugin-autofix` to `^2.2`
- Bumped `eslint-plugin-jsx-a11y` to `^6.10.0`
- Bumped `eslint-plugin-regexp` to `^2.3`

#### Necessary for unconditional support of new features and configs

- Bumped `eslint-plugin-no-autofix` to `^2.1`
- Bumped `@eslint/compat` to `^1.2.4 || ^2`
- Bumped `@stylistic/eslint-plugin` to `^5.3`
- Bumped `eslint-config-flat-gitignore` to `^2.1.0`
- Bumped `eslint-import-resolver-typescript` to `^4`
- Bumped `eslint-plugin-import-x` to `^4.15.1`
- Bumped `eslint-plugin-no-relative-import-paths` to `^1.5.5`
- Bumped `typescript-eslint` to `^8.35`
- Bumped `angular-eslint` to `>=19.6`
- Bumped `eslint-plugin-n` to `>=17.19`
- Bumped `eslint-plugin-react-hooks` to `^7.0.1`
- Bumped `eslint-plugin-react-prefer-function-component` to `^3.3.0 || ^4.0.1 || ^5`

## 4.3.2

- Disabled `@angular-eslint/no-host-metadata-property` as it is now the recommendation for signals. See <https://github.com/angular-eslint/angular-eslint/discussions/2303>
- Allowed `0n` as a magic value by default

## 4.3.0

- Correctly also disable `compilerOptions.emitDecoratorMetadata` when disabling `compilerOptions.experimentalDecorators` out of the box
  - Added instructions to explicitly enable both on Angular projects using experimental decorators
- Added a `tsconfig.5.6.json` TSConfig preset with `noUncheckedSideEffectImports` enabled
- Enabled `compilerOptions.resolveJsonModule` by default
- Enabled `compilerOptions.checkJS` by default
- Relaxed `prefer-arrow-functions/prefer-arrow-functions` for `**/*[.-]service.ts` files as we expected `@Injectable` to have lifecycle methods
- Disabled `@typescript-eslint/prefer-for-of` and `sonarjs/prefer-for-of` in favor of `unicorn/no-for-loop`
- Allowed `i++` in "loop afterthrought" (`for (i = 0; i < l; i++)`) for rule `autofix/no-plusplus`
- Set `@typescript-eslint/switch-exhaustiveness-check`'s `considerDefaultExhaustiveForUnions` to `false` in non-extra-strict preset
- Disabled `unicorn/no-useless-switch-case` in extra-strict preset as it and conflicts with `considerDefaultExhaustiveForUnions`
- Bumped `@stylistic/eslint-plugin` to `^2.12.0` as it fixed `jsx-wrap-multilines` breaking in the presence of comments
- Bumped `dprint` to `^0.46` to ensure .gitignore support

## 4.2.2

- Exclude `<select>` and `<textarea>` from `react/jsx-props-no-spreading` as it is very often needed for custom inputs and validation using Higher Order Components

## 4.2.1

- Exclude `<input>` from `react/jsx-props-no-spreading` as it is very often needed for custom inputs and validation using Higher Order Components

## 4.2.0

- `@typescript-eslint/no-floating-promises` is now ignored on `i18next.changeLanguage` as it is known to not throw and already `console.warn` itself
- In `extra-strict` preset, `@typescript-eslint/no-floating-promises`doesn't ignore voided promises, forcing a comment to explain
- Disabled `@typescript-eslint/no-misused-spread`:\
  Still a handful of false-positives and I couldn't get the configuration working.\
  Especially annoying with autogenerated API when spreading class instance with readonly properties as its constructor object.\
  ie: `new Myclass({...someInstance, overwritten_prop: "foo"})`\
  NOTE: If fixed, we'd still only want this in extra-strict config.

## 4.1.0

- Migrated from `eslint-plugin-import` to `eslint-plugin-import-x@^4.2.1` for performance and better support.

## 4.0.3

- Allow `^8.56 || ^9.12` for the ESLint version range. But v9 is completely untested.

## 4.0.2

### Important migration notes

- You'll have to migrate your configs to use Flat Config
  - We recommend `eslint.config.mjs` to use configs as ES Modules and be explicit about it.
  - The README has been updated with basic configuration examples
  - See <https://eslint.org/docs/latest/use/configure/migration-guide> for further help
- You can remove `--ignore-path .gitignore` from your lint command.
- `angular-eslint` won't work on HTML files on ESLint v8 due to parser configuration issues.
- Nested configuration files autodiscovery won't work until [ESLint v9.12](https://github.com/eslint/eslint/pull/18742).\
  In the mean time, you can extend your child configs in your parent with a `files` restriction.
- `@eslint-community/eslint-comments/no-unused-disable` does not currently work with Flat Configs, so unused disable comments are no longer reported.\
  See <https://github.com/eslint-community/eslint-plugin-eslint-comments/issues/244>

### Rest of the changes

- Initial support for Flat Configs. v4 will only support Flat Configs (`eslint.config.js`), please use v3 for Legacy Configs (`.eslintrc`).
- Autodetection of `.gitignore` using `eslint-config-flat-gitignore`
- Updated dependencies:
  - Using the combined `typescript-eslint` package instead of `@typescript-eslint/eslint-plugin` + `@typescript-eslint/parser`
  - Using the combined `angular-eslint` package instead of `@angular-eslint/eslint-plugin` + `@angular-eslint/eslint-plugin-template` + `@angular-eslint/template-parser`
  - Bumped `typescript-eslint` to `^8.15`
  - Bumped `angular-eslint` to `>=18.0`
  - Bumped `eslint-plugin-react-hooks` to `^5.0`
  - Bumped `eslint-plugin-react-prefer-function-component` to `^3.3.0`
  - Bumped `eslint-plugin-storybook` to `^0.10`
  - Bumped `eslint-plugin-react` to `^7.37.1`
  - Added dependency on `@eslint/compat` and `eslint-config-flat-gitignore`

## 3.2.1

- Disabled `@typescript-eslint/no-misused-spread`:\
  Still a handful of false-positives and I couldn't get the configuration working.\
  Especially annoying with autogenerated API when spreading class instance with readonly properties as its constructor object.\
  ie: `new Myclass({...someInstance, overwritten_prop: "foo"})`\
  NOTE: If fixed, we'd still only want this in extra-strict config.

## 3.2.0

- Migrated from `eslint-plugin-import` to `eslint-plugin-import-x@^4.2.1` for performance and better support.
  - This also forces `eslint` to version `8.57` or above

## 3.1.4

- Pinned `eslint-plugin-unicorn` to `>=49.0 && <57`

## 3.1.3

- Bumped `"@typescript-eslint` to `^8.15.0`
- Disabled `sonarjs/fixme-tag`
- Disabled `@typescript-eslint/no-unsafe-type-assertion` and `@typescript-eslint/related-getter-setter-pairs` in non-`extra-strict` presets.
- Added `"checkTypePredicates": true` to `@typescript-eslint/no-unnecessary-condition`
- Configured `@typescript-eslint/prefer-nullish-coalescing` as
  <!-- markdownlint-disable-next-line MD031 -->
  ```js
  [
    "error",
    {
      // > If you're looking to enforce stricter conditional tests,
      // > you should consider using the strict-boolean-expressions rule.
      "ignoreConditionalTests": true,
      "ignoreBooleanCoercion": true
    }
  ],
  ```

## 3.1.2

- Removed `globalThis` from `no-restricted-globals` as the adoption is now much wider (no more IE11) and it conflicts with `unicorn/prefer-global-this`

## 3.1.1

- Turned on `"objectLiteralTypeAssertions` to `allow-as-parameter"` as error for `@typescript-eslint/consistent-type-assertions` in extra-strict config
- Enabled `@typescript-eslint/consistent-type-assertions` (but without the "as parameter" restriction) for Jest
- Added `boolean` and `nullish` to `@typescript-eslint/restrict-template-expressions` in `extra-strict` preset.\
  If you really meant to write "true", "false", "null" or "undefined", then explicitly stringify it using `String()` (or `Intl.ListFormat` for `Array`s)
- Disabled `default-case` rule in TypeScript as it is redundant with `@typescript-eslint/switch-exhaustiveness-check` and conflicts with `unicorn/no-useless-switch-case`
- Bumped `eslint-plugin-sonarjs` to `2.0.4`
- Stopped attempting to support pre-commit.ci. Read the [`PR Autofixes`](https://github.com/Beslogic/shared-configs/blob/main/README.md#pr-autofixes) section of our Shared Configs for an explanation and alternatives.

## 3.0.2

- Made `eslint-plugin-sonarjs` optional for pre-commit.ci contexts

## 3.0.0

### Important migration points

- Remove `eslint-plugin-unused-imports` from your pre-commit configs
- Uninstall `eslint-plugin-total-functions`
- Remove the `beslogic/dprint` preset. It no longer exists and is no longer needed
- If not using dprint, please add the `beslogic/stylistic` preset
- If you prefered stricter linting, add `beslogic/extra-strict` to your presets
- If you have ``parserOptions.project` configured, try removing it.
- If you only have `tsconfig.json` files and no complex `tsconfig.*.json`, you can also try this instead:

  ```js
  /** @type {import("eslint").Linter.Config} */
  module.exports = {
    parserOptions: {
      projectService: {
        allowDefaultProject: []
      },
      // Still needed for plugins that haven't updated to typescript-eslint@8 yet
      // Namely: eslint-plugin-sonarjs
      EXPERIMENTAL_useProjectService: true
    }
  }
  ```

`eslint-plugin-sonarjs@2` added a ton of rules, a lot of which duplicates base ESLint rules and other plugins we have. _**Please report those you find**_

### Changes

#### Provided an `extra-strict` preset

- Removed `eslint-plugin-total-functions`
- Replaced rule `total-functions/no-unsafe-type-assertion` with a configured `no-autofix/@typescript-eslint/consistent-type-assertions` in the new `extra-strict` addon preset that warns on any non-param, non-unknown object cast
- Disabled `@typescript-eslint/no-invalid-this` in the `extra-strict` addon preset as we assume `"noImplicitThis": true`
- Moved the following rules to a new `extra-strict` addon preset:
  - `@typescript-eslint/no-unnecessary-boolean-literal-compare`
  - `@typescript-eslint/no-unnecessary-condition`
  - `@typescript-eslint/prefer-nullish-coalescing`
  - `etc/no-enum`
  - `no-autofix/@angular-eslint/template/i18n`
- The `typescript` preset should now work with `"strict": false` in `tsconfig.json`
- Enabled rule `arrow-body-style` to disallow using "immediate returns" in arrow functions
- Moved the `etc/no-commented-out-code` rule to the `extra-strict` preset

#### Updated to typescript-eslint v8

- Bumped `typescript-eslint` to `^8.0`
- Enabled `typescript-eslint`'s [Project Service](https://typescript-eslint.io/blog/announcing-typescript-eslint-v8#project-service). Replacing `settings.parserOptions.project = [...]` and `settings.parserOptions.deprecated__createDefaultProgram = true` in `typescript` and `angular` presets with `settings.parserOptions.projectService = true`
- Enabled `allowRegExp` for `restrict-template-expressions`
  - As of `typescript-eslint@8.6`: `Error`, `URL` and `URLSearchParams` are also allowed by default (see <https://typescript-eslint.io/rules/restrict-template-expressions/#allow>)
- Stopped using `@babel/eslint-parser` by default for Javascript presets. TypeScript projects will use the TypeScript parser from the typescript preset. Scripts don't use Babel. And we don't expect pure-JS projects to use experimental features (if they do, they can configure `@babel/eslint-parser` themselves).
- Bumped `eslint-plugin-jest` to `^28.7`
- Removed the `dprint` preset. Those stylistic rules are simply no longer enabled by default
- Created a new preset `stylistic` to allow re-enabling rules taken care of by dprint
- Migrated lots of rules from ESLint, typescript-eslint and eslint-plugin-autofix to ESLint Stylistic

#### Various

- Bumped `dprint` to `^0.47.2` to autodiscover `.dprint.jsonc`
- Bumped the minimal EcmaScript version to 2022 in ESLint and TSConfig settings
- `.eslintrc.mjs` is now treated the same as `.eslintrc.js` and `.eslintrc.cjs`
- Bumped `eslint-plugin-no-autofix` to `^2.0`
- Dropped support for node 17
- Bumped `eslint-plugin-sonarjs` to `^2.0`
  - This adds a ton of rules, including some duplicating base ESLint rules and other plugins we have. _**Please report those you find**_
- Trying out replacing the `eslint-plugin-unused-imports` plugin by `sonarjs/unused-import` rule
- Bumped `eslint-plugin-import` to `^2.30` which fixes `import/newline-after-import`'s `considerComments`+`exactCount`
- Allow single-line ternary when they fit on a single line
- Update the `operator-linebreak` rule to put the operator in front (along with an update to dprint's `operatorPosition`). Both of which default to left-side and we now aggree more with. This also aligns with our Ruff preset
- Re-enabled `react/jsx-no-leaked-render` in TypeScript (TSX) files
- Disabled crashing rules from Cartant: `rxjs/no-implicit-any-catch` and `etc/throw-error`. Please upvote:
  - <https://github.com/cartant/eslint-plugin-etc/issues/47>
  - <https://github.com/cartant/eslint-plugin-rxjs/issues/122>
  - <https://github.com/cartant/eslint-plugin-rxjs/issues/132>

## 2.4.14

- Updated pre-commit.ci documentation

## 2.4.13

- Made `eslint-import-resolver-typescript` optional since it can't correctly resolve our shared `tsconfig.json` when ran in pre-commit.ci

## 2.4.12

- Restored `regexp/prefer-d` pre-2.4 behaviour of preferring `/[\d_]/` over `/[0-9_]/`
- Disabled all the following rules when running under pre-commit.ci to avoid false-positives due to missing types:
  - `@typescript-eslint/no-redundant-type-constituents`
  - `@typescript-eslint/no-unnecessary-condition`
  - `@typescript-eslint/no-unsafe-argument`
  - `@typescript-eslint/no-unsafe-member-access`
  - `@typescript-eslint/no-unsafe-return`
  - `@typescript-eslint/prefer-optional-chain`
  - `unicorn/no-useless-undefined`

## 2.4.11

- Changed `total-functions/no-partial-division` to be a warning

## 2.4.8

- Go back to explicit `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` dependencies instead of `typescript-eslint` due to <https://github.com/danielnixon/eslint-plugin-total-functions/issues/477#issuecomment-2327088201>

## 2.4.7

- No longer recommending to explicitly annotate void returning awaitable arrow functions as `(param): void => { statement }` in JavaScript

## 2.4.6

- Replaced `@typescript-eslint/*` with `typescript-eslint`
- Loosened rules requiring `strictNullChecks` if `eslint-plugin-total-functions` isn't also installed

## 2.4.5

- Include documentation about usage with `.pre-commit-config.yaml`/`pre-commit.ci`
- Allow omitting `esling-plugin-no-autofix`, `eslint-plugin-jest`, `eslint-plugin-jest-formatting` and `eslint-plugin-etc` for `.pre-commit-config.yaml`/`pre-commit.ci`
- `pre-commit.ci` run will always assume the following are not installed to save on space:
  - `eslint-plugin-total-functions`
  - `esling-plugin-no-autofix`
  - `eslint-plugin-testing-library`
  - `eslint-plugin-jest-formatting`
  - `eslint-plugin-jest`
  - `eslint-plugin-etc`
- Moved `eslint-plugin-angular-file-naming` to `optionalDependencies`
- Moved `eslint-plugin-testing-library` to `dependencies`
- Bumped `eslint-plugin-unused-imports` to `^3.2.0` to fix error with `@typescript-eslint@7.8`
- Don't check for camelcase properties in eslint config files
- Turn on `prefer-arrow-functions/prefer-arrow-functions` autofixing for `singleReturnOnly`

## 2.3.2

- Added "data-service", "interceptor" and "guard" as valid suffix for `angular-file-naming/service-filename-suffix`

## 2.3.1

- Fixed the following error when parsing `typescript` config:\
  `Configuration for rule "@typescript-eslint/prefer-string-starts-ends-with" is invalid: Value true should be string.`
- Added `no-restricted-syntax` rules to ensure that Angular optional dependencies are marked as optional in TypeScript and vice-versa
- Fixed Storybook custom `.ts` configuration not being applied
- Disabled `autofix/indent-legacy`

<!-- TODO: Validate that static-tests are not published -->

## 2.3.0

- Allow single element equality for `@typescript-eslint/prefer-string-starts-ends-with`
- Disabled `unicorn/prefer-string-raw` for json-like and eslintrc.json
- Set tsconfig's `angularCompilerOptions.enableI18nLegacyMessageIdFormat` to `false`
- Set tsconfig's `compilerOptions.target` to `"ES2022"`\
  For more details, see [this `@angular/cli` warning](https://github.com/angular/angular-cli/blob/16.2.0/packages/angular_devkit/build_angular/src/tools/webpack/plugins/typescript.ts#L36-L39)
- Presets for Jest now consider the framework (Angular, React, or DOM)
- Updated Jest file matching to Jest's default patterns
- No longer leaving empty strings for eslint extends generated by NX
- Fixed an invalid syntax for `@nx/js` patching

## 2.2.1

- Bumped `eslint-plugin-react` to `^7.33`
  - Check context objects with `react/display-name`
  - Added React 18 deprecations
- Remove accidental recommendation to install `eslint-plugn-react-redux` from non-redux presets in `README.md`
- Now enforce at least 1 newline after imports even with dprint preset
- Turn on `allowImplicit`, `checkForEach`, and `allowVoid` for rule `array-callback-return`
- Bumped `eslint-plugin-total-functions` to `>=6.0`
  - which bumps `typescript` dependency to `4.7.3`
- Bumped `eslint-plugin-testing-library` to `^6.0` which enables a lot more rules by default
- Bumped `eslint-plugin-unicorn` to `>=49.0`
  - Re-enabled `prefer-event-target` in Angular preset
  - Disabled deprecated `unicorn/no-unsafe-regex`
  - Start checking arguments again for `unicorn/no-useless-undefined` now that it can also autofix `undefined` defaults to optional parameters
- Re-enabled `unicorn/no-nested-ternary`, which allows a single nested level if parenthesised
- Bumped `eslint-plugin-sonarjs` to `^1.0`
  - Updated vulnerable dependencies
  - They updated their license
- Bumped `eslint-plugin-simple-import-sort` to `>=12.0`
- Bumped `eslint-plugin-regexp` to `^2.0`
  - Reduced dependencies
  - Removal of deprecated rules: <https://github.com/ota-meshi/eslint-plugin-regexp#removed>
- Bumped `eslint-plugin-jest` to `^28.0.0`
  - `jest/no-if` has been replaced by `jest/no-conditional-in-test`
  - `jest/prefer-importing-jest-globals` is enabled by default, which removes needing a dependency on often outdated `@types/jest` and removes the need for `types: ["jest"]` in `tsconfig.json`
- Bumped `dprint` to `^0.40.2` to prepare for process plugins
- Bumped `@typescript-eslint/eslint-plugin` to `^7.4`
  - Re-enabled `@typescript-eslint/no-import-type-side-effects` and set `@typescript-eslint/consistent-type-imports` back to default options
  - Bumped `eslint` to `^8.56`
  - which bumps `typescript` dependency to `4.7.5`
- Prefered `@typescript-eslint/prefer-destructuring` over `autofix/prefer-destructuring`
- Disabled `@typescript-eslint/key-spacing`, `autofix/func-call-spacing`, and `lines-around-comment` in `dprint` preset
- Patched-out prettier from nx generators
- Used Search&Replace based package patching:
  - Removes `patch-package` from dependencies
  - Removes bundled git patches
- Speedup check for `eslint-plugin-total-functions` install
- Bumped `eslint-plugin-n` to `>=16.2`. Notably, this:
  - improves support for ts-node
  - Updates documentation links
  - Sets Node 16 as the minimal default w/o having to configure `engines` in `package.json`
  - Allow for automatic ts mapping detection
- Re-enabled `n/no-unpublished-*` rules by default as it's now based on package being public/private
- Set `ignoreTypeImport: true` by default for `n/no-unpublished-import`

## 2.1.0

- Bumped the following minimum versions:
  - `@angular-eslint/eslint-plugin@>=16.2`
  - `@angular-eslint/eslint-plugin-template@>=16.2`
  - `@angular-eslint/template-parser@>=16.2`
  - `@typescript-eslint/eslint-plugin@^6.2`
  - `eslint-plugin-jest@^27.2.3`
  - `eslint-plugin-unused-imports@^3.0`
  - Assuming `node>=16`, `typescript>=4.5` and `@angular/compiler>=16.2.5`
  - This should speedup config parsing that had to check for specific versions
- Made `eslint-plugin-total-functions` optional due to its extra-strictness and it had to be explicitly specified anyway due to version resolution issues
- Added link to changelog in README
- Improved detection of installed peer dependencies' version number to be more accurate and faster

## 2.0.2

- Disabled the following rules in Storybook stories:
  - `@angular-eslint/component-max-inline-declarations`
  - `angular-file-naming/component-filename-suffix`
- Fixed rule to detect using public non-readonly arrow function properties in Components and Directives with Storybook
- Clarified that `beslogic/storybook` preset should be added to Angular project as well

## 2.0.0

- Created `CHANGELOG.md`
- Changed the maximum line length from `120` to `100`
- Split language-specific `editor.defaultFormatter` to work around <https://github.com/microsoft/vscode/issues/168411>
