eslint-plugin-react-naming-convention 1.24.0-next.2 → 1.24.0-next.4
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 +12 -2
- package/dist/index.mjs +13 -3
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
38
|
var name = "eslint-plugin-react-naming-convention";
|
|
39
|
-
var version = "1.24.0-next.
|
|
39
|
+
var version = "1.24.0-next.4";
|
|
40
40
|
var createRule = shared.createRuleForPlugin("naming-convention");
|
|
41
41
|
|
|
42
42
|
// src/rules/component-name.ts
|
|
@@ -382,7 +382,17 @@ var use_state_default = createRule({
|
|
|
382
382
|
name: RULE_NAME4,
|
|
383
383
|
create(context) {
|
|
384
384
|
const alias = shared.getSettingsFromContext(context).additionalHooks?.useState ?? [];
|
|
385
|
-
const {
|
|
385
|
+
const {
|
|
386
|
+
ctx,
|
|
387
|
+
listeners
|
|
388
|
+
} = core.useComponentCollector(
|
|
389
|
+
context,
|
|
390
|
+
core.DEFAULT_COMPONENT_HINT,
|
|
391
|
+
{
|
|
392
|
+
collectDisplayName: false,
|
|
393
|
+
collectHookCalls: true
|
|
394
|
+
}
|
|
395
|
+
);
|
|
386
396
|
return {
|
|
387
397
|
...listeners,
|
|
388
398
|
"Program:exit"(node) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as AST from '@eslint-react/ast';
|
|
2
|
-
import { useComponentCollector, useComponentCollectorLegacy, isUseStateCall, isReactHookCallWithNameLoose } from '@eslint-react/core';
|
|
2
|
+
import { useComponentCollector, useComponentCollectorLegacy, DEFAULT_COMPONENT_HINT, isUseStateCall, isReactHookCallWithNameLoose } from '@eslint-react/core';
|
|
3
3
|
import { isObject, returnFalse } from '@eslint-react/eff';
|
|
4
4
|
import * as JSX from '@eslint-react/jsx';
|
|
5
5
|
import { createRuleForPlugin, getSettingsFromContext, RE_CONSTANT_CASE, RE_PASCAL_CASE, RE_CAMEL_CASE, RE_KEBAB_CASE, RE_SNAKE_CASE } from '@eslint-react/shared';
|
|
@@ -10,7 +10,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
|
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
12
|
var name = "eslint-plugin-react-naming-convention";
|
|
13
|
-
var version = "1.24.0-next.
|
|
13
|
+
var version = "1.24.0-next.4";
|
|
14
14
|
var createRule = createRuleForPlugin("naming-convention");
|
|
15
15
|
|
|
16
16
|
// src/rules/component-name.ts
|
|
@@ -356,7 +356,17 @@ var use_state_default = createRule({
|
|
|
356
356
|
name: RULE_NAME4,
|
|
357
357
|
create(context) {
|
|
358
358
|
const alias = getSettingsFromContext(context).additionalHooks?.useState ?? [];
|
|
359
|
-
const {
|
|
359
|
+
const {
|
|
360
|
+
ctx,
|
|
361
|
+
listeners
|
|
362
|
+
} = useComponentCollector(
|
|
363
|
+
context,
|
|
364
|
+
DEFAULT_COMPONENT_HINT,
|
|
365
|
+
{
|
|
366
|
+
collectDisplayName: false,
|
|
367
|
+
collectHookCalls: true
|
|
368
|
+
}
|
|
369
|
+
);
|
|
360
370
|
return {
|
|
361
371
|
...listeners,
|
|
362
372
|
"Program:exit"(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "1.24.0-next.
|
|
3
|
+
"version": "1.24.0-next.4",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -47,12 +47,11 @@
|
|
|
47
47
|
"@typescript-eslint/utils": "^8.19.1",
|
|
48
48
|
"string-ts": "^2.2.0",
|
|
49
49
|
"ts-pattern": "^5.6.0",
|
|
50
|
-
"@eslint-react/ast": "1.24.0-next.
|
|
51
|
-
"@eslint-react/core": "1.24.0-next.
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/shared": "1.24.0-next.
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/eff": "1.24.0-next.2"
|
|
50
|
+
"@eslint-react/ast": "1.24.0-next.4",
|
|
51
|
+
"@eslint-react/core": "1.24.0-next.4",
|
|
52
|
+
"@eslint-react/eff": "1.24.0-next.4",
|
|
53
|
+
"@eslint-react/shared": "1.24.0-next.4",
|
|
54
|
+
"@eslint-react/jsx": "1.24.0-next.4"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
57
|
"@types/react": "^19.0.6",
|