@arcgis/eslint-config 5.2.0-next.99 → 5.2.0

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,42 +1,27 @@
1
+ import { d as disabledRules } from "../chunks/disabledRules.js";
1
2
  import eslintPluginStorybook from "eslint-plugin-storybook";
2
3
  import { luminaPlugin } from "../plugins/lumina/index.js";
4
+ const disabledLuminaRules = [
5
+ // It's a good practice for @method() in components to be async even if
6
+ // they don't have await
7
+ "@typescript-eslint/require-await"
8
+ ];
3
9
  const storybookConfig = [
4
10
  {
5
11
  ignores: ["**/storybook-static*"]
6
12
  },
7
- ...eslintPluginStorybook.configs["flat/recommended"].map((config2) => ({
8
- ...config2,
9
- files: ["**/*.stories.@(ts|tsx)"]
10
- })),
11
- ...eslintPluginStorybook.configs["flat/addon-interactions"].map((config2) => ({
12
- ...config2,
13
- files: ["**/*.stories.@(ts|tsx)"]
14
- })),
15
- ...eslintPluginStorybook.configs["flat/csf-strict"].map((config2) => ({
16
- ...config2,
17
- files: ["**/*.stories.@(ts|tsx)"]
18
- })),
19
13
  {
20
14
  files: ["**/*.stories.@(ts|tsx)"],
15
+ plugins: { storybook: eslintPluginStorybook },
21
16
  rules: {
22
- // Redundant with https://typescript-eslint.io/rules/no-floating-promises/
23
- "storybook/await-interactions": "off",
24
- // Not applicable in our web-component setup
25
- "storybook/csf-component": "off",
26
- // This rule is for detecting usages of deprecated feature that we don't use
27
- "storybook/hierarchy-separator": "off",
28
- // Not applicable in our web-component setup
29
- "storybook/no-title-property-in-meta": "off",
30
- // Not applicable as we have a central Storybook config (@arcgis/storybook-utils)
31
- "storybook/no-uninstalled-addons": "off",
32
- // Not that helpful as we have a central Storybook config (@arcgis/storybook-utils)
33
- "storybook/no-renderer-packages": "off",
34
- // We never used storiesOf, and it's no longer included in Storybook
35
- "storybook/no-stories-of": "off",
36
- // Redundant with TypeScript
37
- "storybook/context-in-play-function": "off",
17
+ "storybook/default-exports": "error",
38
18
  // Enforces writing satisfies Meta after the meta object definition to ensure that stories use the correct properties in the metadata.
39
19
  "storybook/meta-satisfies-type": "error",
20
+ "storybook/no-redundant-story-name": "warn",
21
+ "storybook/prefer-pascal-case": "warn",
22
+ "storybook/story-exports": "error",
23
+ "storybook/use-storybook-expect": "error",
24
+ "storybook/use-storybook-testing-library": "error",
40
25
  // In our Lumina stories, render args should infer from Meta<T>/StoryObj<T>.
41
26
  "webgis/no-story-render-args-type-annotation": "error"
42
27
  }
@@ -59,11 +44,7 @@ const config = [
59
44
  {
60
45
  files: ["**/*.tsx"],
61
46
  rules: {
62
- // It's a good practice for @method() in components to be async even if
63
- // they don't have await
64
- "@typescript-eslint/require-await": "off",
65
- // Too many offenders for now to report this as an error. Assigned issues to tackle this.
66
- "lumina/no-create-element-component": "warn",
47
+ ...disabledRules(disabledLuminaRules),
67
48
  "@typescript-eslint/no-restricted-imports": [
68
49
  "error",
69
50
  {
@@ -137,7 +118,9 @@ declare global {
137
118
  }
138
119
  ]
139
120
  }
140
- ]
121
+ ],
122
+ // Too many offenders for now to report this as an error. Assigned issues to tackle this.
123
+ "lumina/no-create-element-component": "warn"
141
124
  }
142
125
  }
143
126
  /*{
@@ -1,4 +1,4 @@
1
- import { m as makeEslintPlugin } from "../../makePlugin-Cvfc0MLz.js";
1
+ import { m as makeEslintPlugin } from "../../chunks/makePlugin.js";
2
2
  import { generateDifferences, showInvisibles } from "prettier-linter-helpers";
3
3
  import { AST_NODE_TYPES, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
4
4
  import path, { relative, win32, posix, normalize } from "path";
@@ -1,6 +1,6 @@
1
- import { m as makeEslintPlugin } from "../../makePlugin-Cvfc0MLz.js";
1
+ import { m as makeEslintPlugin } from "../../chunks/makePlugin.js";
2
2
  import { AST_NODE_TYPES, ESLintUtils, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
3
- import { l as luminaJsxExportName, a as luminaEntrypointName, b as luminaTestEntrypointName, s as sourceCodeDeclaresComponent, p as parsePropertyDecorator, g as getProperty, i as isGetterWithoutSetter, e as extractDeclareElementsInterface, c as isCreateEvent, h as hasDecorator, d as getName, f as checkForLuminaJsx, j as isBindThisCallee, k as getComponentDeclaration, u as unwrapExpression } from "../../estree-Ern7-L05.js";
3
+ import { l as luminaJsxExportName, a as luminaEntrypointName, b as luminaTestEntrypointName, s as sourceCodeDeclaresComponent, p as parsePropertyDecorator, g as getProperty, i as isGetterWithoutSetter, e as extractDeclareElementsInterface, c as isCreateEvent, h as hasDecorator, d as getName, f as checkForLuminaJsx, j as isBindThisCallee, k as getComponentDeclaration, u as unwrapExpression } from "../../chunks/estree.js";
4
4
  import ts from "typescript";
5
5
  import { camelToKebab } from "@arcgis/toolkit/string";
6
6
  const plugin = makeEslintPlugin(
@@ -1,10 +1,10 @@
1
- import { m as makeEslintPlugin } from "../../makePlugin-Cvfc0MLz.js";
1
+ import { m as makeEslintPlugin } from "../../chunks/makePlugin.js";
2
2
  import { TSESTree, AST_TOKEN_TYPES, AST_NODE_TYPES, TSESLint } from "@typescript-eslint/utils";
3
3
  import path from "node:path";
4
4
  import { resolve } from "path/posix";
5
5
  import globals from "globals";
6
6
  import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
7
- import { e as extractDeclareElementsInterface, k as getComponentDeclaration } from "../../estree-Ern7-L05.js";
7
+ import { e as extractDeclareElementsInterface, k as getComponentDeclaration } from "../../chunks/estree.js";
8
8
  const plugin = makeEslintPlugin(
9
9
  "webgis",
10
10
  (rule) => `https://devtopia.esri.com/WebGIS/webgis-sdk/tree/main/packages/support-packages/eslint-config/src/plugins/webgis/rules/${rule}.ts`
@@ -867,7 +867,7 @@ plugin.createRule({
867
867
  meta: {
868
868
  docs: {
869
869
  description: description$2,
870
- defaultLevel: "warn",
870
+ defaultLevel: "error",
871
871
  isTypeChecked: false
872
872
  },
873
873
  messages: {
@@ -913,7 +913,7 @@ plugin.createRule({
913
913
  meta: {
914
914
  docs: {
915
915
  description: description$1,
916
- defaultLevel: "warn",
916
+ defaultLevel: "error",
917
917
  isTypeChecked: false
918
918
  },
919
919
  messages: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/eslint-config",
3
- "version": "5.2.0-next.99",
3
+ "version": "5.2.0",
4
4
  "description": "ESLint configuration for WebGIS SDK",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,8 +21,7 @@
21
21
  ],
22
22
  "license": "SEE LICENSE IN LICENSE.md",
23
23
  "dependencies": {
24
- "@arcgis/toolkit": "5.2.0-next.99",
25
- "@eslint/js": "^10.0.1",
24
+ "@arcgis/toolkit": "5.2.0",
26
25
  "@eslint/markdown": "^8.0.3",
27
26
  "@types/confusing-browser-globals": "^1.0.3",
28
27
  "@typescript-eslint/utils": "^8.63.0",
File without changes