eslint-plugin-react-naming-convention 5.24.2 → 5.24.4
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 -33
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -6,38 +6,27 @@ import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
|
6
6
|
import { P, match } from "ts-pattern";
|
|
7
7
|
import { Extract } from "@eslint-react/ast";
|
|
8
8
|
import { getSettingsFromContext } from "@eslint-react/shared";
|
|
9
|
-
|
|
10
9
|
//#region \0rolldown/runtime.js
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __exportAll = (all, no_symbols) => {
|
|
13
12
|
let target = {};
|
|
14
|
-
for (var name in all) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
if (!no_symbols) {
|
|
21
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
22
|
-
}
|
|
13
|
+
for (var name in all) __defProp(target, name, {
|
|
14
|
+
get: all[name],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
23
18
|
return target;
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
//#endregion
|
|
27
21
|
//#region package.json
|
|
28
22
|
var name$1 = "eslint-plugin-react-naming-convention";
|
|
29
|
-
var version = "5.24.
|
|
30
|
-
|
|
23
|
+
var version = "5.24.4";
|
|
31
24
|
//#endregion
|
|
32
25
|
//#region src/utils/create-rule.ts
|
|
33
26
|
function getDocsUrl(ruleName) {
|
|
34
27
|
return `https://eslint-react.xyz/docs/rules/naming-convention-${ruleName}`;
|
|
35
28
|
}
|
|
36
29
|
const createRule = ESLintUtils.RuleCreator(getDocsUrl);
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/rules/context-name/context-name.ts
|
|
40
|
-
const RULE_NAME$2 = "context-name";
|
|
41
30
|
var context_name_default = createRule({
|
|
42
31
|
meta: {
|
|
43
32
|
type: "suggestion",
|
|
@@ -45,7 +34,7 @@ var context_name_default = createRule({
|
|
|
45
34
|
messages: { "invalid-context-name": "A context name must be a valid component name with the suffix 'Context'." },
|
|
46
35
|
schema: []
|
|
47
36
|
},
|
|
48
|
-
name:
|
|
37
|
+
name: "context-name",
|
|
49
38
|
create: create$2,
|
|
50
39
|
defaultOptions: []
|
|
51
40
|
});
|
|
@@ -68,10 +57,6 @@ function create$2(context) {
|
|
|
68
57
|
});
|
|
69
58
|
} };
|
|
70
59
|
}
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/rules/id-name/id-name.ts
|
|
74
|
-
const RULE_NAME$1 = "id-name";
|
|
75
60
|
var id_name_default = createRule({
|
|
76
61
|
meta: {
|
|
77
62
|
type: "suggestion",
|
|
@@ -79,7 +64,7 @@ var id_name_default = createRule({
|
|
|
79
64
|
messages: { "invalid-id-name": "An identifier assigned from 'useId' must be named 'id' or end with 'Id'." },
|
|
80
65
|
schema: []
|
|
81
66
|
},
|
|
82
|
-
name:
|
|
67
|
+
name: "id-name",
|
|
83
68
|
create: create$1,
|
|
84
69
|
defaultOptions: []
|
|
85
70
|
});
|
|
@@ -102,10 +87,6 @@ function create$1(context) {
|
|
|
102
87
|
});
|
|
103
88
|
} };
|
|
104
89
|
}
|
|
105
|
-
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/rules/ref-name/ref-name.ts
|
|
108
|
-
const RULE_NAME = "ref-name";
|
|
109
90
|
var ref_name_default = createRule({
|
|
110
91
|
meta: {
|
|
111
92
|
type: "suggestion",
|
|
@@ -113,7 +94,7 @@ var ref_name_default = createRule({
|
|
|
113
94
|
messages: { "invalid-ref-name": "A ref identifier must be named 'ref' or ending in 'Ref'." },
|
|
114
95
|
schema: []
|
|
115
96
|
},
|
|
116
|
-
name:
|
|
97
|
+
name: "ref-name",
|
|
117
98
|
create,
|
|
118
99
|
defaultOptions: []
|
|
119
100
|
});
|
|
@@ -137,7 +118,6 @@ function create(context) {
|
|
|
137
118
|
});
|
|
138
119
|
} };
|
|
139
120
|
}
|
|
140
|
-
|
|
141
121
|
//#endregion
|
|
142
122
|
//#region src/plugin.ts
|
|
143
123
|
const plugin = {
|
|
@@ -151,7 +131,6 @@ const plugin = {
|
|
|
151
131
|
["ref-name"]: ref_name_default
|
|
152
132
|
}
|
|
153
133
|
};
|
|
154
|
-
|
|
155
134
|
//#endregion
|
|
156
135
|
//#region src/configs/recommended.ts
|
|
157
136
|
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -166,7 +145,6 @@ const rules = {
|
|
|
166
145
|
"react-naming-convention/ref-name": "warn"
|
|
167
146
|
};
|
|
168
147
|
const plugins = { "react-naming-convention": plugin };
|
|
169
|
-
|
|
170
148
|
//#endregion
|
|
171
149
|
//#region src/index.ts
|
|
172
150
|
function createConfig(base) {
|
|
@@ -184,6 +162,5 @@ const finalPlugin = {
|
|
|
184
162
|
...plugin,
|
|
185
163
|
configs: { ["recommended"]: createConfig(recommended_exports) }
|
|
186
164
|
};
|
|
187
|
-
|
|
188
165
|
//#endregion
|
|
189
|
-
export { finalPlugin as default };
|
|
166
|
+
export { finalPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "5.24.
|
|
3
|
+
"version": "5.24.4",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.24.
|
|
41
|
-
"@eslint-react/core": "5.24.
|
|
42
|
-
"@eslint-react/eslint": "5.24.
|
|
43
|
-
"@eslint-react/shared": "5.24.
|
|
44
|
-
"@eslint-react/var": "5.24.
|
|
40
|
+
"@eslint-react/ast": "5.24.4",
|
|
41
|
+
"@eslint-react/core": "5.24.4",
|
|
42
|
+
"@eslint-react/eslint": "5.24.4",
|
|
43
|
+
"@eslint-react/shared": "5.24.4",
|
|
44
|
+
"@eslint-react/var": "5.24.4",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0",
|
|
47
47
|
"ts-pattern": "^5.9.0"
|