eslint-plugin-react-naming-convention 1.53.1-beta.0 → 1.53.1-beta.2
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 +27 -17
- package/dist/index.mjs +7 -7
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -5,11 +5,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (
|
|
8
|
+
var __export = (all) => {
|
|
9
|
+
let target = {};
|
|
9
10
|
for (var name$2 in all) __defProp(target, name$2, {
|
|
10
11
|
get: all[name$2],
|
|
11
12
|
enumerable: true
|
|
12
13
|
});
|
|
14
|
+
return target;
|
|
13
15
|
};
|
|
14
16
|
var __copyProps = (to, from, except, desc) => {
|
|
15
17
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -27,20 +29,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
29
|
}) : target, mod));
|
|
28
30
|
|
|
29
31
|
//#endregion
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
let __eslint_react_shared = require("@eslint-react/shared");
|
|
33
|
+
__eslint_react_shared = __toESM(__eslint_react_shared);
|
|
34
|
+
let __eslint_react_ast = require("@eslint-react/ast");
|
|
35
|
+
__eslint_react_ast = __toESM(__eslint_react_ast);
|
|
36
|
+
let __eslint_react_core = require("@eslint-react/core");
|
|
37
|
+
__eslint_react_core = __toESM(__eslint_react_core);
|
|
38
|
+
let __eslint_react_kit = require("@eslint-react/kit");
|
|
39
|
+
__eslint_react_kit = __toESM(__eslint_react_kit);
|
|
40
|
+
let __typescript_eslint_utils = require("@typescript-eslint/utils");
|
|
41
|
+
__typescript_eslint_utils = __toESM(__typescript_eslint_utils);
|
|
42
|
+
let __eslint_react_eff = require("@eslint-react/eff");
|
|
43
|
+
__eslint_react_eff = __toESM(__eslint_react_eff);
|
|
44
|
+
let __typescript_eslint_types = require("@typescript-eslint/types");
|
|
45
|
+
__typescript_eslint_types = __toESM(__typescript_eslint_types);
|
|
46
|
+
let ts_pattern = require("ts-pattern");
|
|
47
|
+
ts_pattern = __toESM(ts_pattern);
|
|
48
|
+
let node_path = require("node:path");
|
|
49
|
+
node_path = __toESM(node_path);
|
|
50
|
+
let string_ts = require("string-ts");
|
|
51
|
+
string_ts = __toESM(string_ts);
|
|
40
52
|
|
|
41
53
|
//#region src/configs/recommended.ts
|
|
42
|
-
var recommended_exports = {
|
|
43
|
-
__export(recommended_exports, {
|
|
54
|
+
var recommended_exports = __export({
|
|
44
55
|
name: () => name$1,
|
|
45
56
|
rules: () => rules
|
|
46
57
|
});
|
|
@@ -50,7 +61,7 @@ const rules = { "react-naming-convention/context-name": "warn" };
|
|
|
50
61
|
//#endregion
|
|
51
62
|
//#region package.json
|
|
52
63
|
var name = "eslint-plugin-react-naming-convention";
|
|
53
|
-
var version = "1.53.1-beta.
|
|
64
|
+
var version = "1.53.1-beta.2";
|
|
54
65
|
|
|
55
66
|
//#endregion
|
|
56
67
|
//#region src/utils/create-rule.ts
|
|
@@ -433,11 +444,10 @@ function create(context) {
|
|
|
433
444
|
return;
|
|
434
445
|
}
|
|
435
446
|
const valueName = (0, ts_pattern.match)(value).with({ type: __typescript_eslint_types.AST_NODE_TYPES.Identifier }, ({ name: name$2 }) => (0, string_ts.snakeCase)(name$2)).with({ type: __typescript_eslint_types.AST_NODE_TYPES.ObjectPattern }, ({ properties }) => {
|
|
436
|
-
|
|
447
|
+
return properties.reduce((acc, prop) => {
|
|
437
448
|
if (prop.type === __typescript_eslint_types.AST_NODE_TYPES.Property && prop.key.type === __typescript_eslint_types.AST_NODE_TYPES.Identifier) return [...acc, prop.key.name];
|
|
438
449
|
return acc;
|
|
439
|
-
}, []);
|
|
440
|
-
return values.join("_");
|
|
450
|
+
}, []).join("_");
|
|
441
451
|
}).otherwise(() => null);
|
|
442
452
|
if (valueName == null) {
|
|
443
453
|
context.report({
|
package/dist/index.mjs
CHANGED
|
@@ -11,17 +11,18 @@ import { camelCase, kebabCase, pascalCase, snakeCase } from "string-ts";
|
|
|
11
11
|
|
|
12
12
|
//#region rolldown:runtime
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
14
|
-
var __export = (
|
|
14
|
+
var __export = (all) => {
|
|
15
|
+
let target = {};
|
|
15
16
|
for (var name$2 in all) __defProp(target, name$2, {
|
|
16
17
|
get: all[name$2],
|
|
17
18
|
enumerable: true
|
|
18
19
|
});
|
|
20
|
+
return target;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
//#endregion
|
|
22
24
|
//#region src/configs/recommended.ts
|
|
23
|
-
var recommended_exports = {
|
|
24
|
-
__export(recommended_exports, {
|
|
25
|
+
var recommended_exports = __export({
|
|
25
26
|
name: () => name$1,
|
|
26
27
|
rules: () => rules
|
|
27
28
|
});
|
|
@@ -31,7 +32,7 @@ const rules = { "react-naming-convention/context-name": "warn" };
|
|
|
31
32
|
//#endregion
|
|
32
33
|
//#region package.json
|
|
33
34
|
var name = "eslint-plugin-react-naming-convention";
|
|
34
|
-
var version = "1.53.1-beta.
|
|
35
|
+
var version = "1.53.1-beta.2";
|
|
35
36
|
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/utils/create-rule.ts
|
|
@@ -414,11 +415,10 @@ function create(context) {
|
|
|
414
415
|
return;
|
|
415
416
|
}
|
|
416
417
|
const valueName = match(value).with({ type: AST_NODE_TYPES.Identifier }, ({ name: name$2 }) => snakeCase(name$2)).with({ type: AST_NODE_TYPES.ObjectPattern }, ({ properties }) => {
|
|
417
|
-
|
|
418
|
+
return properties.reduce((acc, prop) => {
|
|
418
419
|
if (prop.type === AST_NODE_TYPES.Property && prop.key.type === AST_NODE_TYPES.Identifier) return [...acc, prop.key.name];
|
|
419
420
|
return acc;
|
|
420
|
-
}, []);
|
|
421
|
-
return values.join("_");
|
|
421
|
+
}, []).join("_");
|
|
422
422
|
}).otherwise(() => null);
|
|
423
423
|
if (valueName == null) {
|
|
424
424
|
context.report({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.53.1-beta.
|
|
3
|
+
"version": "1.53.1-beta.2",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
"./package.json"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
47
|
-
"@typescript-eslint/type-utils": "^8.
|
|
48
|
-
"@typescript-eslint/types": "^8.
|
|
49
|
-
"@typescript-eslint/utils": "^8.
|
|
46
|
+
"@typescript-eslint/scope-manager": "^8.43.0",
|
|
47
|
+
"@typescript-eslint/type-utils": "^8.43.0",
|
|
48
|
+
"@typescript-eslint/types": "^8.43.0",
|
|
49
|
+
"@typescript-eslint/utils": "^8.43.0",
|
|
50
50
|
"string-ts": "^2.2.1",
|
|
51
51
|
"ts-pattern": "^5.8.0",
|
|
52
|
-
"@eslint-react/core": "1.53.1-beta.
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/kit": "1.53.1-beta.
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/core": "1.53.1-beta.2",
|
|
53
|
+
"@eslint-react/ast": "1.53.1-beta.2",
|
|
54
|
+
"@eslint-react/kit": "1.53.1-beta.2",
|
|
55
|
+
"@eslint-react/var": "1.53.1-beta.2",
|
|
56
|
+
"@eslint-react/eff": "1.53.1-beta.2",
|
|
57
|
+
"@eslint-react/shared": "1.53.1-beta.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^19.1.12",
|
|
61
61
|
"@types/react-dom": "^19.1.9",
|
|
62
|
-
"tsdown": "^0.
|
|
62
|
+
"tsdown": "^0.15.0",
|
|
63
63
|
"@local/configs": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|