eslint-plugin-react-naming-convention 5.23.5 → 5.24.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 +7 -7
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region package.json
|
|
28
28
|
var name$1 = "eslint-plugin-react-naming-convention";
|
|
29
|
-
var version = "5.
|
|
29
|
+
var version = "5.24.0-beta.0";
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/utils/create-rule.ts
|
|
@@ -42,7 +42,7 @@ var context_name_default = createRule({
|
|
|
42
42
|
meta: {
|
|
43
43
|
type: "suggestion",
|
|
44
44
|
docs: { description: "Enforces identifier names assigned from `createContext` calls to be a valid component name with the suffix `Context`." },
|
|
45
|
-
messages: {
|
|
45
|
+
messages: { "invalid-context-name": "A context name must be a valid component name with the suffix 'Context'." },
|
|
46
46
|
schema: []
|
|
47
47
|
},
|
|
48
48
|
name: RULE_NAME$2,
|
|
@@ -63,7 +63,7 @@ function create$2(context) {
|
|
|
63
63
|
if (id == null) return;
|
|
64
64
|
if (core.isFunctionComponentName(name) && name.endsWith("Context")) return;
|
|
65
65
|
context.report({
|
|
66
|
-
messageId: "
|
|
66
|
+
messageId: "invalid-context-name",
|
|
67
67
|
node: id
|
|
68
68
|
});
|
|
69
69
|
} };
|
|
@@ -76,7 +76,7 @@ var id_name_default = createRule({
|
|
|
76
76
|
meta: {
|
|
77
77
|
type: "suggestion",
|
|
78
78
|
docs: { description: "Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'." },
|
|
79
|
-
messages: {
|
|
79
|
+
messages: { "invalid-id-name": "An identifier assigned from 'useId' must be named 'id' or end with 'Id'." },
|
|
80
80
|
schema: []
|
|
81
81
|
},
|
|
82
82
|
name: RULE_NAME$1,
|
|
@@ -97,7 +97,7 @@ function create$1(context) {
|
|
|
97
97
|
if (id == null) return;
|
|
98
98
|
if (name.endsWith("Id") || name === "id") return;
|
|
99
99
|
context.report({
|
|
100
|
-
messageId: "
|
|
100
|
+
messageId: "invalid-id-name",
|
|
101
101
|
node: id
|
|
102
102
|
});
|
|
103
103
|
} };
|
|
@@ -110,7 +110,7 @@ var ref_name_default = createRule({
|
|
|
110
110
|
meta: {
|
|
111
111
|
type: "suggestion",
|
|
112
112
|
docs: { description: "Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'." },
|
|
113
|
-
messages: {
|
|
113
|
+
messages: { "invalid-ref-name": "A ref identifier must be named 'ref' or ending in 'Ref'." },
|
|
114
114
|
schema: []
|
|
115
115
|
},
|
|
116
116
|
name: RULE_NAME,
|
|
@@ -132,7 +132,7 @@ function create(context) {
|
|
|
132
132
|
if (id == null) return;
|
|
133
133
|
if (name.endsWith("Ref") || name === "ref") return;
|
|
134
134
|
context.report({
|
|
135
|
-
messageId: "
|
|
135
|
+
messageId: "invalid-ref-name",
|
|
136
136
|
node: id
|
|
137
137
|
});
|
|
138
138
|
} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,17 +37,18 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.
|
|
41
|
-
"@eslint-react/core": "5.
|
|
42
|
-
"@eslint-react/eslint": "5.
|
|
43
|
-
"@eslint-react/shared": "5.
|
|
44
|
-
"@eslint-react/var": "5.
|
|
40
|
+
"@eslint-react/ast": "5.24.0-beta.0",
|
|
41
|
+
"@eslint-react/core": "5.24.0-beta.0",
|
|
42
|
+
"@eslint-react/eslint": "5.24.0-beta.0",
|
|
43
|
+
"@eslint-react/shared": "5.24.0-beta.0",
|
|
44
|
+
"@eslint-react/var": "5.24.0-beta.0",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0",
|
|
47
47
|
"ts-pattern": "^5.9.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@local/configs": "0.0.0",
|
|
51
|
+
"@local/testkit": "0.0.0",
|
|
51
52
|
"@types/react": "^19.3.0",
|
|
52
53
|
"@types/react-dom": "^19.3.0",
|
|
53
54
|
"dedent": "^1.7.2",
|