eslint-plugin-react-naming-convention 1.16.2-next.7 → 1.16.2-next.9
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.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -5
- package/dist/index.mjs +2 -5
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -10,22 +10,22 @@ declare const _default: {
|
|
|
10
10
|
readonly version: string;
|
|
11
11
|
};
|
|
12
12
|
readonly rules: {
|
|
13
|
-
readonly "component-name": _typescript_eslint_utils_ts_eslint.RuleModule<"componentName", readonly [{
|
|
13
|
+
readonly "component-name": _typescript_eslint_utils_ts_eslint.RuleModule<"componentName", readonly [("CONSTANT_CASE" | "PascalCase") | {
|
|
14
14
|
allowAllCaps?: boolean;
|
|
15
15
|
allowLeadingUnderscore?: boolean;
|
|
16
16
|
allowNamespace?: boolean;
|
|
17
17
|
excepts?: readonly string[];
|
|
18
18
|
rule?: "CONSTANT_CASE" | "PascalCase";
|
|
19
|
-
} |
|
|
20
|
-
readonly filename: _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, readonly [{
|
|
19
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
20
|
+
readonly filename: _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, readonly [("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
|
|
21
21
|
excepts?: readonly string[];
|
|
22
22
|
extensions?: readonly string[];
|
|
23
23
|
rule?: "PascalCase" | "camelCase" | "kebab-case" | "snake_case";
|
|
24
|
-
} |
|
|
25
|
-
readonly "filename-extension": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, readonly [{
|
|
24
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
25
|
+
readonly "filename-extension": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, readonly [("always" | "as-needed") | {
|
|
26
26
|
allow?: "always" | "as-needed";
|
|
27
27
|
extensions?: readonly string[];
|
|
28
|
-
} |
|
|
28
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
29
29
|
readonly "use-state": _typescript_eslint_utils_ts_eslint.RuleModule<"useState", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
30
30
|
};
|
|
31
31
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,22 +10,22 @@ declare const _default: {
|
|
|
10
10
|
readonly version: string;
|
|
11
11
|
};
|
|
12
12
|
readonly rules: {
|
|
13
|
-
readonly "component-name": _typescript_eslint_utils_ts_eslint.RuleModule<"componentName", readonly [{
|
|
13
|
+
readonly "component-name": _typescript_eslint_utils_ts_eslint.RuleModule<"componentName", readonly [("CONSTANT_CASE" | "PascalCase") | {
|
|
14
14
|
allowAllCaps?: boolean;
|
|
15
15
|
allowLeadingUnderscore?: boolean;
|
|
16
16
|
allowNamespace?: boolean;
|
|
17
17
|
excepts?: readonly string[];
|
|
18
18
|
rule?: "CONSTANT_CASE" | "PascalCase";
|
|
19
|
-
} |
|
|
20
|
-
readonly filename: _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, readonly [{
|
|
19
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
20
|
+
readonly filename: _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, readonly [("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
|
|
21
21
|
excepts?: readonly string[];
|
|
22
22
|
extensions?: readonly string[];
|
|
23
23
|
rule?: "PascalCase" | "camelCase" | "kebab-case" | "snake_case";
|
|
24
|
-
} |
|
|
25
|
-
readonly "filename-extension": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, readonly [{
|
|
24
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
25
|
+
readonly "filename-extension": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, readonly [("always" | "as-needed") | {
|
|
26
26
|
allow?: "always" | "as-needed";
|
|
27
27
|
extensions?: readonly string[];
|
|
28
|
-
} |
|
|
28
|
+
} | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
29
29
|
readonly "use-state": _typescript_eslint_utils_ts_eslint.RuleModule<"useState", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
30
30
|
};
|
|
31
31
|
};
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
35
35
|
|
|
36
36
|
// package.json
|
|
37
37
|
var name = "eslint-plugin-react-naming-convention";
|
|
38
|
-
var version = "1.16.2-next.
|
|
38
|
+
var version = "1.16.2-next.9";
|
|
39
39
|
var createRule = shared.createRuleForPlugin("naming-convention");
|
|
40
40
|
|
|
41
41
|
// src/rules/component-name.ts
|
|
@@ -251,7 +251,7 @@ var RULE_NAME2 = "filename";
|
|
|
251
251
|
var defaultOptions2 = [
|
|
252
252
|
{
|
|
253
253
|
excepts: ["^index$"],
|
|
254
|
-
extensions: [".jsx", ".tsx"],
|
|
254
|
+
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
255
255
|
rule: "PascalCase"
|
|
256
256
|
}
|
|
257
257
|
];
|
|
@@ -302,10 +302,7 @@ var filename_default = createRule({
|
|
|
302
302
|
const options = context.options[0] ?? defaultOptions2[0];
|
|
303
303
|
const rule = tools.isString(options) ? options : options.rule ?? "PascalCase";
|
|
304
304
|
const excepts = tools.isString(options) ? [] : options.excepts ?? [];
|
|
305
|
-
const extensions = tools.isObject(options) && "extensions" in options ? options.extensions : defaultOptions2[0].extensions;
|
|
306
305
|
const filename = context.filename;
|
|
307
|
-
const fileNameExt = filename.slice(filename.lastIndexOf("."));
|
|
308
|
-
if (!extensions.includes(fileNameExt)) return {};
|
|
309
306
|
function validate2(name2, casing = rule, ignores = excepts) {
|
|
310
307
|
if (ignores.map((pattern) => new RegExp(pattern, "u")).some((pattern) => pattern.test(name2))) {
|
|
311
308
|
return true;
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
11
|
var name = "eslint-plugin-react-naming-convention";
|
|
12
|
-
var version = "1.16.2-next.
|
|
12
|
+
var version = "1.16.2-next.9";
|
|
13
13
|
var createRule = createRuleForPlugin("naming-convention");
|
|
14
14
|
|
|
15
15
|
// src/rules/component-name.ts
|
|
@@ -225,7 +225,7 @@ var RULE_NAME2 = "filename";
|
|
|
225
225
|
var defaultOptions2 = [
|
|
226
226
|
{
|
|
227
227
|
excepts: ["^index$"],
|
|
228
|
-
extensions: [".jsx", ".tsx"],
|
|
228
|
+
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
229
229
|
rule: "PascalCase"
|
|
230
230
|
}
|
|
231
231
|
];
|
|
@@ -276,10 +276,7 @@ var filename_default = createRule({
|
|
|
276
276
|
const options = context.options[0] ?? defaultOptions2[0];
|
|
277
277
|
const rule = isString(options) ? options : options.rule ?? "PascalCase";
|
|
278
278
|
const excepts = isString(options) ? [] : options.excepts ?? [];
|
|
279
|
-
const extensions = isObject(options) && "extensions" in options ? options.extensions : defaultOptions2[0].extensions;
|
|
280
279
|
const filename = context.filename;
|
|
281
|
-
const fileNameExt = filename.slice(filename.lastIndexOf("."));
|
|
282
|
-
if (!extensions.includes(fileNameExt)) return {};
|
|
283
280
|
function validate2(name2, casing = rule, ignores = excepts) {
|
|
284
281
|
if (ignores.map((pattern) => new RegExp(pattern, "u")).some((pattern) => pattern.test(name2))) {
|
|
285
282
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.16.2-next.
|
|
3
|
+
"version": "1.16.2-next.9",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"@typescript-eslint/types": "^8.15.0",
|
|
47
47
|
"@typescript-eslint/utils": "^8.15.0",
|
|
48
48
|
"ts-pattern": "^5.5.0",
|
|
49
|
-
"@eslint-react/ast": "1.16.2-next.
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/tools": "1.16.2-next.
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
49
|
+
"@eslint-react/ast": "1.16.2-next.9",
|
|
50
|
+
"@eslint-react/core": "1.16.2-next.9",
|
|
51
|
+
"@eslint-react/jsx": "1.16.2-next.9",
|
|
52
|
+
"@eslint-react/tools": "1.16.2-next.9",
|
|
53
|
+
"@eslint-react/types": "1.16.2-next.9",
|
|
54
|
+
"@eslint-react/shared": "1.16.2-next.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/react": "^18.3.12",
|