@arcgis/eslint-config 4.32.0-next.82 → 4.32.0-next.83

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,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.32.0-next.82";
2
+ var version = "4.32.0-next.83";
3
3
 
4
4
  // src/plugins/utils/makePlugin.ts
5
5
  function makeEslintPlugin(pluginName, rules) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-52CQNWHJ.js";
3
+ } from "./chunk-JWREU472.js";
4
4
 
5
5
  // src/plugins/utils/helpers.ts
6
6
  var isTestFile = (filePath) => filePath.includes("/test") || filePath.includes(".test") || filePath.includes(".spec") || filePath.includes("e2e") || filePath.includes("__") || filePath.includes("/.");
@@ -79,7 +79,7 @@ var noTouchingJsDoc = createRule({
79
79
  Array.from(context.sourceCode.text.matchAll(reTouchingJsDoc), (match) => {
80
80
  const previousJsDocStart = context.sourceCode.text.slice(0, match.index).lastIndexOf("/**");
81
81
  if (previousJsDocStart === -1) {
82
- return;
82
+ return void 0;
83
83
  }
84
84
  const previousJsDocContent = context.sourceCode.text.slice(
85
85
  previousJsDocStart + "/**".length,
@@ -87,7 +87,7 @@ var noTouchingJsDoc = createRule({
87
87
  );
88
88
  const containsOtherComments = previousJsDocContent.includes("*/");
89
89
  if (containsOtherComments) {
90
- return;
90
+ return void 0;
91
91
  }
92
92
  context.report({
93
93
  messageId: "noTouchingJsDoc",
@@ -96,6 +96,7 @@ var noTouchingJsDoc = createRule({
96
96
  end: context.sourceCode.getLocFromIndex(match.index + match[0].length)
97
97
  }
98
98
  });
99
+ return void 0;
99
100
  });
100
101
  }
101
102
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeEslintPlugin
3
- } from "./chunk-52CQNWHJ.js";
3
+ } from "./chunk-JWREU472.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";
@@ -408,10 +408,9 @@ var componentPlacementRules = createRule({
408
408
  context.report({ messageId: "extensionNotTsx", node: luminaDeclarationInterface });
409
409
  return;
410
410
  }
411
- const pathParts = filePath.split("/");
412
- const folderName = pathParts.at(-2);
413
- const fileName = pathParts.at(-1).slice(0, -".tsx".length);
414
- if (folderName !== fileName) {
411
+ const [fileName, folderName] = filePath.split("/").reverse();
412
+ const extensionlessFileName = fileName.slice(0, -".tsx".length);
413
+ if (folderName !== extensionlessFileName) {
415
414
  context.report({ messageId: "fileFolderNameMismatch", node: luminaDeclarationInterface });
416
415
  }
417
416
  }
@@ -550,7 +549,6 @@ If you wish to hide this member from public documentation, use @private or @prot
550
549
  noPropertyDecoratorOnMethods: `Methods must not have @property() nor @state() decorator. Did you mean @property() instead?`,
551
550
  noCombinedPropertyEvent: `Property may either be an event (initialized with createEvent()) or a property (has @property() decorator), but not both`,
552
551
  noCombinedPropertyState: `Property may either be a state (initialized with @state()) or a property (has @property() decorator), but not both`,
553
- methodDecoratorForMethodsOnly: `@method() decorator is only allowed on methods`,
554
552
  noComputedName: `Computed property names are not allowed as they are not statically analyzable`
555
553
  },
556
554
  type: "problem",
@@ -1042,15 +1040,16 @@ var noIgnoreJsDocTag = createRule({
1042
1040
  if (!luminaJsxCheck.isLuminaJsx) {
1043
1041
  return;
1044
1042
  }
1045
- Array.from(context.sourceCode.text.matchAll(reIgnore), (match) => {
1046
- context.report({
1043
+ Array.from(
1044
+ context.sourceCode.text.matchAll(reIgnore),
1045
+ (match) => context.report({
1047
1046
  messageId: "noIgnoreJsDocTag",
1048
1047
  loc: {
1049
1048
  start: context.sourceCode.getLocFromIndex(match.index + "* ".length),
1050
1049
  end: context.sourceCode.getLocFromIndex(match.index + match[0].length)
1051
1050
  }
1052
- });
1053
- });
1051
+ })
1052
+ );
1054
1053
  }
1055
1054
  };
1056
1055
  }
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  webgis_default
6
- } from "../chunk-A7YCHQSA.js";
7
- import "../chunk-52CQNWHJ.js";
6
+ } from "../chunk-M6PRDATW.js";
7
+ import "../chunk-JWREU472.js";
8
8
 
9
9
  // src/config/index.ts
10
10
  import eslint from "@eslint/js";
@@ -312,7 +312,16 @@ var config_default = [
312
312
  "warn",
313
313
  {
314
314
  // Redundant with TypeScript
315
- checksSpreads: false
315
+ checksSpreads: false,
316
+ checksVoidReturn: {
317
+ arguments: true,
318
+ // Allow for patterns like ref={focusElement}
319
+ attributes: false,
320
+ inheritedMethods: true,
321
+ properties: true,
322
+ returns: true,
323
+ variables: true
324
+ }
316
325
  }
317
326
  ],
318
327
  //#endregion
@@ -3,8 +3,8 @@ import {
3
3
  } from "../chunk-WAWBOPY7.js";
4
4
  import {
5
5
  lumina_default
6
- } from "../chunk-KOKBAAYH.js";
7
- import "../chunk-52CQNWHJ.js";
6
+ } from "../chunk-UJH6EC4B.js";
7
+ import "../chunk-JWREU472.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-KOKBAAYH.js";
4
- import "../../chunk-52CQNWHJ.js";
3
+ } from "../../chunk-UJH6EC4B.js";
4
+ import "../../chunk-JWREU472.js";
5
5
  export {
6
6
  lumina_default as default
7
7
  };
@@ -1 +1 @@
1
- export declare const decoratorsContext: import("@typescript-eslint/utils/ts-eslint").RuleModule<"publicApiMustBePublic" | "noPropertyDecoratorOnMethods" | "noCombinedPropertyEvent" | "noCombinedPropertyState" | "methodDecoratorForMethodsOnly" | "noComputedName", [], import("../../utils/makePlugin").CommonDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
1
+ export declare const decoratorsContext: import("@typescript-eslint/utils/ts-eslint").RuleModule<"publicApiMustBePublic" | "noPropertyDecoratorOnMethods" | "noCombinedPropertyEvent" | "noCombinedPropertyState" | "noComputedName", [], import("../../utils/makePlugin").CommonDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  webgis_default
3
- } from "../../chunk-A7YCHQSA.js";
4
- import "../../chunk-52CQNWHJ.js";
3
+ } from "../../chunk-M6PRDATW.js";
4
+ import "../../chunk-JWREU472.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.82",
3
+ "version": "4.32.0-next.83",
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.82",
23
+ "@arcgis/components-utils": "4.32.0-next.83",
24
24
  "@eslint/js": "^9.17.0",
25
25
  "@types/confusing-browser-globals": "^1.0.3",
26
26
  "confusing-browser-globals": "^1.0.11",