Skip to content

Commit 1bfe1a0

Browse files
committed
refactor: deprecate no-implicit-key and no-complicated-conditional-rendering
1 parent fe931fe commit 1bfe1a0

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
- Rule `no-class-component` rule now allows class components with a `componentDidCatch` method (Thanks to [@christopher-buss](https://github.com/christopher-buss)).
66
- Settings `reactOptions` now supports `importSource` to specify the import source for React (Thanks to [@christopher-buss](https://github.com/christopher-buss)).
77

8+
### 🗑️ Deprecations
9+
10+
- Deprecate rule `no-implicit-key` because it is stylistic and opinionated.
11+
- Deprecate rule `no-complicated-conditional-rendering` because it is stylistic and opinionated.
12+
813
### 🪄 Improvements
914

1015
- Refactor React pragma and import name retrieval utils to support custom import source.
11-
- Refactor rule `no-complicated-conditional-rendering`'s detection logic, make it more accurate.
1216
- Update `@typescript-eslint`'s packages to `7.8.0`.
1317

1418
## v1.5.10 (Sun 28 Apr 2024)

packages/plugins/eslint-plugin-react-core/src/rules/no-complicated-conditional-rendering.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type MessageID = ConstantCase<typeof RULE_NAME>;
1010
export default createRule<[], MessageID>({
1111
meta: {
1212
type: "problem",
13+
deprecated: true,
1314
docs: {
1415
description: "disallow complicated conditional rendering",
1516
requiresTypeChecking: true,

packages/plugins/eslint-plugin-react-core/src/rules/no-implicit-key.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type MessageID = ConstantCase<typeof RULE_NAME>;
1414
export default createRule<[], MessageID>({
1515
meta: {
1616
type: "problem",
17+
deprecated: true,
1718
docs: {
1819
description: "disallow spreading 'key' from objects.",
1920
recommended: "recommended",

website/pages/rules/no-complicated-conditional-rendering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-complicated-conditional-rendering
1+
# no-complicated-conditional-rendering (Deprecated)
22

33
## Rule category
44

website/pages/rules/no-implicit-key.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# no-implicit-key
1+
# no-implicit-key (Deprecated)
22

33
## Rule category
44

0 commit comments

Comments
 (0)