Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update various eslint plugins (#40437)
Notable changes include: * `@typescript-eslint/ban-types` is split into some other rules, particularly `@typescript-eslint/no-unsafe-function-type`. * `@typescript-eslint/no-unused-vars` now detects when a variable is only used by `typeof`, which can often be replaced. * `@typescript-eslint/no-unused-vars` now flags `} catch ( e ) {` where the `e` isn't used in the catch block, as `} catch {` is allowed since ES2019. * `@typescript-eslint/no-empty-object-type` by default now flags `interface Foo extends Bar {}`. Update the config to turn that back off. * New rule `@typescript-eslint/no-require-imports` needs to be disabled for `.cjs` files. * New rule `@typescript-eslint/no-unused-expressions` can replace `no-unused-expressions` even for JS files, so let's do that to avoid having to separately configure both with `allowShortCircuit` and `allowTernary`. Also, added a pnpmfile hack so `@wordpress/eslint-plugin` won't bring in an older version of `@typescript-eslint/parser`. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12148571247 Upstream-Ref: Automattic/jetpack@8e1d185
- Loading branch information