- 064c5fb: Fixes for new eslint config
- Dep bumps changes, including
||=
→??=
- Run react checks on
js
andts
files too (e.g. for custom hooks).
- Updates eslint to v9.14.0 as it updates
@eslint/plugin-kit
v0.2.3 with a security fix.
react-hooks/exhaustive-deps
is now an error
(rather than warn
).
This means that if a hook that takes an array of deps is not passed all the deps it needs, linting will fail.
- Fix missing types issue.
Adds the recommended
config of eslint-plugin-react-hooks
when linting jsx
, mjsx
, tsx
and mtsx
files.
- Updates deps
- Rejig
@eslint-community/eslint-plugin-eslint-comments
config
- Replaces
eslint-plugin-eslint-comments
with@eslint-community/eslint-plugin-eslint-comments
- Bumps other dependencies
This is pre-release that requires ESLint 9.
It should be feature complete, but this release is to allow for feedback and testing.
It replaces both @guardian/eslint-config@9
and @guardian/eslint-config-typescript@12
with a single package.
It also includes configs for jest
, storybook
and react
.
See the README for full details.
ESLint 9 contains a lot of breaking changes, including a new config format. See their migration guide for more details.
Note that ESLint 8 is EOL 2024-10-05.
-
80eea1d: ## Update packages to use
- "@typescript-eslint/eslint-plugin": "8.1.0",
- "@typescript-eslint/parser": "8.1.0",
- "@stylistic/eslint-plugin": "2.6.2",
- "eslint": "8.57.0",
- 0382052: 1. All packages are now ES modules, although they should be compatible with CommonJS environments. 2. Adds
entry points for projects that can consume
package.json#exports
, alongsidemain
.
-
cc7aa7d: Requires curly braces in all circumstances.
This should help reduce noise in diffs, and remove ambiguity about when you should use curly braces (and possibly when a block starts and ends), especially for people unfamiliar with the language.
Note that this rule is fixable, so running eslint with the
--fix
flag will automatically update your code to comply with the new setting.
-
225e542: Dependencies updates:
@typescript-eslint/eslint-plugin
from 6.14.0 to 6.18.0@typescript-eslint/parser
from 6.14.0 to 6.18.0
- Update TS to version 5.3.3 and tslib to 2.6.2
- 9e0cb43:
@typescript-eslint/eslint-plugin
and@typescript-eslint/parser
dependencies upgraded to next major version (6).
- 6bb3297: Updates ESLint to latest version to fix security vulnerability in
word-wrap
dependency
- a135875: Bump eslint-config-prettier from 8.5.0 to 8.8.0
- Update Typescript to v5.1.3 and tslib to v2.5.3
- c6366dd: Add
tslib@^2.4.1
to peerDependencies
- 0f81c66: Fix incorrect output directories
- f04d503: Update @rollup/plugin-node-resolve to v14
- 8f3ed43: Configures
import/no-cycle
to ignore external modules, decreasing the time it takes to lint a project.
-
0f0888d: tl;dr
- linting for conformance with our
prettier
config is slow - to speed up linting, we will stop doing that
- you should use
prettier
directly
We extended
plugin:prettier/recommended
which- used
eslint-config-prettier
to disable any white-space formatting rules that would conflict with our prettier config - used
eslint-plugin-prettier
to lint for formatting errors that did not match our prettier config
This is quite expensive, and although it means you could use
--fix
to apply prettier, it's not as fast as using prettier directly.We still use
eslint-config-prettier
to avoid conflicts with ourprettier
config, but we no longer lint for errors (and therefore also don't fix them).Your project should handle
prettier
formatting in another way, e.g.- via editor integration
- via a pre-commit hook
If you prefer the way this used to work (applying
prettier
formatting as part of linting), add the eslint-plugin-prettier manually to your ESLint config. - linting for conformance with our
- 73631d3: Update readme links