@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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-CXLY7EQM.js";
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
- const isBindThisCall = (
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;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-CXLY7EQM.js";
3
+ } from "./chunk-Y6N6E2D4.js";
4
4
 
5
5
  // src/plugins/webgis/utils/creator.ts
6
6
  import { ESLintUtils } from "@typescript-eslint/utils";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.32.0-next.76";
2
+ var version = "4.32.0-next.78";
3
3
 
4
4
  // src/plugins/utils/makePlugin.ts
5
5
  function makeEslintPlugin(pluginName, rules) {
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  webgis_default
6
- } from "../chunk-Y7ZXXVWO.js";
7
- import "../chunk-CXLY7EQM.js";
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";
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  lumina_default
6
- } from "../chunk-PXSYKWKU.js";
7
- import "../chunk-CXLY7EQM.js";
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";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  lumina_default
3
- } from "../../chunk-PXSYKWKU.js";
4
- import "../../chunk-CXLY7EQM.js";
3
+ } from "../../chunk-R3RRGSWE.js";
4
+ import "../../chunk-Y6N6E2D4.js";
5
5
  export {
6
6
  lumina_default as default
7
7
  };
@@ -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 {};
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webgis_default
3
- } from "../../chunk-Y7ZXXVWO.js";
4
- import "../../chunk-CXLY7EQM.js";
3
+ } from "../../chunk-VRAJGEHK.js";
4
+ import "../../chunk-Y6N6E2D4.js";
5
5
  export {
6
6
  webgis_default as default
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/eslint-config",
3
- "version": "4.32.0-next.76",
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.76",
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",