@arcgis/eslint-config 4.34.0-next.2 → 4.34.0-next.20
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,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-BMNfiqxJ.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/components-utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-BMNfiqxJ.js";
|
|
2
2
|
import { resolve } from "node:path/posix";
|
|
3
3
|
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
4
4
|
const plugin = makeEslintPlugin(
|
|
@@ -94,9 +94,10 @@ plugin.createRule({
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
const reTouchingJsDoc = /\*\/\s+\/\*\*/gu;
|
|
97
|
-
const description$1 = `@arcgis/core imports need to end with .js for better compatibility with @arcgis/core
|
|
97
|
+
const description$1 = `@arcgis/core imports need to end with .js for better compatibility with ESM CDN builds for @arcgis/core and other packages.`;
|
|
98
|
+
const packagesToEnforce = ["@arcgis/core/", "@amcharts/amcharts4/", "@amcharts/amcharts5/"];
|
|
98
99
|
plugin.createRule({
|
|
99
|
-
name: "require-js-in-
|
|
100
|
+
name: "require-js-in-imports",
|
|
100
101
|
meta: {
|
|
101
102
|
docs: {
|
|
102
103
|
description: description$1,
|
|
@@ -119,7 +120,7 @@ plugin.createRule({
|
|
|
119
120
|
return;
|
|
120
121
|
}
|
|
121
122
|
const specifier = node.source.value;
|
|
122
|
-
if (typeof specifier !== "string" || !specifier.startsWith(
|
|
123
|
+
if (typeof specifier !== "string" || !packagesToEnforce.some((pkg) => specifier.startsWith(pkg)) || // Already ends with .js or .json
|
|
123
124
|
specifier.includes(".")) {
|
|
124
125
|
return;
|
|
125
126
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/eslint-config",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.20",
|
|
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.34.0-next.
|
|
23
|
+
"@arcgis/components-utils": "4.34.0-next.20",
|
|
24
24
|
"@eslint/js": "^9.23.0",
|
|
25
25
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
26
26
|
"confusing-browser-globals": "^1.0.11",
|
/package/dist/plugins/webgis/rules/{require-js-in-core-import.d.ts → require-js-in-imports.d.ts}
RENAMED
|
File without changes
|