eslint-plugin-react-naming-convention 1.53.1-next.0 → 1.53.1-next.1
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 +23 -14
- package/dist/index.mjs +3 -4
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -27,16 +27,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
}) : target, mod));
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
let __eslint_react_shared = require("@eslint-react/shared");
|
|
31
|
+
__eslint_react_shared = __toESM(__eslint_react_shared);
|
|
32
|
+
let __eslint_react_ast = require("@eslint-react/ast");
|
|
33
|
+
__eslint_react_ast = __toESM(__eslint_react_ast);
|
|
34
|
+
let __eslint_react_core = require("@eslint-react/core");
|
|
35
|
+
__eslint_react_core = __toESM(__eslint_react_core);
|
|
36
|
+
let __eslint_react_kit = require("@eslint-react/kit");
|
|
37
|
+
__eslint_react_kit = __toESM(__eslint_react_kit);
|
|
38
|
+
let __typescript_eslint_utils = require("@typescript-eslint/utils");
|
|
39
|
+
__typescript_eslint_utils = __toESM(__typescript_eslint_utils);
|
|
40
|
+
let __eslint_react_eff = require("@eslint-react/eff");
|
|
41
|
+
__eslint_react_eff = __toESM(__eslint_react_eff);
|
|
42
|
+
let __typescript_eslint_types = require("@typescript-eslint/types");
|
|
43
|
+
__typescript_eslint_types = __toESM(__typescript_eslint_types);
|
|
44
|
+
let ts_pattern = require("ts-pattern");
|
|
45
|
+
ts_pattern = __toESM(ts_pattern);
|
|
46
|
+
let node_path = require("node:path");
|
|
47
|
+
node_path = __toESM(node_path);
|
|
48
|
+
let string_ts = require("string-ts");
|
|
49
|
+
string_ts = __toESM(string_ts);
|
|
40
50
|
|
|
41
51
|
//#region src/configs/recommended.ts
|
|
42
52
|
var recommended_exports = {};
|
|
@@ -50,7 +60,7 @@ const rules = { "react-naming-convention/context-name": "warn" };
|
|
|
50
60
|
//#endregion
|
|
51
61
|
//#region package.json
|
|
52
62
|
var name = "eslint-plugin-react-naming-convention";
|
|
53
|
-
var version = "1.53.1-next.
|
|
63
|
+
var version = "1.53.1-next.1";
|
|
54
64
|
|
|
55
65
|
//#endregion
|
|
56
66
|
//#region src/utils/create-rule.ts
|
|
@@ -433,11 +443,10 @@ function create(context) {
|
|
|
433
443
|
return;
|
|
434
444
|
}
|
|
435
445
|
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
|
-
|
|
446
|
+
return properties.reduce((acc, prop) => {
|
|
437
447
|
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
448
|
return acc;
|
|
439
|
-
}, []);
|
|
440
|
-
return values.join("_");
|
|
449
|
+
}, []).join("_");
|
|
441
450
|
}).otherwise(() => null);
|
|
442
451
|
if (valueName == null) {
|
|
443
452
|
context.report({
|
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ const rules = { "react-naming-convention/context-name": "warn" };
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region package.json
|
|
33
33
|
var name = "eslint-plugin-react-naming-convention";
|
|
34
|
-
var version = "1.53.1-next.
|
|
34
|
+
var version = "1.53.1-next.1";
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/utils/create-rule.ts
|
|
@@ -414,11 +414,10 @@ function create(context) {
|
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
416
|
const valueName = match(value).with({ type: AST_NODE_TYPES.Identifier }, ({ name: name$2 }) => snakeCase(name$2)).with({ type: AST_NODE_TYPES.ObjectPattern }, ({ properties }) => {
|
|
417
|
-
|
|
417
|
+
return properties.reduce((acc, prop) => {
|
|
418
418
|
if (prop.type === AST_NODE_TYPES.Property && prop.key.type === AST_NODE_TYPES.Identifier) return [...acc, prop.key.name];
|
|
419
419
|
return acc;
|
|
420
|
-
}, []);
|
|
421
|
-
return values.join("_");
|
|
420
|
+
}, []).join("_");
|
|
422
421
|
}).otherwise(() => null);
|
|
423
422
|
if (valueName == null) {
|
|
424
423
|
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-next.
|
|
3
|
+
"version": "1.53.1-next.1",
|
|
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/ast": "1.53.1-next.
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/var": "1.53.1-next.
|
|
57
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/ast": "1.53.1-next.1",
|
|
53
|
+
"@eslint-react/core": "1.53.1-next.1",
|
|
54
|
+
"@eslint-react/eff": "1.53.1-next.1",
|
|
55
|
+
"@eslint-react/kit": "1.53.1-next.1",
|
|
56
|
+
"@eslint-react/var": "1.53.1-next.1",
|
|
57
|
+
"@eslint-react/shared": "1.53.1-next.1"
|
|
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": {
|