eslint-plugin-react-x 1.45.4-next.2 → 1.45.4-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 +5 -5
- package/dist/index.mjs +6 -6
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var settings3 = {
|
|
|
143
143
|
|
|
144
144
|
// package.json
|
|
145
145
|
var name4 = "eslint-plugin-react-x";
|
|
146
|
-
var version = "1.45.4-next.
|
|
146
|
+
var version = "1.45.4-next.4";
|
|
147
147
|
var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("x"));
|
|
148
148
|
|
|
149
149
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -2617,7 +2617,7 @@ function create45(context) {
|
|
|
2617
2617
|
const { version: version2 } = shared.getSettingsFromContext(context);
|
|
2618
2618
|
const isReact18OrBelow = compareVersions.compare(version2, "19.0.0", "<");
|
|
2619
2619
|
const { ctx, listeners } = ER22__namespace.useComponentCollector(context);
|
|
2620
|
-
const constructions = /* @__PURE__ */ new
|
|
2620
|
+
const constructions = /* @__PURE__ */ new WeakMap();
|
|
2621
2621
|
return {
|
|
2622
2622
|
...listeners,
|
|
2623
2623
|
JSXOpeningElement(node) {
|
|
@@ -2640,7 +2640,7 @@ function create45(context) {
|
|
|
2640
2640
|
if (ER22__namespace.isReactHookCall(construction.node)) {
|
|
2641
2641
|
return;
|
|
2642
2642
|
}
|
|
2643
|
-
eff.
|
|
2643
|
+
eff.getOrElseUpdate(constructions, functionEntry.node, () => []).push(construction);
|
|
2644
2644
|
},
|
|
2645
2645
|
"Program:exit"(program) {
|
|
2646
2646
|
const components = ctx.getAllComponents(program).values();
|
|
@@ -2688,7 +2688,7 @@ var no_unstable_default_props_default = createRule({
|
|
|
2688
2688
|
});
|
|
2689
2689
|
function create46(context) {
|
|
2690
2690
|
const { ctx, listeners } = ER22__namespace.useComponentCollector(context);
|
|
2691
|
-
const declarators = /* @__PURE__ */ new
|
|
2691
|
+
const declarators = /* @__PURE__ */ new WeakMap();
|
|
2692
2692
|
return {
|
|
2693
2693
|
...listeners,
|
|
2694
2694
|
"Program:exit"(program) {
|
|
@@ -2734,7 +2734,7 @@ function create46(context) {
|
|
|
2734
2734
|
[kit.SEL.OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR](node) {
|
|
2735
2735
|
const functionEntry = ctx.getCurrentEntry();
|
|
2736
2736
|
if (functionEntry == null) return;
|
|
2737
|
-
eff.
|
|
2737
|
+
eff.getOrElseUpdate(
|
|
2738
2738
|
declarators,
|
|
2739
2739
|
functionEntry.node,
|
|
2740
2740
|
() => []
|
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { match, isMatching, P } from 'ts-pattern';
|
|
|
8
8
|
import ts, { JsxEmit } from 'typescript';
|
|
9
9
|
import * as AST8 from '@eslint-react/ast';
|
|
10
10
|
import * as ER22 from '@eslint-react/core';
|
|
11
|
-
import { flow,
|
|
11
|
+
import { flow, getOrElseUpdate, constTrue, constFalse, _ } from '@eslint-react/eff';
|
|
12
12
|
import { compare } from 'compare-versions';
|
|
13
13
|
import { getConstrainedTypeAtLocation, isTypeReadonly } from '@typescript-eslint/type-utils';
|
|
14
14
|
import { unionTypeParts, isTypeFlagSet, isTrueLiteralType, isFalseLiteralType } from 'ts-api-utils';
|
|
@@ -115,7 +115,7 @@ var settings3 = {
|
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
117
|
var name4 = "eslint-plugin-react-x";
|
|
118
|
-
var version = "1.45.4-next.
|
|
118
|
+
var version = "1.45.4-next.4";
|
|
119
119
|
var createRule = ESLintUtils.RuleCreator(getDocsUrl("x"));
|
|
120
120
|
|
|
121
121
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -2589,7 +2589,7 @@ function create45(context) {
|
|
|
2589
2589
|
const { version: version2 } = getSettingsFromContext(context);
|
|
2590
2590
|
const isReact18OrBelow = compare(version2, "19.0.0", "<");
|
|
2591
2591
|
const { ctx, listeners } = ER22.useComponentCollector(context);
|
|
2592
|
-
const constructions = /* @__PURE__ */ new
|
|
2592
|
+
const constructions = /* @__PURE__ */ new WeakMap();
|
|
2593
2593
|
return {
|
|
2594
2594
|
...listeners,
|
|
2595
2595
|
JSXOpeningElement(node) {
|
|
@@ -2612,7 +2612,7 @@ function create45(context) {
|
|
|
2612
2612
|
if (ER22.isReactHookCall(construction.node)) {
|
|
2613
2613
|
return;
|
|
2614
2614
|
}
|
|
2615
|
-
|
|
2615
|
+
getOrElseUpdate(constructions, functionEntry.node, () => []).push(construction);
|
|
2616
2616
|
},
|
|
2617
2617
|
"Program:exit"(program) {
|
|
2618
2618
|
const components = ctx.getAllComponents(program).values();
|
|
@@ -2660,7 +2660,7 @@ var no_unstable_default_props_default = createRule({
|
|
|
2660
2660
|
});
|
|
2661
2661
|
function create46(context) {
|
|
2662
2662
|
const { ctx, listeners } = ER22.useComponentCollector(context);
|
|
2663
|
-
const declarators = /* @__PURE__ */ new
|
|
2663
|
+
const declarators = /* @__PURE__ */ new WeakMap();
|
|
2664
2664
|
return {
|
|
2665
2665
|
...listeners,
|
|
2666
2666
|
"Program:exit"(program) {
|
|
@@ -2706,7 +2706,7 @@ function create46(context) {
|
|
|
2706
2706
|
[SEL.OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR](node) {
|
|
2707
2707
|
const functionEntry = ctx.getCurrentEntry();
|
|
2708
2708
|
if (functionEntry == null) return;
|
|
2709
|
-
|
|
2709
|
+
getOrElseUpdate(
|
|
2710
2710
|
declarators,
|
|
2711
2711
|
functionEntry.node,
|
|
2712
2712
|
() => []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.45.4-next.
|
|
3
|
+
"version": "1.45.4-next.4",
|
|
4
4
|
"description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"is-immutable-type": "^5.0.1",
|
|
51
51
|
"string-ts": "^2.2.1",
|
|
52
52
|
"ts-pattern": "^5.7.0",
|
|
53
|
-
"@eslint-react/ast": "1.45.4-next.
|
|
54
|
-
"@eslint-react/core": "1.45.4-next.
|
|
55
|
-
"@eslint-react/jsx": "1.45.4-next.
|
|
56
|
-
"@eslint-react/
|
|
57
|
-
"@eslint-react/
|
|
58
|
-
"@eslint-react/
|
|
59
|
-
"@eslint-react/
|
|
53
|
+
"@eslint-react/ast": "1.45.4-next.4",
|
|
54
|
+
"@eslint-react/core": "1.45.4-next.4",
|
|
55
|
+
"@eslint-react/jsx": "1.45.4-next.4",
|
|
56
|
+
"@eslint-react/kit": "1.45.4-next.4",
|
|
57
|
+
"@eslint-react/eff": "1.45.4-next.4",
|
|
58
|
+
"@eslint-react/shared": "1.45.4-next.4",
|
|
59
|
+
"@eslint-react/var": "1.45.4-next.4"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/react": "^19.1.1",
|