@arcgis/eslint-config 5.0.0-next.94 → 5.0.0-next.95

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
  import { ESLintUtils } from "@typescript-eslint/utils";
2
- const version = "5.0.0-next.94";
2
+ const version = "5.0.0-next.95";
3
3
  const packageJson = {
4
4
  version
5
5
  };
@@ -1,4 +1,4 @@
1
- import { m as makeEslintPlugin } from "../../makePlugin-BBiQGLAF.js";
1
+ import { m as makeEslintPlugin } from "../../makePlugin-CIBEf0FX.js";
2
2
  import { AST_NODE_TYPES, ESLintUtils, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
3
3
  import ts from "typescript";
4
4
  import { camelToKebab } from "@arcgis/toolkit/string";
@@ -1 +1,2 @@
1
1
  export declare const isTestFile: (filePath: string) => boolean;
2
+ export declare const isStorybookFile: (filePath: string) => boolean;
@@ -1,4 +1,4 @@
1
- import { m as makeEslintPlugin } from "../../makePlugin-BBiQGLAF.js";
1
+ import { m as makeEslintPlugin } from "../../makePlugin-CIBEf0FX.js";
2
2
  import { resolve } from "path/posix";
3
3
  import { AST_NODE_TYPES } from "@typescript-eslint/utils";
4
4
  const plugin = makeEslintPlugin(
@@ -6,6 +6,7 @@ const plugin = makeEslintPlugin(
6
6
  (rule) => `https://devtopia.esri.com/WebGIS/arcgis-web-components/tree/main/packages/support-packages/eslint-config/src/plugins/webgis/rules/${rule}.ts`
7
7
  );
8
8
  const isTestFile = (filePath) => filePath.includes("/test") || filePath.includes(".test") || filePath.includes(".spec") || filePath.includes("e2e") || filePath.includes("__") || filePath.includes("/.");
9
+ const isStorybookFile = (filePath) => filePath.includes(".stories");
9
10
  const description$4 = `Imports of files outside the src/ folder are not-portable and likely to break for consumers of this package.`;
10
11
  plugin.createRule({
11
12
  name: "no-import-outside-src",
@@ -196,6 +197,9 @@ plugin.createRule({
196
197
  },
197
198
  defaultOptions: [],
198
199
  create(context) {
200
+ if (isTestFile(context.filename) || isStorybookFile(context.filename)) {
201
+ return {};
202
+ }
199
203
  return {
200
204
  // NOTE: CallExpression is not enough. Use MemberExpression to handle callbacks, e.g. .catch(console.error)
201
205
  MemberExpression(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/eslint-config",
3
- "version": "5.0.0-next.94",
3
+ "version": "5.0.0-next.95",
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/toolkit": "5.0.0-next.94",
23
+ "@arcgis/toolkit": "5.0.0-next.95",
24
24
  "@eslint/js": "^9.39.1",
25
25
  "@eslint/markdown": "^7.5.1",
26
26
  "@types/confusing-browser-globals": "^1.0.3",