@arcgis/eslint-config 5.2.0-next.69 → 5.2.0-next.70
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/extra.js
CHANGED
|
@@ -2,7 +2,7 @@ const config = [
|
|
|
2
2
|
{
|
|
3
3
|
files: ["**/*.ts", "**/*.tsx"],
|
|
4
4
|
rules: {
|
|
5
|
-
// See https://devtopia.esri.com/WebGIS/
|
|
5
|
+
// See https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/446#discussioncomment-3166
|
|
6
6
|
"@typescript-eslint/no-unsafe-return": "warn",
|
|
7
7
|
/*
|
|
8
8
|
* Lot's of false positives on pure functions that don't use
|
package/dist/config/index.js
CHANGED
|
@@ -132,7 +132,7 @@ const config = [
|
|
|
132
132
|
* performance issues.
|
|
133
133
|
*
|
|
134
134
|
*/
|
|
135
|
-
// Disabled as per https://devtopia.esri.com/WebGIS/
|
|
135
|
+
// Disabled as per https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/446#discussioncomment-3166
|
|
136
136
|
"@typescript-eslint/no-unsafe-return": "off",
|
|
137
137
|
/*
|
|
138
138
|
* Lot's of false positives on pure functions that don't use
|
|
@@ -280,7 +280,7 @@ const config = [
|
|
|
280
280
|
"@typescript-eslint/no-for-in-array": "off",
|
|
281
281
|
"no-alert": "error",
|
|
282
282
|
"no-caller": "error",
|
|
283
|
-
// TODO: re-enable once https://devtopia.esri.com/WebGIS/
|
|
283
|
+
// TODO: re-enable once https://devtopia.esri.com/WebGIS/webgis-sdk/issues/1519 is fixed
|
|
284
284
|
// "no-console": 'error',
|
|
285
285
|
"no-eval": "error",
|
|
286
286
|
"no-extend-native": "error",
|
|
@@ -347,7 +347,7 @@ const config = [
|
|
|
347
347
|
"curly": ["warn", "all"],
|
|
348
348
|
"eqeqeq": ["error", "always", { null: "ignore" }],
|
|
349
349
|
"func-names": ["warn", "as-needed"],
|
|
350
|
-
// Rationale: https://devtopia.esri.com/WebGIS/
|
|
350
|
+
// Rationale: https://devtopia.esri.com/WebGIS/webgis-sdk/issues/289
|
|
351
351
|
// TODO: replace with unicorn/prevent-abbreviations
|
|
352
352
|
"id-denylist": ["error", "elt", "elem", "evt", "ev", "cb"],
|
|
353
353
|
// Leave it to developer to decide when it is time to refactor-out
|
|
@@ -475,7 +475,7 @@ const config = [
|
|
|
475
475
|
// rule - give it more time to catch the bug cases. Also, this rule
|
|
476
476
|
// changes runtime behavior, and may lead to breaking changes.
|
|
477
477
|
"@typescript-eslint/no-useless-default-assignment": "off",
|
|
478
|
-
// Since https://devtopia.esri.com/WebGIS/
|
|
478
|
+
// Since https://devtopia.esri.com/WebGIS/webgis-sdk/pull/17821,
|
|
479
479
|
// this rule has more true positives, but also many more false positives.
|
|
480
480
|
// The autofix often causes TypeScript errors, and new ESLint errors
|
|
481
481
|
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-0DNr4T0y.js";
|
|
2
2
|
import { AST_NODE_TYPES, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
|
|
3
3
|
import { generateDifferences, showInvisibles } from "prettier-linter-helpers";
|
|
4
4
|
import path, { relative, win32, posix, normalize } from "path";
|
|
@@ -7,7 +7,7 @@ import { existsSync } from "node:fs";
|
|
|
7
7
|
import { execSync } from "child_process";
|
|
8
8
|
const plugin = makeEslintPlugin(
|
|
9
9
|
"core",
|
|
10
|
-
(rule) => `https://devtopia.esri.com/WebGIS/
|
|
10
|
+
(rule) => `https://devtopia.esri.com/WebGIS/webgis-sdk/tree/main/packages/support-packages/eslint-config/src/plugins/core/rules/${rule}.ts`
|
|
11
11
|
);
|
|
12
12
|
plugin.createRule({
|
|
13
13
|
name: "glsl-whitespace",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-0DNr4T0y.js";
|
|
2
2
|
import { AST_NODE_TYPES, ESLintUtils, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
|
|
3
3
|
import { l as luminaJsxExportName, a as luminaEntrypointName, b as luminaTestEntrypointName, s as sourceCodeDeclaresComponent, p as parsePropertyDecorator, c as getProperty, i as isGetterWithoutSetter, e as extractDeclareElementsInterface, d as isCreateEvent, h as hasDecorator, f as getName, j as checkForLuminaJsx, k as isBindThisCallee, g as getComponentDeclaration, u as unwrapExpression } from "../../estree-CDc-die8.js";
|
|
4
4
|
import ts from "typescript";
|
|
5
5
|
import { camelToKebab } from "@arcgis/toolkit/string";
|
|
6
6
|
const plugin = makeEslintPlugin(
|
|
7
7
|
"lumina",
|
|
8
|
-
(rule) => `https://devtopia.esri.com/WebGIS/
|
|
8
|
+
(rule) => `https://devtopia.esri.com/WebGIS/webgis-sdk/tree/main/packages/support-packages/eslint-config/src/plugins/lumina/rules/${rule}.ts`
|
|
9
9
|
);
|
|
10
10
|
const importDeclaration = `import { ${luminaJsxExportName} } from "${luminaEntrypointName}";`;
|
|
11
11
|
const description$m = `To use Lumina's JSX, you need to ${importDeclaration}`;
|
|
@@ -87,7 +87,7 @@ plugin.createRule({
|
|
|
87
87
|
messages: {
|
|
88
88
|
addType: `This property is of {{ type }} type, yet the type is not trivially inferrable from the AST without type-checking. Such properties require a { type: {{ type }} } annotation.
|
|
89
89
|
|
|
90
|
-
More information: https://devtopia.esri.com/WebGIS/
|
|
90
|
+
More information: https://devtopia.esri.com/WebGIS/webgis-sdk/issues/1991`,
|
|
91
91
|
typeAnnotationMismatchesActualType: "The @property({type: {{type}} }) doesn't match the actual property type ({{actualType}}).",
|
|
92
92
|
noEmptyPropertyObject: "Replace @property({}) with @property()",
|
|
93
93
|
noUnnecessaryType: "Property type is trivially inferrable without type-checking - remove needless { type: {{ type }} } annotation.",
|
|
@@ -382,7 +382,7 @@ plugin.createRule({
|
|
|
382
382
|
Details: https://webgis.esri.com/references/lumina/events#best-practices-around-emitting-events`,
|
|
383
383
|
componentNameInEventError: `For consistency, event name should not start with component name.
|
|
384
384
|
|
|
385
|
-
Discussion: https://devtopia.esri.com/WebGIS/
|
|
385
|
+
Discussion: https://devtopia.esri.com/WebGIS/webgis-sdk/discussions/307`,
|
|
386
386
|
noComponentNameInEventError: `For consistency, event name should include component name.`,
|
|
387
387
|
missingPrivateJsDocTag: `Internal and private events must be marked with @internal or @private JSDoc tag.`
|
|
388
388
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-0DNr4T0y.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";
|
|
@@ -7,7 +7,7 @@ import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
|
|
|
7
7
|
import { e as extractDeclareElementsInterface, g as getComponentDeclaration } from "../../estree-CDc-die8.js";
|
|
8
8
|
const plugin = makeEslintPlugin(
|
|
9
9
|
"webgis",
|
|
10
|
-
(rule) => `https://devtopia.esri.com/WebGIS/
|
|
10
|
+
(rule) => `https://devtopia.esri.com/WebGIS/webgis-sdk/tree/main/packages/support-packages/eslint-config/src/plugins/webgis/rules/${rule}.ts`
|
|
11
11
|
);
|
|
12
12
|
const isTestFile = (filePath) => filePath.includes("/test") || filePath.includes(".test") || filePath.includes(".spec") || filePath.includes("e2e") || filePath.includes("__") || filePath.includes("/.");
|
|
13
13
|
const isStorybookFile = (filePath) => filePath.includes(".stories");
|
|
@@ -750,7 +750,7 @@ plugin.createRule({
|
|
|
750
750
|
docs: {
|
|
751
751
|
description: "Disallow kebab-case props on custom JSX elements.",
|
|
752
752
|
// Off by default till
|
|
753
|
-
// https://devtopia.esri.com/WebGIS/
|
|
753
|
+
// https://devtopia.esri.com/WebGIS/webgis-sdk/issues/5364#issuecomment-6321339
|
|
754
754
|
// is resolved
|
|
755
755
|
defaultLevel: "off",
|
|
756
756
|
isTypeChecked: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/eslint-config",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.70",
|
|
4
4
|
"description": "ESLint configuration for WebGIS SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"tslib": "^2.8.1",
|
|
42
42
|
"typescript": "~6.0.3",
|
|
43
43
|
"typescript-eslint": "^8.63.0",
|
|
44
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
44
|
+
"@arcgis/toolkit": "5.2.0-next.70"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"eslint": "^10.6.0"
|