- Add
import-x/export
as a new lint rule. (#160) This fails on repeated exports of names or defaults.
-
Upgrade
eslint-plugin-react-hooks
to version 5, removing the need for@eslint/compat
. (#155)eslint-plugin-react-hooks
contains some minor rule changes. Refer to the release notes for more information.
- Prioritise
eslint-config-prettier
overrides over the base rules (#152)
- Define plugins without
file
scopes, to allow for improved extensibility (#149)
-
Some language options have been restored to defaults: (#145)
sourceType
is now set to the default ofmodule
(previouslyscript
in some scenarios).ecmaVersion
is now set to the default oflatest
(previously2022
and6
)- Babel has been removed
-
Replace
eslint-plugin-import
witheslint-plugin-import-x
(#145)To migrate, any references to
eslint-plugin-import
should be replaced witheslint-plugin-import-x
, andimport/
rules withimport-x/
.In addition, it's possible that this may introduce slight behaviour changes.
-
Require TypeScript peer dependency >=5.5.4 (#145)
-
Migrate to ESLint 9,
@typescript-eslint
8. (#145)These changes may affect your project setup if you are customising your ESLint configuration. See the individual migration guides:
- https://eslint.org/docs/latest/use/migrate-to-9.0.0
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8
In addition, through these major upgrades, some lint rules have changed or have been renamed. You will likely need to autofix and/or adjust your code after running ESLint.
As part of this migration, this project has migrated to Flat ESLint configuration. Read the migration guide: https://eslint.org/docs/latest/use/configure/migration-guide.
-
Upgrade a number of dependencies. These should have no/minimal impact. (#145)
eslint-plugin-cypress
eslint-config-prettier
eslint-plugin-jest
eslint-plugin-react
,eslint-plugin-react-hooks
- Update and unpin
eslint-import-resolver-typescript
dependency (#143)
-
Adds no-fallthrough as an error. (#135) This disallows fallthrough of case statements in switch statements.
You need to add a
break
,return
orthrow
to each case. You can also skip this rule if it is intentionally absent (however that is a rare scenario).switch (name) { case 'John': console.log('Hi John'); + break; }
-
Disable
@typescript-eslint/consistent-type-definition
rule (#139) -
Revert from
@finsit/eslint-plugin-cypress
back toeslint-plugin-cypress
(#141)The official plugin now supports ESLint v8. Consumers that were overriding
@finsit/cypress/*
rules will need to overridecypress/*
rules instead.
-
Upgrade Typescript Eslint to 7.2.0 to support Typescript 5.4. (#136)
This bumps the minimum required versions of Node.js to 18.18.0, Eslint to 8.56.0 and Typescript to 4.7.5 due to a breaking change introduced by Typescript Eslint in 7.0.0.
-
Prevents the new curly-brace-presence rule from affecting children. (#133)
In the previous version, react/jsx-curly-brace-presence was added to the eslint rules. This was primarily intended to catch unnecessarily using braces around string props.
- <Stack space={'medium'}> + <Stack space="medium">
Because of the configuration we provided, this had the unintended side effect of removing curly braces inside child text that were being used to prevent the unescaped entities rule.
- <Text>The available props are {'"up"'} and {'"down"'}</Text> + <Text>The available props are "up" and "down"</Text> // This is now an unescaped entity error
To fix this, the curly brace rule will now ignore children, and only alert on prop values.
-
Adds react/jsx-curly-brace-presence as an error. (#130) This removes unnecessary braces around strings in props and children.
It also enforces braces around expressions in props and children.
// Unecessary braces around string prop - <Column width={'content'}> + <Column width="content">
// Unecessary braces around string child - <Text>{'Hello'}</Text> + <Text>Hello</Text>
// Mandatory braces around prop expression - <Button icon=<IconSearch />> + <Button icon={<IconSearch />}>
- Fix array-type rule (#128)
-
Bump up typescript-eslint monorepo to ^6.0.0. (#125)
This requires eslint 7+.
This change also includes a number of rule changes to the default configuration. Read the release notes for more information.
- Add a temporary override until everybody removes the
React
import (#122)
- Extend
react/jsx-runtime
, since we are now using the JSX transform (#118)
-
Update dependencies (#120)
-
Disable resolving
node_modules
from the root of the repo. This is problematic for JavaScript-only monorepos (where there are multiplenode_modules
directories). (#119) -
Add a workaround for TypeScript-ESLint slowness with TypeScript 5.1 (#117)
-
Remove autofix for custom
unsafe-to-chain-command
rule (#115)The autofix for this rule didn't exactly adhere to the recommendation in the cypress docs, and would've required additional complexity and user-configuration to do so, so the decision was made to remove it.
- Add autofix for custom
unsafe-to-chain-command
rule (#113)
- Fix broken custom eslint rule (#111)
- Replace
eslint-plugin-cypress
with the@finsit/eslint-plugin-cypress
fork that supports ESLint v8. (#106) Consumers that were overridingcypress/*
rules will need to override@finsit/cypress/*
rules instead.
-
Move the Babel React preset parser option from the "base" configuration to the "default" configuration. (#103)
This update contains no functional changes to the "default" configuration.
-
Export extensions linted by the config (#101)
They are now available under the
/extensions
entry point:const { js, ts } = require('eslint-config-seek/extensions'); // js: ['js', 'cjs', 'mjs', 'jsx'] // ts: ['ts', 'cts', 'mts', 'tsx']
- Fix resolution of
@babel/preset-react
(#100)
- Update parserOptions.project for TypeScript files to be
true
. (#98)
- Add additional rules enforcing consistent type imports/exports (#96)
-
Split config into default (current) and base (without a React dependency). (#94)
Without React support:
{ "extends": "seek/base" }
With React support:
{ "extends": "seek" }
- Enable linting for more extensions:
.cjs
,.mjs
,.cts
,.mts
(#90)
- Update dependencies (#91)
- Dependency bumps (Babel, ESLint, TypeScript) (#88)
- Allow the
cypress
folder to be nested (#86)
-
Enhanced TypeScript support for
eslint-plugin-import
viaeslint-import-resolver-typescript
(#81)This means you can:
import
/require
files with extension.cts
/.mts
/.ts
/.tsx
/.d.cts
/.d.mts
/.d.ts
- Use
paths
defined intsconfig.json
- Prefer resolving
@types/*
definitions over plain.js
/.jsx
- Multiple tsconfigs support just like normal (i.e. in a monorepo)
imports/exports
fields support inpackage.json
-
Fixed TypeScript support for
eslint-plugin-import
(#81)Some rules provided by
eslint-plugin-import
(e.g.import/no-duplicates
,import/order
) don't work or work incorrectly without it.Before — passes:
import { ComponentDocs as InternalComponentDocs } from '@monorepo/docs'; import braidSnippets from 'braid-design-system/lib/playroom/snippets'; import { Snippets } from 'playroom'; import reactElementToJsxString from 'react-element-to-jsx-string';
After — correctly identifies
@monorepo/docs
as internal (as defined in sku) and moves it after the external imports:import braidSnippets from 'braid-design-system/lib/playroom/snippets'; import { Snippets } from 'playroom'; import reactElementToJsxString from 'react-element-to-jsx-string'; import { ComponentDocs as InternalComponentDocs } from '@monorepo/docs';
-
Upgrade dependencies (#81)
-
eslint-plugin-jest 27 (#79)
This major release includes breaking changes. See the release note for more information.
The
jest/no-alias-methods
rule is now enforced to discourage usage of alias methods that will be removed in Jest 30.- .toBeCalled() + .toHaveBeenCalled()
-
Support ESLint 8.x (#73)
We've upgraded the parsers and plugins bundled in
eslint-config-seek
for ESLint 8.x compatibility. Some linting rules have changed and may require manual triage. In particular, we've applied the following major upgrades:-
This includes changes to the recommended rule set.
-
babel-eslint
→@babel/eslint-parser
This resolves the following installation warning:
babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
-
This unifies on a single
prettier
config.
eslint-plugin-cypress
is currently incompatible with ESLint 8.x. Projects that utilise Cypress should remain on ESLint 7.x. -
-
Turn off
no-return-await
(#74)return await
produces richer stack traces with a marginal performance penalty in recent Node.js versions. This tradeoff is now left to individual consumers to weigh up and optionally enforce.
-
Remove support for Flow (#64)
SEEK has aligned on TypeScript for static type checking. Flow support was similarly removed in sku 11.
Affected projects should migrate to TypeScript.
-
Remove support for CSS Modules (#64)
eslint-plugin-css-modules is unmaintained, and SEEK has since moved on to vanilla-extract.
Affected projects should migrate to vanilla-extract.
- Detect the react version (#68)