Skip to content

Commit b7acc3c

Browse files
committed
refactor: optimize error messages
1 parent d18f3bc commit b7acc3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+104
-106
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
### 🪄 Improvements
44

5-
- Optimize error messages.
6-
- Improve descriptions of rule `no-implicit-key`.
5+
- Optimize error messages of rules.
76
- Update `@typescript-eslint`'s packages to `7.7.0`.
87

98
## v1.5.8 (Thu 11 Apr 2024)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.9-beta.2
1+
1.5.9-next.3

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "1.5.9-beta.2",
3+
"version": "1.5.9-next.3",
44
"private": true,
55
"description": "A series of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
66
"keywords": [
@@ -69,7 +69,7 @@
6969
"cspell": "8.7.0",
7070
"dedent": "1.5.3",
7171
"dprint": "0.45.1",
72-
"effect": "3.0.2",
72+
"effect": "3.0.3",
7373
"eslint": "9.0.0",
7474
"eslint-config-flat-gitignore": "0.1.5",
7575
"eslint-plugin-eslint-comments": "3.2.0",

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/core",
3-
"version": "1.5.9-beta.2",
3+
"version": "1.5.9-next.3",
44
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {
@@ -54,6 +54,6 @@
5454
"short-unique-id": "5.0.3"
5555
},
5656
"devDependencies": {
57-
"effect": "3.0.2"
57+
"effect": "3.0.3"
5858
}
5959
}

packages/plugins/eslint-plugin-react-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-core",
3-
"version": "1.5.9-beta.2",
3+
"version": "1.5.9-next.3",
44
"description": "ESLint React's ESLint plugin for React related rules.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {
@@ -58,7 +58,7 @@
5858
"ts-api-utils": "1.3.0"
5959
},
6060
"devDependencies": {
61-
"effect": "3.0.2"
61+
"effect": "3.0.3"
6262
},
6363
"peerDependencies": {
6464
"@typescript-eslint/parser": ">=7.5.0",

packages/plugins/eslint-plugin-react-core/src/rules/ensure-forward-ref-using-ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createRule<[], MessageID>({
1919
requiresTypeChecking: false,
2020
},
2121
messages: {
22-
ENSURE_FORWARD_REF_USING_REF: "'forwardRef' is used with this component but no 'ref' parameter is set.",
22+
ENSURE_FORWARD_REF_USING_REF: "A 'forwardRef' is used with this component but no 'ref' parameter is set.",
2323
},
2424
schema: [],
2525
},

packages/plugins/eslint-plugin-react-core/src/rules/no-access-state-in-setstate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default createRule<[], MessageID>({
5757
requiresTypeChecking: false,
5858
},
5959
messages: {
60-
NO_ACCESS_STATE_IN_SETSTATE: "Do not access 'this.state' within 'setState', use 'setState' callback instead.",
60+
NO_ACCESS_STATE_IN_SETSTATE: "Do not access 'this.state' within 'setState'. Use 'setState' callback instead.",
6161
},
6262
schema: [],
6363
},

packages/plugins/eslint-plugin-react-core/src/rules/no-children-prop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createRule<[], MessageID>({
1919
requiresTypeChecking: false,
2020
},
2121
messages: {
22-
NO_CHILDREN_PROP: "Children should always be actual children, not passed in as a prop.",
22+
NO_CHILDREN_PROP: "Do not pass children as props.",
2323
},
2424
schema: [],
2525
},

packages/plugins/eslint-plugin-react-core/src/rules/no-component-will-mount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default createRule<[], MessageID>({
2525
requiresTypeChecking: false,
2626
},
2727
messages: {
28-
NO_COMPONENT_WILL_MOUNT: "'componentWillMount' is deprecated, use 'UNSAFE_componentWillMount' instead.",
28+
NO_COMPONENT_WILL_MOUNT: "[Deprecated] Use 'UNSAFE_componentWillMount' instead.",
2929
},
3030
schema: [],
3131
},

packages/plugins/eslint-plugin-react-core/src/rules/no-component-will-receive-props.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export default createRule<[], MessageID>({
2525
requiresTypeChecking: false,
2626
},
2727
messages: {
28-
NO_COMPONENT_WILL_RECEIVE_PROPS:
29-
"'componentWillReceiveProps' is deprecated, use 'UNSAFE_componentWillReceiveProps' instead.",
28+
NO_COMPONENT_WILL_RECEIVE_PROPS: "[Deprecated] Use 'UNSAFE_componentWillReceiveProps' instead.",
3029
},
3130
schema: [],
3231
},

0 commit comments

Comments
 (0)