eslint-plugin-react-naming-convention 1.29.1-next.7 → 1.30.0-next.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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var rules = {
|
|
|
52
52
|
|
|
53
53
|
// package.json
|
|
54
54
|
var name2 = "eslint-plugin-react-naming-convention";
|
|
55
|
-
var version = "1.
|
|
55
|
+
var version = "1.30.0-next.0";
|
|
56
56
|
var createRule = shared.createRuleForPlugin("naming-convention");
|
|
57
57
|
|
|
58
58
|
// src/rules/component-name.ts
|
|
@@ -428,7 +428,7 @@ var use_state_default = createRule({
|
|
|
428
428
|
context.report({ messageId: "invalid", node });
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
|
-
const valueName = tsPattern.match(value).with({ type: types.AST_NODE_TYPES.Identifier }, (
|
|
431
|
+
const valueName = tsPattern.match(value).with({ type: types.AST_NODE_TYPES.Identifier }, ({ name: name3 }) => stringTs.snakeCase(name3)).with({ type: types.AST_NODE_TYPES.ObjectPattern }, ({ properties }) => {
|
|
432
432
|
const values = properties.reduce((acc, prop) => {
|
|
433
433
|
if (prop.type === types.AST_NODE_TYPES.Property && prop.key.type === types.AST_NODE_TYPES.Identifier) {
|
|
434
434
|
return [...acc, prop.key.name];
|
package/dist/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ var rules = {
|
|
|
27
27
|
|
|
28
28
|
// package.json
|
|
29
29
|
var name2 = "eslint-plugin-react-naming-convention";
|
|
30
|
-
var version = "1.
|
|
30
|
+
var version = "1.30.0-next.0";
|
|
31
31
|
var createRule = createRuleForPlugin("naming-convention");
|
|
32
32
|
|
|
33
33
|
// src/rules/component-name.ts
|
|
@@ -403,7 +403,7 @@ var use_state_default = createRule({
|
|
|
403
403
|
context.report({ messageId: "invalid", node });
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
|
-
const valueName = match(value).with({ type: AST_NODE_TYPES.Identifier }, (
|
|
406
|
+
const valueName = match(value).with({ type: AST_NODE_TYPES.Identifier }, ({ name: name3 }) => snakeCase(name3)).with({ type: AST_NODE_TYPES.ObjectPattern }, ({ properties }) => {
|
|
407
407
|
const values = properties.reduce((acc, prop) => {
|
|
408
408
|
if (prop.type === AST_NODE_TYPES.Property && prop.key.type === AST_NODE_TYPES.Identifier) {
|
|
409
409
|
return [...acc, prop.key.name];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0-next.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@typescript-eslint/utils": "^8.25.0",
|
|
50
50
|
"string-ts": "^2.2.1",
|
|
51
51
|
"ts-pattern": "^5.6.2",
|
|
52
|
-
"@eslint-react/ast": "1.
|
|
53
|
-
"@eslint-react/core": "1.
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/ast": "1.30.0-next.0",
|
|
53
|
+
"@eslint-react/core": "1.30.0-next.0",
|
|
54
|
+
"@eslint-react/eff": "1.30.0-next.0",
|
|
55
|
+
"@eslint-react/jsx": "1.30.0-next.0",
|
|
56
|
+
"@eslint-react/shared": "1.30.0-next.0",
|
|
57
|
+
"@eslint-react/var": "1.30.0-next.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^19.0.10",
|