Releases: seek-oss/eslint-config-seek
v13.1.0
Minor Changes
-
Adds no-fallthrough as an error. (#135)
This disallows fallthrough of case statements in switch statements.Examples
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; }
Patch Changes
-
Disable
@typescript-eslint/consistent-type-definition
rule (#139) -
Revert from
@finsit/eslint-plugin-cypress
back toeslint-plugin-cypress
The official plugin now supports ESLint v8. Consumers that were overriding
@finsit/cypress/*
rules will need to overridecypress/*
rules instead.
v13.0.0
v12.1.1
Patch Changes
-
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.
v12.1.0
Minor Changes
-
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.
Examples
// 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 />}>
v12.0.1
v12.0.0
Major Changes
-
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.
v11.3.1
v11.3.0
Minor Changes
- Extend
react/jsx-runtime
, since we are now using the JSX transform (#118)
Patch Changes
v11.2.1
Patch Changes
-
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.