@eslint-react/core 5.2.4-beta.1 → 5.2.4-beta.3
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.d.ts +10 -12
- package/dist/index.js +6 -9
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -347,6 +347,16 @@ declare function getFunctionDirectives(node: TSESTreeFunction): TSESTreeDirectiv
|
|
|
347
347
|
* @returns `true` if the directive exists, `false` otherwise.
|
|
348
348
|
*/
|
|
349
349
|
declare function isFunctionHasDirective(node: TSESTreeFunction, name: string): boolean;
|
|
350
|
+
type FunctionDisplayNameAssignment = TSESTree.AssignmentExpression & {
|
|
351
|
+
left: TSESTree.MemberExpression & {
|
|
352
|
+
property: TSESTree.Identifier & {
|
|
353
|
+
name: "displayName";
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
operator: "=";
|
|
357
|
+
right: TSESTree.Literal;
|
|
358
|
+
};
|
|
359
|
+
declare const SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT: string;
|
|
350
360
|
//#endregion
|
|
351
361
|
//#region src/function-component.d.ts
|
|
352
362
|
/**
|
|
@@ -519,18 +529,6 @@ declare namespace getFunctionComponentCollector {
|
|
|
519
529
|
*/
|
|
520
530
|
declare function getFunctionComponentCollector(context: RuleContext, options?: getFunctionComponentCollector.Options): getFunctionComponentCollector.ReturnType;
|
|
521
531
|
//#endregion
|
|
522
|
-
//#region src/function-display-name.d.ts
|
|
523
|
-
type FunctionDisplayNameAssignment = TSESTree.AssignmentExpression & {
|
|
524
|
-
left: TSESTree.MemberExpression & {
|
|
525
|
-
property: TSESTree.Identifier & {
|
|
526
|
-
name: "displayName";
|
|
527
|
-
};
|
|
528
|
-
};
|
|
529
|
-
operator: "=";
|
|
530
|
-
right: TSESTree.Literal;
|
|
531
|
-
};
|
|
532
|
-
declare const SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT: string;
|
|
533
|
-
//#endregion
|
|
534
532
|
//#region src/hook.d.ts
|
|
535
533
|
/**
|
|
536
534
|
* Represents a semantic hook node in the AST
|
package/dist/index.js
CHANGED
|
@@ -543,6 +543,12 @@ function getFunctionDirectives(node) {
|
|
|
543
543
|
function isFunctionHasDirective(node, name) {
|
|
544
544
|
return getFunctionDirectives(node).some((d) => d.directive === name);
|
|
545
545
|
}
|
|
546
|
+
const SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT = [
|
|
547
|
+
"AssignmentExpression",
|
|
548
|
+
"[operator='=']",
|
|
549
|
+
"[left.type='MemberExpression']",
|
|
550
|
+
"[left.property.name='displayName']"
|
|
551
|
+
].join("");
|
|
546
552
|
|
|
547
553
|
//#endregion
|
|
548
554
|
//#region src/function-component.ts
|
|
@@ -706,15 +712,6 @@ function isFunctionComponentDefinition(context, node, hint) {
|
|
|
706
712
|
return true;
|
|
707
713
|
}
|
|
708
714
|
|
|
709
|
-
//#endregion
|
|
710
|
-
//#region src/function-display-name.ts
|
|
711
|
-
const SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT = [
|
|
712
|
-
"AssignmentExpression",
|
|
713
|
-
"[operator='=']",
|
|
714
|
-
"[left.type='MemberExpression']",
|
|
715
|
-
"[left.property.name='displayName']"
|
|
716
|
-
].join("");
|
|
717
|
-
|
|
718
715
|
//#endregion
|
|
719
716
|
//#region src/hook.ts
|
|
720
717
|
const REACT_BUILTIN_HOOK_NAMES = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "5.2.4-beta.
|
|
3
|
+
"version": "5.2.4-beta.3",
|
|
4
4
|
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"@typescript-eslint/types": "^8.58.2",
|
|
35
35
|
"@typescript-eslint/utils": "^8.58.2",
|
|
36
36
|
"ts-pattern": "^5.9.0",
|
|
37
|
-
"@eslint-react/
|
|
38
|
-
"@eslint-react/jsx": "5.2.4-beta.
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/
|
|
41
|
-
"@eslint-react/
|
|
37
|
+
"@eslint-react/eslint": "5.2.4-beta.3",
|
|
38
|
+
"@eslint-react/jsx": "5.2.4-beta.3",
|
|
39
|
+
"@eslint-react/ast": "5.2.4-beta.3",
|
|
40
|
+
"@eslint-react/shared": "5.2.4-beta.3",
|
|
41
|
+
"@eslint-react/var": "5.2.4-beta.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@typescript-eslint/typescript-estree": "^8.58.2",
|
|
45
|
-
"tsdown": "^0.21.
|
|
45
|
+
"tsdown": "^0.21.9",
|
|
46
46
|
"@local/configs": "0.0.0",
|
|
47
47
|
"@local/eff": "3.0.0-beta.72"
|
|
48
48
|
},
|