eslint-plugin-react-naming-convention 1.24.0-next.9 → 1.24.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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
38
|
var name = "eslint-plugin-react-naming-convention";
|
|
39
|
-
var version = "1.24.0
|
|
39
|
+
var version = "1.24.0";
|
|
40
40
|
var createRule = shared.createRuleForPlugin("naming-convention");
|
|
41
41
|
|
|
42
42
|
// src/rules/component-name.ts
|
|
@@ -132,7 +132,7 @@ var component_name_default = createRule({
|
|
|
132
132
|
...collector.listeners,
|
|
133
133
|
...collectorLegacy.listeners,
|
|
134
134
|
JSXOpeningElement(node) {
|
|
135
|
-
const name2 = JSX__namespace.getElementName(node);
|
|
135
|
+
const name2 = JSX__namespace.getElementName(node.parent);
|
|
136
136
|
if (/^[a-z]/u.test(name2)) {
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
@@ -381,7 +381,7 @@ var use_state_default = createRule({
|
|
|
381
381
|
},
|
|
382
382
|
name: RULE_NAME4,
|
|
383
383
|
create(context) {
|
|
384
|
-
const alias = shared.getSettingsFromContext(context).additionalHooks
|
|
384
|
+
const alias = shared.getSettingsFromContext(context).additionalHooks.useState ?? [];
|
|
385
385
|
const {
|
|
386
386
|
ctx,
|
|
387
387
|
listeners
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
12
|
var name = "eslint-plugin-react-naming-convention";
|
|
13
|
-
var version = "1.24.0
|
|
13
|
+
var version = "1.24.0";
|
|
14
14
|
var createRule = createRuleForPlugin("naming-convention");
|
|
15
15
|
|
|
16
16
|
// src/rules/component-name.ts
|
|
@@ -106,7 +106,7 @@ var component_name_default = createRule({
|
|
|
106
106
|
...collector.listeners,
|
|
107
107
|
...collectorLegacy.listeners,
|
|
108
108
|
JSXOpeningElement(node) {
|
|
109
|
-
const name2 = JSX.getElementName(node);
|
|
109
|
+
const name2 = JSX.getElementName(node.parent);
|
|
110
110
|
if (/^[a-z]/u.test(name2)) {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
@@ -355,7 +355,7 @@ var use_state_default = createRule({
|
|
|
355
355
|
},
|
|
356
356
|
name: RULE_NAME4,
|
|
357
357
|
create(context) {
|
|
358
|
-
const alias = getSettingsFromContext(context).additionalHooks
|
|
358
|
+
const alias = getSettingsFromContext(context).additionalHooks.useState ?? [];
|
|
359
359
|
const {
|
|
360
360
|
ctx,
|
|
361
361
|
listeners
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.24.0
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"@typescript-eslint/types": "^8.20.0",
|
|
47
47
|
"@typescript-eslint/utils": "^8.20.0",
|
|
48
48
|
"string-ts": "^2.2.0",
|
|
49
|
-
"ts-pattern": "^5.6.
|
|
50
|
-
"@eslint-react/ast": "1.24.0
|
|
51
|
-
"@eslint-react/core": "1.24.0
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
49
|
+
"ts-pattern": "^5.6.1",
|
|
50
|
+
"@eslint-react/ast": "1.24.0",
|
|
51
|
+
"@eslint-react/core": "1.24.0",
|
|
52
|
+
"@eslint-react/jsx": "1.24.0",
|
|
53
|
+
"@eslint-react/shared": "1.24.0",
|
|
54
|
+
"@eslint-react/eff": "1.24.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/react": "^19.0.7",
|