eslint-plugin-react-x 1.51.4-beta.0 → 1.52.0-beta.0
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 +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -142,7 +142,7 @@ var settings3 = {
|
|
|
142
142
|
|
|
143
143
|
// package.json
|
|
144
144
|
var name4 = "eslint-plugin-react-x";
|
|
145
|
-
var version = "1.
|
|
145
|
+
var version = "1.52.0-beta.0";
|
|
146
146
|
var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("x"));
|
|
147
147
|
|
|
148
148
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -1863,6 +1863,7 @@ var no_missing_context_display_name_default = createRule({
|
|
|
1863
1863
|
description: "Enforces that all contexts have a `displayName` which can be used in devtools.",
|
|
1864
1864
|
[Symbol.for("rule_features")]: RULE_FEATURES33
|
|
1865
1865
|
},
|
|
1866
|
+
fixable: "code",
|
|
1866
1867
|
messages: {
|
|
1867
1868
|
noMissingContextDisplayName: "Add missing 'displayName' for context."
|
|
1868
1869
|
},
|
|
@@ -1900,7 +1901,9 @@ function create33(context) {
|
|
|
1900
1901
|
if (!hasDisplayNameAssignment) {
|
|
1901
1902
|
context.report({
|
|
1902
1903
|
messageId: "noMissingContextDisplayName",
|
|
1903
|
-
node: id
|
|
1904
|
+
node: id,
|
|
1905
|
+
fix: id.type === types.AST_NODE_TYPES.Identifier && id.parent === call.parent ? (fixer) => fixer.insertTextAfter(call, `
|
|
1906
|
+
${id.name}.displayName = ${JSON.stringify(id.name)}`) : null
|
|
1904
1907
|
});
|
|
1905
1908
|
}
|
|
1906
1909
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -115,7 +115,7 @@ var settings3 = {
|
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
117
|
var name4 = "eslint-plugin-react-x";
|
|
118
|
-
var version = "1.
|
|
118
|
+
var version = "1.52.0-beta.0";
|
|
119
119
|
var createRule = ESLintUtils.RuleCreator(getDocsUrl("x"));
|
|
120
120
|
|
|
121
121
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -1836,6 +1836,7 @@ var no_missing_context_display_name_default = createRule({
|
|
|
1836
1836
|
description: "Enforces that all contexts have a `displayName` which can be used in devtools.",
|
|
1837
1837
|
[Symbol.for("rule_features")]: RULE_FEATURES33
|
|
1838
1838
|
},
|
|
1839
|
+
fixable: "code",
|
|
1839
1840
|
messages: {
|
|
1840
1841
|
noMissingContextDisplayName: "Add missing 'displayName' for context."
|
|
1841
1842
|
},
|
|
@@ -1873,7 +1874,9 @@ function create33(context) {
|
|
|
1873
1874
|
if (!hasDisplayNameAssignment) {
|
|
1874
1875
|
context.report({
|
|
1875
1876
|
messageId: "noMissingContextDisplayName",
|
|
1876
|
-
node: id
|
|
1877
|
+
node: id,
|
|
1878
|
+
fix: id.type === AST_NODE_TYPES.Identifier && id.parent === call.parent ? (fixer) => fixer.insertTextAfter(call, `
|
|
1879
|
+
${id.name}.displayName = ${JSON.stringify(id.name)}`) : null
|
|
1877
1880
|
});
|
|
1878
1881
|
}
|
|
1879
1882
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0-beta.0",
|
|
4
4
|
"description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"is-immutable-type": "^5.0.1",
|
|
51
51
|
"string-ts": "^2.2.1",
|
|
52
52
|
"ts-pattern": "^5.7.1",
|
|
53
|
-
"@eslint-react/ast": "1.
|
|
54
|
-
"@eslint-react/core": "1.
|
|
55
|
-
"@eslint-react/eff": "1.
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
58
|
-
"@eslint-react/
|
|
53
|
+
"@eslint-react/ast": "1.52.0-beta.0",
|
|
54
|
+
"@eslint-react/core": "1.52.0-beta.0",
|
|
55
|
+
"@eslint-react/eff": "1.52.0-beta.0",
|
|
56
|
+
"@eslint-react/kit": "1.52.0-beta.0",
|
|
57
|
+
"@eslint-react/var": "1.52.0-beta.0",
|
|
58
|
+
"@eslint-react/shared": "1.52.0-beta.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/react": "^19.1.7",
|