@arcgis/eslint-config 5.2.0-next.90 → 5.2.0-next.91
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/core.js +0 -1
- package/dist/config/index.js +2 -1
- package/dist/{estree-5iKU4xoP.js → estree-Ern7-L05.js} +2 -0
- package/dist/{makePlugin-NTi-Ntj5.js → makePlugin-ulmzVAh4.js} +1 -1
- package/dist/plugins/core/index.js +1 -1
- package/dist/plugins/lumina/index.js +8 -3
- package/dist/plugins/webgis/index.js +2 -2
- package/package.json +2 -2
package/dist/config/core.js
CHANGED
|
@@ -215,7 +215,6 @@ const eslintConfigCore = [
|
|
|
215
215
|
"no-unreachable-loop": "off",
|
|
216
216
|
"no-unsafe-negation": "off",
|
|
217
217
|
"no-useless-call": "off",
|
|
218
|
-
"no-useless-computed-key": "off",
|
|
219
218
|
"no-useless-concat": "off",
|
|
220
219
|
"no-warning-comments": "off",
|
|
221
220
|
"prefer-arrow-callback": "off",
|
package/dist/config/index.js
CHANGED
|
@@ -176,7 +176,8 @@ const config = [
|
|
|
176
176
|
// Not an error as some external APIs require calling "new" even if we don't
|
|
177
177
|
// care about the retune time. Controllers also use this pattern
|
|
178
178
|
"no-new": "off",
|
|
179
|
-
|
|
179
|
+
// See https://devtopia.esri.com/WebGIS/webgis-sdk/pull/14943#discussion_r1661089
|
|
180
|
+
"no-useless-computed-key": "off",
|
|
180
181
|
"no-useless-concat": "error",
|
|
181
182
|
"no-unneeded-ternary": "warn",
|
|
182
183
|
"no-useless-call": "error",
|
|
@@ -73,6 +73,8 @@ function isGetterWithoutSetter(node) {
|
|
|
73
73
|
function getName(node) {
|
|
74
74
|
if (node.key.type === AST_NODE_TYPES.Identifier) {
|
|
75
75
|
return node.key.name;
|
|
76
|
+
} else if (node.key.type === AST_NODE_TYPES.PrivateIdentifier) {
|
|
77
|
+
return `#${node.key.name}`;
|
|
76
78
|
} else if (node.key.type === AST_NODE_TYPES.Literal && typeof node.key.value === "string") {
|
|
77
79
|
return node.key.value;
|
|
78
80
|
} else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-ulmzVAh4.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-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-ulmzVAh4.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-
|
|
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";
|
|
4
4
|
import ts from "typescript";
|
|
5
5
|
import { camelToKebab } from "@arcgis/toolkit/string";
|
|
6
6
|
const plugin = makeEslintPlugin(
|
|
@@ -770,6 +770,10 @@ plugin.createRule({
|
|
|
770
770
|
}
|
|
771
771
|
});
|
|
772
772
|
const ordering = [
|
|
773
|
+
/**
|
|
774
|
+
* Special well-known members that do not exist at runtime.
|
|
775
|
+
*/
|
|
776
|
+
"Type-only metadata members",
|
|
773
777
|
/*
|
|
774
778
|
* Putting static before instance members is a common OOP convention.
|
|
775
779
|
* Static members are always evaluated before instance members.
|
|
@@ -826,12 +830,13 @@ const getWireframe = () => new Map(ordering.map((region) => [region, []]));
|
|
|
826
830
|
const entries = Object.entries;
|
|
827
831
|
const regionMatchers = entries({
|
|
828
832
|
"Static Members": (node) => node.type === AST_NODE_TYPES.StaticBlock || "static" in node && node.static,
|
|
833
|
+
"Type-only metadata members": (node) => node.type === AST_NODE_TYPES.PropertyDefinition && node.definite && node.override && node.key.type === AST_NODE_TYPES.Literal && node.key.value?.startsWith?.("@") === true,
|
|
829
834
|
"Lifecycle": (_node, name) => lifecyclesSet.has(name),
|
|
830
835
|
"Public Methods": (node) => "decorators" in node && hasDecorator(node, "method"),
|
|
831
836
|
"Public Properties": (node) => "decorators" in node && hasDecorator(node, "property"),
|
|
832
837
|
"State Properties": (node) => "decorators" in node && hasDecorator(node, "state"),
|
|
833
838
|
"Events": isEvent,
|
|
834
|
-
"Rendering": (_node, name) => name.startsWith("render") || name.startsWith("_render"),
|
|
839
|
+
"Rendering": (_node, name) => name.startsWith("render") || name.startsWith("_render") || name.startsWith("#render"),
|
|
835
840
|
"Private Properties": (node) => node.type === AST_NODE_TYPES.PropertyDefinition || // We don't yet support public accessor properties
|
|
836
841
|
node.type === AST_NODE_TYPES.AccessorProperty || node.type === AST_NODE_TYPES.MethodDefinition && (node.kind === "get" || node.kind === "set"),
|
|
837
842
|
"Private Methods": () => true
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as makeEslintPlugin } from "../../makePlugin-
|
|
1
|
+
import { m as makeEslintPlugin } from "../../makePlugin-ulmzVAh4.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-
|
|
7
|
+
import { e as extractDeclareElementsInterface, k as getComponentDeclaration } from "../../estree-Ern7-L05.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`
|
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.91",
|
|
4
4
|
"description": "ESLint configuration for WebGIS SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
24
|
+
"@arcgis/toolkit": "5.2.0-next.91",
|
|
25
25
|
"@eslint/js": "^10.0.1",
|
|
26
26
|
"@eslint/markdown": "^8.0.3",
|
|
27
27
|
"@types/confusing-browser-globals": "^1.0.3",
|