@arcgis/eslint-config 4.32.0-next.67

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.
Files changed (54) hide show
  1. package/LICENSE.md +13 -0
  2. package/README.md +21 -0
  3. package/dist/chunk-25YPAQ6A.js +64 -0
  4. package/dist/chunk-C2D6KHIP.js +24 -0
  5. package/dist/chunk-D7HD47IC.js +974 -0
  6. package/dist/chunk-WAWBOPY7.js +19 -0
  7. package/dist/config/extra.d.ts +24 -0
  8. package/dist/config/extra.js +36 -0
  9. package/dist/config/index.d.ts +22 -0
  10. package/dist/config/index.js +588 -0
  11. package/dist/config/lumina.d.ts +7 -0
  12. package/dist/config/lumina.js +220 -0
  13. package/dist/config/restrictedImports.d.ts +6 -0
  14. package/dist/config/restrictedImports.js +6 -0
  15. package/dist/config/storybook.d.ts +2 -0
  16. package/dist/plugins/lumina/index.d.ts +6 -0
  17. package/dist/plugins/lumina/index.js +7 -0
  18. package/dist/plugins/lumina/rules/add-missing-jsx-import.d.ts +3 -0
  19. package/dist/plugins/lumina/rules/add-missing-jsx-import.test.d.ts +1 -0
  20. package/dist/plugins/lumina/rules/auto-add-type.d.ts +4 -0
  21. package/dist/plugins/lumina/rules/auto-add-type.test.d.ts +1 -0
  22. package/dist/plugins/lumina/rules/component-placement-rules.d.ts +3 -0
  23. package/dist/plugins/lumina/rules/component-placement-rules.test.d.ts +1 -0
  24. package/dist/plugins/lumina/rules/consistent-event-naming.d.ts +17 -0
  25. package/dist/plugins/lumina/rules/consistent-event-naming.test.d.ts +1 -0
  26. package/dist/plugins/lumina/rules/decorators-context.d.ts +3 -0
  27. package/dist/plugins/lumina/rules/decorators-context.test.d.ts +1 -0
  28. package/dist/plugins/lumina/rules/no-ignore-jsdoc-tag.d.ts +3 -0
  29. package/dist/plugins/lumina/rules/no-ignore-jsdoc-tag.test.d.ts +1 -0
  30. package/dist/plugins/lumina/rules/no-incorrect-dynamic-tag-name.d.ts +4 -0
  31. package/dist/plugins/lumina/rules/no-incorrect-dynamic-tag-name.test.d.ts +1 -0
  32. package/dist/plugins/lumina/rules/no-inline-arrow-in-ref.d.ts +3 -0
  33. package/dist/plugins/lumina/rules/no-inline-arrow-in-ref.test.d.ts +1 -0
  34. package/dist/plugins/lumina/rules/no-listen-in-connected-callback.d.ts +3 -0
  35. package/dist/plugins/lumina/rules/no-listen-in-connected-callback.test.d.ts +1 -0
  36. package/dist/plugins/lumina/rules/no-needless-bind-this.d.ts +3 -0
  37. package/dist/plugins/lumina/rules/no-needless-bind-this.test.d.ts +1 -0
  38. package/dist/plugins/lumina/rules/no-property-name-start-with-on.d.ts +3 -0
  39. package/dist/plugins/lumina/rules/no-property-name-start-with-on.test.d.ts +1 -0
  40. package/dist/plugins/lumina/rules/no-render-false.d.ts +4 -0
  41. package/dist/plugins/lumina/rules/no-render-false.test.d.ts +1 -0
  42. package/dist/plugins/lumina/rules/tag-name-rules.d.ts +10 -0
  43. package/dist/plugins/lumina/rules/tag-name-rules.spec.d.ts +1 -0
  44. package/dist/plugins/lumina/utils/checker.d.ts +2 -0
  45. package/dist/plugins/lumina/utils/creator.d.ts +6 -0
  46. package/dist/plugins/lumina/utils/estree.d.ts +14 -0
  47. package/dist/plugins/utils/makePlugin.d.ts +14 -0
  48. package/dist/plugins/utils/tests.d.ts +26 -0
  49. package/dist/plugins/webgis/index.d.ts +6 -0
  50. package/dist/plugins/webgis/index.js +7 -0
  51. package/dist/plugins/webgis/rules/no-import-outside-src.d.ts +3 -0
  52. package/dist/plugins/webgis/rules/no-import-outside-src.test.d.ts +1 -0
  53. package/dist/plugins/webgis/utils/creator.d.ts +6 -0
  54. package/package.json +37 -0
package/LICENSE.md ADDED
@@ -0,0 +1,13 @@
1
+ # Licensing
2
+
3
+ COPYRIGHT © 2024 Esri
4
+
5
+ All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
+
7
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
8
+
9
+ See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
10
+
11
+ For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
12
+
13
+ email: contracts@esri.com
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # ArcGIS Maps SDK for JavaScript - ESLint Config
2
+
3
+ **No Esri Technical Support included.**
4
+
5
+ Package that is part of the [ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript).
6
+
7
+ It is not intended to be used directly, but rather used as a dependency by other packages in the SDK.
8
+
9
+ ## License
10
+
11
+ COPYRIGHT © 2024 Esri
12
+
13
+ All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
14
+
15
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
16
+
17
+ See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
18
+
19
+ For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
20
+
21
+ email: contracts@esri.com
@@ -0,0 +1,64 @@
1
+ import {
2
+ makeEslintPlugin
3
+ } from "./chunk-C2D6KHIP.js";
4
+
5
+ // src/plugins/webgis/utils/creator.ts
6
+ import { ESLintUtils } from "@typescript-eslint/utils";
7
+ var createRule = ESLintUtils.RuleCreator(
8
+ (rule) => `https://devtopia.esri.com/WebGIS/arcgis-web-components/tree/main/packages/support-packages/eslint-config/src/plugins/webgis/rules/${rule}.ts`
9
+ );
10
+
11
+ // src/plugins/webgis/rules/no-import-outside-src.ts
12
+ import { resolve } from "path/posix";
13
+ var description = `Imports of files outside the src/ folder are not-portable and likely to break for consumers of this package.`;
14
+ var noImportOutsideSrc = createRule({
15
+ name: "no-import-outside-src",
16
+ meta: {
17
+ docs: {
18
+ description
19
+ },
20
+ messages: {
21
+ noImportOutsideSrc: description
22
+ },
23
+ type: "problem",
24
+ schema: []
25
+ },
26
+ defaultOptions: [],
27
+ create(context) {
28
+ const fileName = context.filename;
29
+ const srcIndex = fileName.indexOf("/src/");
30
+ if (srcIndex === -1) {
31
+ return {};
32
+ }
33
+ const basePath = fileName.slice(0, srcIndex + "/src/".length);
34
+ const isTestFile = fileName.includes("/test") || fileName.includes(".test") || fileName.includes(".spec") || fileName.includes("e2e") || fileName.includes("__") || fileName.includes("/.");
35
+ if (isTestFile) {
36
+ return {};
37
+ }
38
+ return {
39
+ ImportDeclaration(node) {
40
+ const specifier = node.source.value;
41
+ const isRelativeAncestor = specifier.startsWith("../");
42
+ if (!isRelativeAncestor) {
43
+ return;
44
+ }
45
+ const relativePath = resolve(fileName, "..", specifier);
46
+ if (!relativePath.startsWith(basePath) && !relativePath.endsWith(".json")) {
47
+ context.report({
48
+ messageId: "noImportOutsideSrc",
49
+ node: node.source
50
+ });
51
+ }
52
+ }
53
+ };
54
+ }
55
+ });
56
+
57
+ // src/plugins/webgis/index.ts
58
+ var webgis_default = makeEslintPlugin("webgis", {
59
+ "no-import-outside-src": noImportOutsideSrc
60
+ });
61
+
62
+ export {
63
+ webgis_default
64
+ };
@@ -0,0 +1,24 @@
1
+ // package.json
2
+ var version = "4.32.0-next.67";
3
+
4
+ // src/plugins/utils/makePlugin.ts
5
+ function makeEslintPlugin(pluginName, rules) {
6
+ const config = {
7
+ rules: Object.fromEntries(Object.keys(rules).map((name) => [`${pluginName}/${name}`, "error"]))
8
+ };
9
+ const plugin = {
10
+ meta: { name: "@arcgis/eslint-plugin-webgis", version },
11
+ configs: {
12
+ recommended: config
13
+ },
14
+ rules
15
+ };
16
+ config.plugins = {
17
+ [pluginName]: plugin
18
+ };
19
+ return plugin;
20
+ }
21
+
22
+ export {
23
+ makeEslintPlugin
24
+ };