eslint-plugin-react-naming-convention 2.0.0-next.171 → 2.0.0-next.173
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 +3 -5
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getConfigAdapters, getDocsUrl
|
|
1
|
+
import { getConfigAdapters, getDocsUrl } from "@eslint-react/shared";
|
|
2
2
|
import * as AST from "@eslint-react/ast";
|
|
3
3
|
import * as ER from "@eslint-react/core";
|
|
4
4
|
import { RegExp } from "@eslint-react/kit";
|
|
@@ -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 = "2.0.0-next.
|
|
34
|
+
var version = "2.0.0-next.173";
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/utils/create-rule.ts
|
|
@@ -378,10 +378,8 @@ var use_state_default = createRule({
|
|
|
378
378
|
defaultOptions: []
|
|
379
379
|
});
|
|
380
380
|
function create(context) {
|
|
381
|
-
const alias = getSettingsFromContext(context).additionalHooks.useState ?? [];
|
|
382
|
-
const isUseStateCall = ER.isReactHookCallWithNameAlias(context, "useState", alias);
|
|
383
381
|
return { CallExpression(node) {
|
|
384
|
-
if (!isUseStateCall(node)) return;
|
|
382
|
+
if (!ER.isUseStateCall(node)) return;
|
|
385
383
|
if (node.parent.type !== AST_NODE_TYPES.VariableDeclarator) {
|
|
386
384
|
context.report({
|
|
387
385
|
messageId: "invalidAssignment",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.173",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.42.0",
|
|
42
42
|
"string-ts": "^2.2.1",
|
|
43
43
|
"ts-pattern": "^5.8.0",
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/core": "2.0.0-next.173",
|
|
45
|
+
"@eslint-react/ast": "2.0.0-next.173",
|
|
46
|
+
"@eslint-react/eff": "2.0.0-next.173",
|
|
47
|
+
"@eslint-react/kit": "2.0.0-next.173",
|
|
48
|
+
"@eslint-react/shared": "2.0.0-next.173",
|
|
49
|
+
"@eslint-react/var": "2.0.0-next.173"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/react": "^19.1.12",
|