eslint-plugin-react-naming-convention 5.24.3 → 5.24.5
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 +13 -39
- 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.5";
|
|
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,9 +34,8 @@ 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:
|
|
49
|
-
create: create$2
|
|
50
|
-
defaultOptions: []
|
|
37
|
+
name: "context-name",
|
|
38
|
+
create: create$2
|
|
51
39
|
});
|
|
52
40
|
function create$2(context) {
|
|
53
41
|
if (!context.sourceCode.text.includes("createContext")) return {};
|
|
@@ -68,10 +56,6 @@ function create$2(context) {
|
|
|
68
56
|
});
|
|
69
57
|
} };
|
|
70
58
|
}
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/rules/id-name/id-name.ts
|
|
74
|
-
const RULE_NAME$1 = "id-name";
|
|
75
59
|
var id_name_default = createRule({
|
|
76
60
|
meta: {
|
|
77
61
|
type: "suggestion",
|
|
@@ -79,9 +63,8 @@ var id_name_default = createRule({
|
|
|
79
63
|
messages: { "invalid-id-name": "An identifier assigned from 'useId' must be named 'id' or end with 'Id'." },
|
|
80
64
|
schema: []
|
|
81
65
|
},
|
|
82
|
-
name:
|
|
83
|
-
create: create$1
|
|
84
|
-
defaultOptions: []
|
|
66
|
+
name: "id-name",
|
|
67
|
+
create: create$1
|
|
85
68
|
});
|
|
86
69
|
function create$1(context) {
|
|
87
70
|
if (!context.sourceCode.text.includes("useId")) return {};
|
|
@@ -102,10 +85,6 @@ function create$1(context) {
|
|
|
102
85
|
});
|
|
103
86
|
} };
|
|
104
87
|
}
|
|
105
|
-
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/rules/ref-name/ref-name.ts
|
|
108
|
-
const RULE_NAME = "ref-name";
|
|
109
88
|
var ref_name_default = createRule({
|
|
110
89
|
meta: {
|
|
111
90
|
type: "suggestion",
|
|
@@ -113,9 +92,8 @@ var ref_name_default = createRule({
|
|
|
113
92
|
messages: { "invalid-ref-name": "A ref identifier must be named 'ref' or ending in 'Ref'." },
|
|
114
93
|
schema: []
|
|
115
94
|
},
|
|
116
|
-
name:
|
|
117
|
-
create
|
|
118
|
-
defaultOptions: []
|
|
95
|
+
name: "ref-name",
|
|
96
|
+
create
|
|
119
97
|
});
|
|
120
98
|
function create(context) {
|
|
121
99
|
const { additionalRefHooks } = getSettingsFromContext(context);
|
|
@@ -137,7 +115,6 @@ function create(context) {
|
|
|
137
115
|
});
|
|
138
116
|
} };
|
|
139
117
|
}
|
|
140
|
-
|
|
141
118
|
//#endregion
|
|
142
119
|
//#region src/plugin.ts
|
|
143
120
|
const plugin = {
|
|
@@ -151,7 +128,6 @@ const plugin = {
|
|
|
151
128
|
["ref-name"]: ref_name_default
|
|
152
129
|
}
|
|
153
130
|
};
|
|
154
|
-
|
|
155
131
|
//#endregion
|
|
156
132
|
//#region src/configs/recommended.ts
|
|
157
133
|
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -166,7 +142,6 @@ const rules = {
|
|
|
166
142
|
"react-naming-convention/ref-name": "warn"
|
|
167
143
|
};
|
|
168
144
|
const plugins = { "react-naming-convention": plugin };
|
|
169
|
-
|
|
170
145
|
//#endregion
|
|
171
146
|
//#region src/index.ts
|
|
172
147
|
function createConfig(base) {
|
|
@@ -184,6 +159,5 @@ const finalPlugin = {
|
|
|
184
159
|
...plugin,
|
|
185
160
|
configs: { ["recommended"]: createConfig(recommended_exports) }
|
|
186
161
|
};
|
|
187
|
-
|
|
188
162
|
//#endregion
|
|
189
|
-
export { finalPlugin as default };
|
|
163
|
+
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.5",
|
|
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.5",
|
|
41
|
+
"@eslint-react/core": "5.24.5",
|
|
42
|
+
"@eslint-react/eslint": "5.24.5",
|
|
43
|
+
"@eslint-react/shared": "5.24.5",
|
|
44
|
+
"@eslint-react/var": "5.24.5",
|
|
45
45
|
"@typescript-eslint/types": "^8.71.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.71.0",
|
|
47
47
|
"ts-pattern": "^5.9.0"
|