@arcgis/eslint-config 4.32.0-next.76 → 4.32.0-next.78
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/{chunk-PXSYKWKU.js → chunk-R3RRGSWE.js} +11 -12
- package/dist/{chunk-Y7ZXXVWO.js → chunk-VRAJGEHK.js} +1 -1
- package/dist/{chunk-CXLY7EQM.js → chunk-Y6N6E2D4.js} +1 -1
- package/dist/config/index.js +2 -2
- package/dist/config/lumina.js +2 -2
- package/dist/plugins/lumina/index.js +2 -2
- package/dist/plugins/lumina/utils/estree.d.ts +1 -0
- package/dist/plugins/webgis/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeEslintPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y6N6E2D4.js";
|
|
4
4
|
|
|
5
5
|
// src/plugins/lumina/rules/add-missing-jsx-import.ts
|
|
6
6
|
import { AST_NODE_TYPES as AST_NODE_TYPES2 } from "@typescript-eslint/utils";
|
|
@@ -92,6 +92,14 @@ function parsePropertyDecorator(decorator) {
|
|
|
92
92
|
properties
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
+
function isBindThisCallee(callee) {
|
|
96
|
+
return callee.type === AST_NODE_TYPES.MemberExpression && // expression.identifier(this)
|
|
97
|
+
callee.property.type === AST_NODE_TYPES.Identifier && // expression.bind(this)
|
|
98
|
+
callee.property.name === "bind" && // expression.expression.bind(this)
|
|
99
|
+
callee.object.type === AST_NODE_TYPES.MemberExpression && // expression.identifier.bind(this)
|
|
100
|
+
callee.object.property.type === AST_NODE_TYPES.Identifier && // this.identifier.bind(this)
|
|
101
|
+
callee.object.object.type === AST_NODE_TYPES.ThisExpression;
|
|
102
|
+
}
|
|
95
103
|
|
|
96
104
|
// src/plugins/lumina/rules/add-missing-jsx-import.ts
|
|
97
105
|
var importDeclaration = `import { ${luminaJsxExportName} } from "${luminaEntrypointName}";`;
|
|
@@ -1130,7 +1138,7 @@ var noInlineArrowInRef = createRule({
|
|
|
1130
1138
|
return;
|
|
1131
1139
|
}
|
|
1132
1140
|
const initializer = node.value.expression;
|
|
1133
|
-
if (initializer.type !== AST_NODE_TYPES9.ArrowFunctionExpression && initializer.type !== AST_NODE_TYPES9.FunctionExpression) {
|
|
1141
|
+
if (initializer.type !== AST_NODE_TYPES9.ArrowFunctionExpression && initializer.type !== AST_NODE_TYPES9.FunctionExpression && (initializer.type !== AST_NODE_TYPES9.CallExpression || !isBindThisCallee(initializer.callee))) {
|
|
1134
1142
|
return;
|
|
1135
1143
|
}
|
|
1136
1144
|
context.report({
|
|
@@ -1619,16 +1627,7 @@ var noUnnecessaryBindThis = createRule({
|
|
|
1619
1627
|
return;
|
|
1620
1628
|
}
|
|
1621
1629
|
const callee = expression.callee;
|
|
1622
|
-
|
|
1623
|
-
// expression.expression(this)
|
|
1624
|
-
callee.type === AST_NODE_TYPES17.MemberExpression && // expression.identifier(this)
|
|
1625
|
-
callee.property.type === AST_NODE_TYPES17.Identifier && // expression.bind(this)
|
|
1626
|
-
callee.property.name === "bind" && // expression.expression.bind(this)
|
|
1627
|
-
callee.object.type === AST_NODE_TYPES17.MemberExpression && // expression.identifier.bind(this)
|
|
1628
|
-
callee.object.property.type === AST_NODE_TYPES17.Identifier && // this.identifier.bind(this)
|
|
1629
|
-
callee.object.object.type === AST_NODE_TYPES17.ThisExpression
|
|
1630
|
-
);
|
|
1631
|
-
if (!isBindThisCall) {
|
|
1630
|
+
if (!isBindThisCallee(callee)) {
|
|
1632
1631
|
return;
|
|
1633
1632
|
}
|
|
1634
1633
|
const tagName = context.sourceCode.getAncestors(node.parent).find((ancestor) => ancestor.type === AST_NODE_TYPES17.JSXOpeningElement)?.name;
|
package/dist/config/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-WAWBOPY7.js";
|
|
4
4
|
import {
|
|
5
5
|
webgis_default
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-VRAJGEHK.js";
|
|
7
|
+
import "../chunk-Y6N6E2D4.js";
|
|
8
8
|
|
|
9
9
|
// src/config/index.ts
|
|
10
10
|
import eslint from "@eslint/js";
|
package/dist/config/lumina.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-WAWBOPY7.js";
|
|
4
4
|
import {
|
|
5
5
|
lumina_default
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-R3RRGSWE.js";
|
|
7
|
+
import "../chunk-Y6N6E2D4.js";
|
|
8
8
|
|
|
9
9
|
// src/config/storybook.ts
|
|
10
10
|
import eslintPluginStorybook from "eslint-plugin-storybook";
|
|
@@ -17,4 +17,5 @@ export declare function parsePropertyDecorator(decorator: TSESTree.Decorator): {
|
|
|
17
17
|
readonly options: TSESTree.ObjectExpression | undefined;
|
|
18
18
|
readonly properties: TSESTree.ObjectLiteralElement[] | undefined;
|
|
19
19
|
} | undefined;
|
|
20
|
+
export declare function isBindThisCallee(callee: TSESTree.Expression): callee is TSESTree.MemberExpression;
|
|
20
21
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/eslint-config",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.78",
|
|
4
4
|
"description": "ESLint configuration for arcgis-web-components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
23
|
+
"@arcgis/components-utils": "4.32.0-next.78",
|
|
24
24
|
"@eslint/js": "^9.17.0",
|
|
25
25
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
26
26
|
"confusing-browser-globals": "^1.0.11",
|