eslint-plugin-react-naming-convention 5.1.0-next.0 → 5.2.0-beta.0
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 -5
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from "@eslint-react/core";
|
|
2
|
-
import {
|
|
2
|
+
import { merge } from "@eslint-react/eslint";
|
|
3
3
|
import { findEnclosingAssignmentTarget } from "@eslint-react/var";
|
|
4
4
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
5
5
|
import { P, match } from "ts-pattern";
|
|
@@ -25,7 +25,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region package.json
|
|
27
27
|
var name$1 = "eslint-plugin-react-naming-convention";
|
|
28
|
-
var version = "5.
|
|
28
|
+
var version = "5.2.0-beta.0";
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/utils/create-rule.ts
|
|
@@ -50,7 +50,7 @@ var context_name_default = createRule({
|
|
|
50
50
|
});
|
|
51
51
|
function create$2(context) {
|
|
52
52
|
if (!context.sourceCode.text.includes("createContext")) return {};
|
|
53
|
-
return
|
|
53
|
+
return merge({ CallExpression(node) {
|
|
54
54
|
if (!core.isCreateContextCall(context, node)) return;
|
|
55
55
|
const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
|
|
56
56
|
type: AST_NODE_TYPES.Identifier,
|
|
@@ -84,7 +84,7 @@ var id_name_default = createRule({
|
|
|
84
84
|
});
|
|
85
85
|
function create$1(context) {
|
|
86
86
|
if (!context.sourceCode.text.includes("useId")) return {};
|
|
87
|
-
return
|
|
87
|
+
return merge({ CallExpression(node) {
|
|
88
88
|
if (!core.isUseIdCall(context, node)) return;
|
|
89
89
|
const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
|
|
90
90
|
type: AST_NODE_TYPES.Identifier,
|
|
@@ -118,7 +118,7 @@ var ref_name_default = createRule({
|
|
|
118
118
|
});
|
|
119
119
|
function create(context) {
|
|
120
120
|
if (!context.sourceCode.text.includes("useRef")) return {};
|
|
121
|
-
return
|
|
121
|
+
return merge({ CallExpression(node) {
|
|
122
122
|
if (!core.isUseRefCall(context, node)) return;
|
|
123
123
|
if (ast.getUnderlyingExpression(node.parent).type === AST_NODE_TYPES.MemberExpression) return;
|
|
124
124
|
const [id, name] = match(findEnclosingAssignmentTarget(node)).with({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,10 +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": "5.
|
|
49
|
-
"@eslint-react/core": "5.
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/shared": "5.
|
|
48
|
+
"@eslint-react/ast": "5.2.0-beta.0",
|
|
49
|
+
"@eslint-react/core": "5.2.0-beta.0",
|
|
50
|
+
"@eslint-react/eslint": "5.2.0-beta.0",
|
|
51
|
+
"@eslint-react/shared": "5.2.0-beta.0",
|
|
52
|
+
"@eslint-react/var": "5.2.0-beta.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@types/react": "^19.2.14",
|