eslint-plugin-react-naming-convention 1.32.0 → 1.32.1-beta.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 +2 -2
- package/dist/index.mjs +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ var rules = {};
|
|
|
49
49
|
|
|
50
50
|
// package.json
|
|
51
51
|
var name2 = "eslint-plugin-react-naming-convention";
|
|
52
|
-
var version = "1.32.
|
|
52
|
+
var version = "1.32.1-beta.1";
|
|
53
53
|
var createRule = shared.createRuleForPlugin("naming-convention");
|
|
54
54
|
|
|
55
55
|
// src/utils/regexp.ts
|
|
@@ -202,7 +202,7 @@ var context_name_default = createRule({
|
|
|
202
202
|
const id = core.getInstanceId(node);
|
|
203
203
|
if (id == null) return;
|
|
204
204
|
const name3 = tsPattern.match(id).with({ type: types.AST_NODE_TYPES.Identifier, name: tsPattern.P.select() }, eff.identity).with({ type: types.AST_NODE_TYPES.MemberExpression, property: { name: tsPattern.P.select(tsPattern.P.string) } }, eff.identity).otherwise(() => eff._);
|
|
205
|
-
if (name3 != null &&
|
|
205
|
+
if (name3 != null && core.isComponentName(name3) && name3.endsWith("Context")) return;
|
|
206
206
|
context.report({
|
|
207
207
|
messageId: "invalid",
|
|
208
208
|
node: id
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as AST from '@eslint-react/ast';
|
|
2
|
-
import { useComponentCollector, useComponentCollectorLegacy, isCreateContextCall, getInstanceId } from '@eslint-react/core';
|
|
2
|
+
import { useComponentCollector, useComponentCollectorLegacy, isCreateContextCall, getInstanceId, isComponentName } from '@eslint-react/core';
|
|
3
3
|
import { createRuleForPlugin, RE_PASCAL_CASE, RE_CONSTANT_CASE, RE_CAMEL_CASE, RE_KEBAB_CASE, RE_SNAKE_CASE } from '@eslint-react/shared';
|
|
4
4
|
import { identity, _, isObject } from '@eslint-react/eff';
|
|
5
5
|
import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
@@ -24,7 +24,7 @@ var rules = {};
|
|
|
24
24
|
|
|
25
25
|
// package.json
|
|
26
26
|
var name2 = "eslint-plugin-react-naming-convention";
|
|
27
|
-
var version = "1.32.
|
|
27
|
+
var version = "1.32.1-beta.1";
|
|
28
28
|
var createRule = createRuleForPlugin("naming-convention");
|
|
29
29
|
|
|
30
30
|
// src/utils/regexp.ts
|
|
@@ -177,7 +177,7 @@ var context_name_default = createRule({
|
|
|
177
177
|
const id = getInstanceId(node);
|
|
178
178
|
if (id == null) return;
|
|
179
179
|
const name3 = match(id).with({ type: AST_NODE_TYPES.Identifier, name: P.select() }, identity).with({ type: AST_NODE_TYPES.MemberExpression, property: { name: P.select(P.string) } }, identity).otherwise(() => _);
|
|
180
|
-
if (name3 != null &&
|
|
180
|
+
if (name3 != null && isComponentName(name3) && name3.endsWith("Context")) return;
|
|
181
181
|
context.report({
|
|
182
182
|
messageId: "invalid",
|
|
183
183
|
node: id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.1-beta.1",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@typescript-eslint/utils": "^8.26.1",
|
|
50
50
|
"string-ts": "^2.2.1",
|
|
51
51
|
"ts-pattern": "^5.6.2",
|
|
52
|
-
"@eslint-react/ast": "1.32.
|
|
53
|
-
"@eslint-react/eff": "1.32.
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/var": "1.32.
|
|
57
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/ast": "1.32.1-beta.1",
|
|
53
|
+
"@eslint-react/eff": "1.32.1-beta.1",
|
|
54
|
+
"@eslint-react/jsx": "1.32.1-beta.1",
|
|
55
|
+
"@eslint-react/shared": "1.32.1-beta.1",
|
|
56
|
+
"@eslint-react/var": "1.32.1-beta.1",
|
|
57
|
+
"@eslint-react/core": "1.32.1-beta.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^19.0.10",
|