@arcgis/eslint-config 4.34.0-next.8 → 4.34.0-next.80
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.
- package/dist/config/applications.d.ts +32 -2
- package/dist/config/index.d.ts +32 -2
- package/dist/config/index.js +28 -6
- package/dist/config/lumina.js +1 -1
- package/dist/{makePlugin-D1Nm3dAG.js → makePlugin-BlMIOyCh.js} +1 -1
- package/dist/plugins/lumina/index.js +3 -3
- package/dist/plugins/webgis/index.js +5 -4
- package/package.json +7 -6
- /package/dist/plugins/webgis/rules/{require-js-in-core-import.d.ts → require-js-in-imports.d.ts} +0 -0
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
-
declare const _default: (
|
|
3
|
-
|
|
2
|
+
declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
|
|
3
|
+
name: string;
|
|
4
|
+
files: string[];
|
|
5
|
+
language: string;
|
|
6
|
+
plugins: {};
|
|
7
|
+
rules: {
|
|
8
|
+
readonly "markdown/fenced-code-language": "error";
|
|
9
|
+
readonly "markdown/heading-increment": "error";
|
|
10
|
+
readonly "markdown/no-duplicate-definitions": "error";
|
|
11
|
+
readonly "markdown/no-empty-definitions": "error";
|
|
12
|
+
readonly "markdown/no-empty-images": "error";
|
|
13
|
+
readonly "markdown/no-empty-links": "error";
|
|
14
|
+
readonly "markdown/no-invalid-label-refs": "error";
|
|
15
|
+
readonly "markdown/no-missing-atx-heading-space": "error";
|
|
16
|
+
readonly "markdown/no-missing-label-refs": "error";
|
|
17
|
+
readonly "markdown/no-missing-link-fragments": "error";
|
|
18
|
+
readonly "markdown/no-multiple-h1": "error";
|
|
19
|
+
readonly "markdown/no-reversed-media-syntax": "error";
|
|
20
|
+
readonly "markdown/require-alt-text": "error";
|
|
21
|
+
readonly "markdown/table-column-count": "error";
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
files: (string | string[])[];
|
|
25
|
+
ignores?: string[];
|
|
26
|
+
language?: string;
|
|
27
|
+
languageOptions?: TSESLint.FlatConfig.LanguageOptions;
|
|
28
|
+
linterOptions?: TSESLint.FlatConfig.LinterOptions;
|
|
29
|
+
name?: string;
|
|
30
|
+
plugins?: TSESLint.FlatConfig.Plugins;
|
|
31
|
+
processor?: string | TSESLint.FlatConfig.Processor;
|
|
32
|
+
rules?: TSESLint.FlatConfig.Rules;
|
|
33
|
+
settings?: TSESLint.FlatConfig.Settings;
|
|
4
34
|
})[];
|
|
5
35
|
export default _default;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
-
declare const _default: (
|
|
3
|
-
|
|
2
|
+
declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
|
|
3
|
+
name: string;
|
|
4
|
+
files: string[];
|
|
5
|
+
language: string;
|
|
6
|
+
plugins: {};
|
|
7
|
+
rules: {
|
|
8
|
+
readonly "markdown/fenced-code-language": "error";
|
|
9
|
+
readonly "markdown/heading-increment": "error";
|
|
10
|
+
readonly "markdown/no-duplicate-definitions": "error";
|
|
11
|
+
readonly "markdown/no-empty-definitions": "error";
|
|
12
|
+
readonly "markdown/no-empty-images": "error";
|
|
13
|
+
readonly "markdown/no-empty-links": "error";
|
|
14
|
+
readonly "markdown/no-invalid-label-refs": "error";
|
|
15
|
+
readonly "markdown/no-missing-atx-heading-space": "error";
|
|
16
|
+
readonly "markdown/no-missing-label-refs": "error";
|
|
17
|
+
readonly "markdown/no-missing-link-fragments": "error";
|
|
18
|
+
readonly "markdown/no-multiple-h1": "error";
|
|
19
|
+
readonly "markdown/no-reversed-media-syntax": "error";
|
|
20
|
+
readonly "markdown/require-alt-text": "error";
|
|
21
|
+
readonly "markdown/table-column-count": "error";
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
files: (string | string[])[];
|
|
25
|
+
ignores?: string[];
|
|
26
|
+
language?: string;
|
|
27
|
+
languageOptions?: TSESLint.FlatConfig.LanguageOptions;
|
|
28
|
+
linterOptions?: TSESLint.FlatConfig.LinterOptions;
|
|
29
|
+
name?: string;
|
|
30
|
+
plugins?: TSESLint.FlatConfig.Plugins;
|
|
31
|
+
processor?: string | TSESLint.FlatConfig.Processor;
|
|
32
|
+
rules?: TSESLint.FlatConfig.Rules;
|
|
33
|
+
settings?: TSESLint.FlatConfig.Settings;
|
|
4
34
|
})[];
|
|
5
35
|
export default _default;
|
package/dist/config/index.js
CHANGED
|
@@ -4,11 +4,17 @@ import restrictedGlobals from "confusing-browser-globals";
|
|
|
4
4
|
import globals from "globals";
|
|
5
5
|
import { webgisPlugin } from "../plugins/webgis/index.js";
|
|
6
6
|
import { globalIgnores } from "eslint/config";
|
|
7
|
+
import markdown from "@eslint/markdown";
|
|
7
8
|
const defaultConfig = [
|
|
8
9
|
globalIgnores(["**/www", "**/dist", "**/assets", "**/coverage", "**/.docs"]),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
{
|
|
11
|
+
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
|
|
12
|
+
...eslint.configs.recommended
|
|
13
|
+
},
|
|
14
|
+
...[...tsEslint.configs.strictTypeChecked, ...tsEslint.configs.stylisticTypeChecked].map((config) => ({
|
|
15
|
+
...config,
|
|
16
|
+
files: ["**/*.ts", "**/*.tsx"]
|
|
17
|
+
})),
|
|
12
18
|
{
|
|
13
19
|
...webgisPlugin.configs.recommended,
|
|
14
20
|
files: ["**/*.ts", "**/*.tsx"]
|
|
@@ -22,8 +28,7 @@ const defaultConfig = [
|
|
|
22
28
|
languageOptions: {
|
|
23
29
|
globals: {
|
|
24
30
|
...globals.browser,
|
|
25
|
-
...globals.node
|
|
26
|
-
...globals.jest
|
|
31
|
+
...globals.node
|
|
27
32
|
},
|
|
28
33
|
ecmaVersion: "latest",
|
|
29
34
|
sourceType: "module"
|
|
@@ -539,11 +544,28 @@ const defaultConfig = [
|
|
|
539
544
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
540
545
|
// Developer may actually mean to use ||
|
|
541
546
|
// Also, refactoring this out may break things
|
|
542
|
-
"@typescript-eslint/prefer-nullish-coalescing": "off"
|
|
547
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
548
|
+
"@typescript-eslint/no-unnecessary-type-conversion": "warn"
|
|
543
549
|
//#endregion
|
|
544
550
|
// TODO: go over https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting
|
|
545
551
|
}
|
|
546
552
|
},
|
|
553
|
+
...markdown.configs.recommended,
|
|
554
|
+
{
|
|
555
|
+
files: ["**/*.md"],
|
|
556
|
+
language: "markdown/gfm",
|
|
557
|
+
languageOptions: {
|
|
558
|
+
frontmatter: "yaml"
|
|
559
|
+
},
|
|
560
|
+
rules: {
|
|
561
|
+
// we don't really use label refs and currently this rule does errors on GFM alerts.
|
|
562
|
+
// https://github.com/eslint/markdown/issues/294
|
|
563
|
+
"markdown/no-missing-label-refs": ["off"],
|
|
564
|
+
// We allow frontmatter titles to be different from the h1 by setting to "" which never matches
|
|
565
|
+
// This is useful to have a shorter title in the TOC than on the page.
|
|
566
|
+
"markdown/no-multiple-h1": ["error", { frontmatterTitle: "" }]
|
|
567
|
+
}
|
|
568
|
+
},
|
|
547
569
|
{
|
|
548
570
|
// Don't do type-aware linting for untyped files
|
|
549
571
|
files: ["**/*.js"],
|
package/dist/config/lumina.js
CHANGED
|
@@ -126,7 +126,7 @@ declare global {
|
|
|
126
126
|
{
|
|
127
127
|
group: ["/@lit/context"],
|
|
128
128
|
importNames: ["ContextProvider", "ContextConsumer", "provide", "consume"],
|
|
129
|
-
message: `For lazy-loading compatibility, import the useContextProvider() and the useContextConsumer() controllers from @arcgis/lumina rather than directly calling the Lit's controllers/decorators
|
|
129
|
+
message: `For lazy-loading compatibility, import the useContextProvider() and the useContextConsumer() controllers from @arcgis/lumina/context rather than directly calling the Lit's controllers/decorators. See https://qawebgis.esri.com/components/lumina/state-management#lit-context`,
|
|
130
130
|
caseSensitive: true
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-BlMIOyCh.js";
|
|
2
2
|
import { AST_NODE_TYPES, ESLintUtils, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
|
|
3
3
|
import ts from "typescript";
|
|
4
|
-
import { camelToKebab } from "@arcgis/
|
|
4
|
+
import { camelToKebab } from "@arcgis/toolkit/string";
|
|
5
5
|
const plugin = makeEslintPlugin(
|
|
6
6
|
"lumina",
|
|
7
7
|
(rule) => `https://devtopia.esri.com/WebGIS/arcgis-web-components/tree/main/packages/support-packages/eslint-config/src/plugins/lumina/rules/${rule}.ts`
|
|
@@ -1277,7 +1277,7 @@ plugin.createRule({
|
|
|
1277
1277
|
return;
|
|
1278
1278
|
}
|
|
1279
1279
|
if (isCreateElementComponent(node)) {
|
|
1280
|
-
return
|
|
1280
|
+
return context.report({
|
|
1281
1281
|
node,
|
|
1282
1282
|
messageId: "default"
|
|
1283
1283
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-BlMIOyCh.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.80",
|
|
4
4
|
"description": "ESLint configuration for arcgis-web-components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,17 +20,18 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@arcgis/
|
|
24
|
-
"@eslint/js": "^9.
|
|
23
|
+
"@arcgis/toolkit": "4.34.0-next.80",
|
|
24
|
+
"@eslint/js": "^9.29.0",
|
|
25
|
+
"@eslint/markdown": "^6.6.0",
|
|
25
26
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
26
27
|
"confusing-browser-globals": "^1.0.11",
|
|
27
28
|
"eslint-plugin-storybook": "^0.12.0",
|
|
28
|
-
"globals": "^
|
|
29
|
+
"globals": "^16.3.0",
|
|
29
30
|
"tslib": "^2.8.1",
|
|
30
31
|
"typescript": "~5.8.3",
|
|
31
|
-
"typescript-eslint": "^8.
|
|
32
|
+
"typescript-eslint": "^8.35.0"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
|
-
"eslint": "^9.
|
|
35
|
+
"eslint": "^9.29.0"
|
|
35
36
|
}
|
|
36
37
|
}
|
/package/dist/plugins/webgis/rules/{require-js-in-core-import.d.ts → require-js-in-imports.d.ts}
RENAMED
|
File without changes
|