@arcgis/eslint-config 5.2.0-next.14 → 5.2.0-next.141
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/chunks/disabledRules.js +6 -0
- package/dist/{estree-CDc-die8.js → chunks/estree.js} +8 -6
- package/dist/{makePlugin-B3JU8SZT.js → chunks/makePlugin.js} +6 -2
- package/dist/config/applications.js +31 -29
- package/dist/config/core.js +824 -0
- package/dist/config/extra.js +9 -10
- package/dist/config/index.js +518 -460
- package/dist/config/lumina.js +17 -34
- package/dist/plugins/core/index.js +75 -33
- package/dist/plugins/lumina/index.js +63 -32
- package/dist/plugins/utils/makePlugin.d.ts +17 -0
- package/dist/plugins/webgis/index.js +171 -31
- package/dist/utils/disableRules.d.ts +3 -2
- package/dist/utils/disableRules.js +1 -1
- package/package.json +15 -10
package/LICENSE.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Licensing
|
|
2
2
|
|
|
3
|
-
COPYRIGHT
|
|
3
|
+
COPYRIGHT Esri
|
|
4
4
|
|
|
5
5
|
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
|
|
6
6
|
|
|
7
|
-
This material is licensed for use under the
|
|
7
|
+
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
|
|
8
8
|
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
9
9
|
|
|
10
|
+
See use restrictions at https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf.
|
|
11
|
+
|
|
10
12
|
For additional information, contact:
|
|
11
13
|
Environmental Systems Research Institute, Inc.
|
|
12
14
|
Attn: Contracts and Legal Services Department
|
package/README.md
CHANGED
|
@@ -8,5 +8,5 @@ It is not intended to be used directly, but rather used as a dependency by other
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.
|
|
12
|
-
For third party notices, see https://js.arcgis.com/5.
|
|
11
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
|
|
12
|
+
For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
|
|
@@ -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 {
|
|
@@ -107,15 +109,15 @@ function isBindThisCallee(callee) {
|
|
|
107
109
|
export {
|
|
108
110
|
luminaEntrypointName as a,
|
|
109
111
|
luminaTestEntrypointName as b,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
isCreateEvent as c,
|
|
113
|
+
getName as d,
|
|
112
114
|
extractDeclareElementsInterface as e,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
checkForLuminaJsx as f,
|
|
116
|
+
getProperty as g,
|
|
115
117
|
hasDecorator as h,
|
|
116
118
|
isGetterWithoutSetter as i,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
isBindThisCallee as j,
|
|
120
|
+
getComponentDeclaration as k,
|
|
119
121
|
luminaJsxExportName as l,
|
|
120
122
|
parsePropertyDecorator as p,
|
|
121
123
|
sourceCodeDeclaresComponent as s,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
const version = "
|
|
2
|
+
const version = "1.0.0-0";
|
|
3
3
|
const packageJson = {
|
|
4
4
|
version
|
|
5
5
|
};
|
|
6
6
|
function makeEslintPlugin(pluginName, urlCreator) {
|
|
7
7
|
const rules = [];
|
|
8
|
+
const typeCheckedRules = /* @__PURE__ */ new Set();
|
|
8
9
|
const creator = ESLintUtils.RuleCreator(urlCreator);
|
|
9
10
|
return {
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
@@ -13,6 +14,9 @@ function makeEslintPlugin(pluginName, urlCreator) {
|
|
|
13
14
|
const docs = { ...meta.docs, name };
|
|
14
15
|
const ruleModule = creator({ ...rest, meta: { ...meta, docs }, name });
|
|
15
16
|
rules.push(ruleModule);
|
|
17
|
+
if (meta.docs.isTypeChecked) {
|
|
18
|
+
typeCheckedRules.add(`${pluginName}/${name}`);
|
|
19
|
+
}
|
|
16
20
|
return ruleModule;
|
|
17
21
|
},
|
|
18
22
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
@@ -23,7 +27,7 @@ function makeEslintPlugin(pluginName, urlCreator) {
|
|
|
23
27
|
)
|
|
24
28
|
};
|
|
25
29
|
const plugin = {
|
|
26
|
-
meta: { name: `@arcgis/eslint-plugin-${pluginName}`, version: packageJson.version },
|
|
30
|
+
meta: { name: `@arcgis/eslint-plugin-${pluginName}`, version: packageJson.version, typeCheckedRules },
|
|
27
31
|
configs: {
|
|
28
32
|
recommended: config
|
|
29
33
|
},
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
+
import { d as disabledRules } from "../chunks/disabledRules.js";
|
|
1
2
|
import config$1 from "./index.js";
|
|
3
|
+
const disabledApplicationRules = [
|
|
4
|
+
// Not autofixable. Can be annoying
|
|
5
|
+
"@typescript-eslint/ban-ts-comment",
|
|
6
|
+
// Less important in apps than in libraries
|
|
7
|
+
// Though, explicit return type improve TypeScript performance
|
|
8
|
+
"@typescript-eslint/explicit-function-return-type",
|
|
9
|
+
// Less important for non-public APIs.
|
|
10
|
+
// And can be tedious to refactor existing code.
|
|
11
|
+
"@typescript-eslint/max-params",
|
|
12
|
+
// No big harm in letting people do this if they want to
|
|
13
|
+
"@typescript-eslint/no-extraneous-class",
|
|
14
|
+
// A trade off between developer convenience and code quality
|
|
15
|
+
"@typescript-eslint/no-floating-promises",
|
|
16
|
+
// A convenient lazy variant, but less safe
|
|
17
|
+
"@typescript-eslint/no-unsafe-function-type",
|
|
18
|
+
// Non-customer-facing code can handle Errors in what way is most convenient
|
|
19
|
+
"@typescript-eslint/only-throw-error",
|
|
20
|
+
// Non-customer-facing code can handle Errors in what way is most convenient
|
|
21
|
+
"@typescript-eslint/prefer-promise-reject-errors",
|
|
22
|
+
// A trade off between developer convenience and code quality
|
|
23
|
+
"@typescript-eslint/promise-function-async",
|
|
24
|
+
// Let developer decide to add or omit it. If not present, creates
|
|
25
|
+
// worse exception messages.
|
|
26
|
+
"func-names",
|
|
27
|
+
// This rule is for consistency between library developers - less important for monolith apps.
|
|
28
|
+
"id-denylist",
|
|
29
|
+
// More important for library-exposed symbols than apps
|
|
30
|
+
"symbol-description"
|
|
31
|
+
];
|
|
2
32
|
const config = [
|
|
3
33
|
...config$1,
|
|
4
34
|
{
|
|
5
35
|
rules: {
|
|
6
|
-
|
|
7
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
8
|
-
// Less important in apps than in libraries
|
|
9
|
-
// Though, explicit return type improve TypeScript performance
|
|
10
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
11
|
-
// Less important for non-public APIs.
|
|
12
|
-
// And can be tedious to refactor existing code.
|
|
13
|
-
"@typescript-eslint/max-params": "off",
|
|
14
|
-
// No big harm in letting people do this if they want to
|
|
15
|
-
"@typescript-eslint/no-extraneous-class": "off",
|
|
16
|
-
// A convenient lazy variant, but less safe
|
|
17
|
-
"@typescript-eslint/no-unsafe-function-type": "off",
|
|
18
|
-
// Non-customer-facing code can handle Errors in what way is most convenient
|
|
19
|
-
"@typescript-eslint/only-throw-error": "off",
|
|
20
|
-
// Non-customer-facing code can handle Errors in what way is most convenient
|
|
21
|
-
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
22
|
-
// A trade off between developer convenience and code quality
|
|
23
|
-
"@typescript-eslint/no-floating-promises": "off",
|
|
24
|
-
// A trade off between developer convenience and code quality
|
|
25
|
-
"@typescript-eslint/promise-function-async": "off",
|
|
26
|
-
// Let developer decide to add or omit it. If not present, creates
|
|
27
|
-
// worse exception messages.
|
|
28
|
-
"func-names": "off",
|
|
29
|
-
// This rule is for consistency between library developers - less important for monolith apps.
|
|
30
|
-
"id-denylist": "off",
|
|
31
|
-
// Some cases actually require sequential async loops
|
|
32
|
-
"no-await-in-loop": "off",
|
|
33
|
-
// More important for library-exposed symbols than apps
|
|
34
|
-
"symbol-description": "off"
|
|
36
|
+
...disabledRules(disabledApplicationRules)
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
];
|