eslint-plugin-react-naming-convention 2.6.5-next.0 → 2.6.5-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 +5 -8
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, getConfigAdapters, getSettingsFromContext, toRegExp } from "@eslint-react/shared";
|
|
2
|
-
import * as AST from "@eslint-react/ast";
|
|
3
2
|
import { findEnclosingAssignmentTarget, isComponentName, isCreateContextCall, isUseRefCall, isUseStateCall, useComponentCollector, useComponentCollectorLegacy } from "@eslint-react/core";
|
|
4
3
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
5
4
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
@@ -8,6 +7,7 @@ import { P, match } from "ts-pattern";
|
|
|
8
7
|
import path from "node:path";
|
|
9
8
|
import { camelCase, kebabCase, pascalCase, snakeCase } from "string-ts";
|
|
10
9
|
import { isObject } from "@eslint-react/eff";
|
|
10
|
+
import * as AST from "@eslint-react/ast";
|
|
11
11
|
|
|
12
12
|
//#region rolldown:runtime
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
@@ -41,7 +41,7 @@ const rules = {
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region package.json
|
|
43
43
|
var name = "eslint-plugin-react-naming-convention";
|
|
44
|
-
var version = "2.6.5-next.
|
|
44
|
+
var version = "2.6.5-next.1";
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/utils/create-rule.ts
|
|
@@ -95,7 +95,7 @@ function create$5(context) {
|
|
|
95
95
|
const options = normalizeOptions(context.options);
|
|
96
96
|
const { rule } = options;
|
|
97
97
|
const fCollector = useComponentCollector(context);
|
|
98
|
-
const cCollector = useComponentCollectorLegacy();
|
|
98
|
+
const cCollector = useComponentCollectorLegacy(context);
|
|
99
99
|
return {
|
|
100
100
|
...fCollector.listeners,
|
|
101
101
|
...cCollector.listeners,
|
|
@@ -111,14 +111,11 @@ function create$5(context) {
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
for (const {
|
|
115
|
-
const id = AST.getClassId(component);
|
|
116
|
-
if (id?.name == null) continue;
|
|
117
|
-
const name$2 = id.name;
|
|
114
|
+
for (const { id, name: name$2, node } of cCollector.ctx.getAllComponents(program)) {
|
|
118
115
|
if (isValidName(name$2, options)) continue;
|
|
119
116
|
context.report({
|
|
120
117
|
messageId: "invalidComponentName",
|
|
121
|
-
node: id,
|
|
118
|
+
node: id ?? node,
|
|
122
119
|
data: {
|
|
123
120
|
name: name$2,
|
|
124
121
|
rule
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "2.6.5-next.
|
|
3
|
+
"version": "2.6.5-next.1",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"compare-versions": "^6.1.1",
|
|
46
46
|
"string-ts": "^2.3.1",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "2.6.5-next.
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/shared": "2.6.5-next.
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
48
|
+
"@eslint-react/ast": "2.6.5-next.1",
|
|
49
|
+
"@eslint-react/core": "2.6.5-next.1",
|
|
50
|
+
"@eslint-react/shared": "2.6.5-next.1",
|
|
51
|
+
"@eslint-react/var": "2.6.5-next.1",
|
|
52
|
+
"@eslint-react/eff": "2.6.5-next.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.8",
|