eslint-plugin-react-x 5.28.0 → 5.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -10
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -135,7 +135,7 @@ const rules$6 = {
|
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region package.json
|
|
137
137
|
var name$6 = "eslint-plugin-react-x";
|
|
138
|
-
var version = "5.28.
|
|
138
|
+
var version = "5.28.2";
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region src/utils/create-rule.ts
|
|
141
141
|
function getDocsUrl(ruleName) {
|
|
@@ -205,7 +205,7 @@ const rule$1 = {
|
|
|
205
205
|
docs: {
|
|
206
206
|
description: "Verifies the list of dependencies for Hooks like 'useEffect' and similar.",
|
|
207
207
|
recommended: true,
|
|
208
|
-
url: "https://github.com/
|
|
208
|
+
url: "https://github.com/react/react/issues/14920"
|
|
209
209
|
},
|
|
210
210
|
fixable: "code",
|
|
211
211
|
hasSuggestions: true,
|
|
@@ -2216,7 +2216,7 @@ var no_create_ref_default = createRule({
|
|
|
2216
2216
|
meta: {
|
|
2217
2217
|
type: "suggestion",
|
|
2218
2218
|
docs: { description: "Disallows 'createRef' in function components and Hooks." },
|
|
2219
|
-
messages: { default: "
|
|
2219
|
+
messages: { default: "Use 'useRef' instead of 'createRef' in function components and Hooks." },
|
|
2220
2220
|
schema: []
|
|
2221
2221
|
},
|
|
2222
2222
|
name: "no-create-ref",
|
|
@@ -2605,7 +2605,7 @@ function create$27(context) {
|
|
|
2605
2605
|
var no_missing_component_display_name_default = createRule({
|
|
2606
2606
|
meta: {
|
|
2607
2607
|
type: "suggestion",
|
|
2608
|
-
docs: { description: "Enforces that
|
|
2608
|
+
docs: { description: "Enforces that anonymous components wrapped in 'memo' or 'forwardRef' have a 'displayName' that can be used in DevTools." },
|
|
2609
2609
|
messages: { default: "Add missing 'displayName' for component." },
|
|
2610
2610
|
schema: []
|
|
2611
2611
|
},
|
|
@@ -2981,8 +2981,8 @@ function create$22(context) {
|
|
|
2981
2981
|
var no_nested_lazy_component_declarations_default = createRule({
|
|
2982
2982
|
meta: {
|
|
2983
2983
|
type: "problem",
|
|
2984
|
-
docs: { description: "Disallows
|
|
2985
|
-
messages: { default: "Do not declare lazy components inside other components or hooks. Instead, always declare them at the top level of your module." },
|
|
2984
|
+
docs: { description: "Disallows declaring lazy components that wrap dynamic imports inside other components or hooks." },
|
|
2985
|
+
messages: { default: "Do not declare lazy components that wrap dynamic imports inside other components or hooks. Instead, always declare them at the top level of your module." },
|
|
2986
2986
|
schema: []
|
|
2987
2987
|
},
|
|
2988
2988
|
name: "no-nested-lazy-component-declarations",
|
|
@@ -3219,7 +3219,7 @@ function getHumanReadableKind$1(node) {
|
|
|
3219
3219
|
var no_unstable_context_value_default = createRule({
|
|
3220
3220
|
meta: {
|
|
3221
3221
|
type: "problem",
|
|
3222
|
-
docs: { description: "Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'." },
|
|
3222
|
+
docs: { description: "Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider' or the '<Context>' shorthand in React 19 and above." },
|
|
3223
3223
|
messages: { "unstable-context-value": "A/an '{{kind}}' passed as the value prop to the context provider should not be constructed. It will change on every render. {{suggestion}}" },
|
|
3224
3224
|
schema: []
|
|
3225
3225
|
},
|
|
@@ -3401,7 +3401,7 @@ var no_unused_class_component_members_default = createRule({
|
|
|
3401
3401
|
meta: {
|
|
3402
3402
|
type: "suggestion",
|
|
3403
3403
|
docs: { description: "Warns about unused class component methods and properties." },
|
|
3404
|
-
messages: { default: "Unused method or property '{{methodName}}'
|
|
3404
|
+
messages: { default: "Unused method or property '{{methodName}}' of class '{{className}}'." },
|
|
3405
3405
|
schema: []
|
|
3406
3406
|
},
|
|
3407
3407
|
name: "no-unused-class-component-members",
|
|
@@ -4117,7 +4117,7 @@ function resolveBuiltinObjectName(context, node, seen = /* @__PURE__ */ new Set(
|
|
|
4117
4117
|
var purity_default = createRule({
|
|
4118
4118
|
meta: {
|
|
4119
4119
|
type: "problem",
|
|
4120
|
-
docs: { description: "Validates that components and hooks are pure by checking that they do not call known-impure functions during render." },
|
|
4120
|
+
docs: { description: "Validates that components and hooks are pure by checking that they do not call known-impure functions or construct known-impure objects during render." },
|
|
4121
4121
|
messages: { default: "Do not call '{{name}}' during render. Components and hooks must be pure. Move this call into an event handler, effect, or state initializer." },
|
|
4122
4122
|
schema: []
|
|
4123
4123
|
},
|
|
@@ -7349,7 +7349,7 @@ function inferViolations(context, facts) {
|
|
|
7349
7349
|
var use_memo_default = createRule({
|
|
7350
7350
|
meta: {
|
|
7351
7351
|
type: "problem",
|
|
7352
|
-
docs: { description: "Validates
|
|
7352
|
+
docs: { description: "Validates 'useMemo' usage: the result must be used and the callback must take no parameters, not be async or a generator, not reassign outer variables, and return a value." },
|
|
7353
7353
|
messages: {
|
|
7354
7354
|
"must-return-a-value": "useMemo() callbacks must return a value.\n\nThis useMemo() callback doesn't return a value. useMemo() is for computing and caching values, not for arbitrary side effects.",
|
|
7355
7355
|
"no-async-or-generator-functions": "useMemo() callbacks may not be async or generator functions.\n\nuseMemo() callbacks are called once and must synchronously return a value.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "5.28.
|
|
3
|
+
"version": "5.28.2",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@eslint-react/ast": "5.28.
|
|
40
|
-
"@eslint-react/core": "5.28.
|
|
41
|
-
"@eslint-react/eslint": "5.28.
|
|
42
|
-
"@eslint-react/jsx": "5.28.
|
|
43
|
-
"@eslint-react/shared": "5.28.
|
|
44
|
-
"@eslint-react/var": "5.28.
|
|
39
|
+
"@eslint-react/ast": "5.28.2",
|
|
40
|
+
"@eslint-react/core": "5.28.2",
|
|
41
|
+
"@eslint-react/eslint": "5.28.2",
|
|
42
|
+
"@eslint-react/jsx": "5.28.2",
|
|
43
|
+
"@eslint-react/shared": "5.28.2",
|
|
44
|
+
"@eslint-react/var": "5.28.2",
|
|
45
45
|
"@typescript-eslint/scope-manager": "^8.71.2",
|
|
46
46
|
"@typescript-eslint/types": "^8.71.2",
|
|
47
47
|
"@typescript-eslint/typescript-estree": "^8.71.2",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"@types/react": "^19.3.0",
|
|
62
62
|
"@types/react-dom": "^19.3.0",
|
|
63
63
|
"dedent": "^1.7.2",
|
|
64
|
-
"eslint": "^10.
|
|
64
|
+
"eslint": "^10.13.0",
|
|
65
65
|
"react": "^19.3.1",
|
|
66
66
|
"react-dom": "^19.3.1",
|
|
67
67
|
"tsdown": "^0.23.1",
|
|
68
68
|
"tsl": "^1.0.30",
|
|
69
|
-
"tsl-dx": "^0.
|
|
69
|
+
"tsl-dx": "^0.15.0",
|
|
70
70
|
"typescript": "6.0.3"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|