@arcgis/eslint-config 5.2.0-next.2 → 5.2.0-next.21

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 (64) hide show
  1. package/dist/config/applications.d.ts +4 -3
  2. package/dist/config/applications.js +4 -4
  3. package/dist/config/extra.d.ts +4 -24
  4. package/dist/config/extra.js +2 -2
  5. package/dist/config/index.d.ts +3 -2
  6. package/dist/config/index.js +7 -10
  7. package/dist/config/lumina.d.ts +4 -3
  8. package/dist/config/lumina.js +8 -8
  9. package/dist/{estree-DW92hBTd.js → estree-CDc-die8.js} +1 -39
  10. package/dist/makePlugin-GmKey29v.js +41 -0
  11. package/dist/plugins/core/index.d.ts +4 -0
  12. package/dist/plugins/core/index.js +702 -0
  13. package/dist/plugins/lumina/index.d.ts +4 -5
  14. package/dist/plugins/lumina/index.js +2 -1
  15. package/dist/plugins/utils/makePlugin.d.ts +15 -16
  16. package/dist/plugins/webgis/index.d.ts +4 -5
  17. package/dist/plugins/webgis/index.js +794 -119
  18. package/dist/utils/defineBoundaries.d.ts +22 -38
  19. package/dist/utils/disableRules.d.ts +6 -6
  20. package/package.json +4 -2
  21. package/dist/config/storybook.d.ts +0 -2
  22. package/dist/plugins/lumina/plugin.d.ts +0 -8
  23. package/dist/plugins/lumina/rules/add-missing-jsx-import.d.ts +0 -2
  24. package/dist/plugins/lumina/rules/auto-add-type.d.ts +0 -3
  25. package/dist/plugins/lumina/rules/ban-events.d.ts +0 -6
  26. package/dist/plugins/lumina/rules/component-placement-rules.d.ts +0 -2
  27. package/dist/plugins/lumina/rules/consistent-event-naming.d.ts +0 -15
  28. package/dist/plugins/lumina/rules/consistent-nullability.d.ts +0 -2
  29. package/dist/plugins/lumina/rules/decorators-context.d.ts +0 -2
  30. package/dist/plugins/lumina/rules/explicit-setter-type.d.ts +0 -19
  31. package/dist/plugins/lumina/rules/member-ordering/build.d.ts +0 -4
  32. package/dist/plugins/lumina/rules/member-ordering/comments.d.ts +0 -19
  33. package/dist/plugins/lumina/rules/member-ordering/config.d.ts +0 -36
  34. package/dist/plugins/lumina/rules/member-ordering/normalize.d.ts +0 -10
  35. package/dist/plugins/lumina/rules/member-ordering.d.ts +0 -2
  36. package/dist/plugins/lumina/rules/no-create-element-component.d.ts +0 -2
  37. package/dist/plugins/lumina/rules/no-ignore-jsdoc-tag.d.ts +0 -2
  38. package/dist/plugins/lumina/rules/no-incorrect-dynamic-tag-name.d.ts +0 -3
  39. package/dist/plugins/lumina/rules/no-inline-arrow-in-ref.d.ts +0 -2
  40. package/dist/plugins/lumina/rules/no-inline-exposure-jsdoc-tag.d.ts +0 -2
  41. package/dist/plugins/lumina/rules/no-invalid-directives-prop.d.ts +0 -2
  42. package/dist/plugins/lumina/rules/no-jsdoc-xref-links.d.ts +0 -2
  43. package/dist/plugins/lumina/rules/no-jsx-spread.d.ts +0 -2
  44. package/dist/plugins/lumina/rules/no-listen-in-connected-callback.d.ts +0 -2
  45. package/dist/plugins/lumina/rules/no-non-component-exports.d.ts +0 -2
  46. package/dist/plugins/lumina/rules/no-property-name-start-with-on.d.ts +0 -2
  47. package/dist/plugins/lumina/rules/no-render-false.d.ts +0 -3
  48. package/dist/plugins/lumina/rules/no-unnecessary-assertion-on-event.d.ts +0 -3
  49. package/dist/plugins/lumina/rules/no-unnecessary-attribute-name.d.ts +0 -2
  50. package/dist/plugins/lumina/rules/no-unnecessary-bind-this.d.ts +0 -2
  51. package/dist/plugins/lumina/rules/no-unnecessary-key.d.ts +0 -2
  52. package/dist/plugins/lumina/rules/tag-name-rules.d.ts +0 -8
  53. package/dist/plugins/lumina/utils/checker.d.ts +0 -4
  54. package/dist/plugins/lumina/utils/estree.d.ts +0 -33
  55. package/dist/plugins/lumina/utils/tags.d.ts +0 -14
  56. package/dist/plugins/utils/helpers.d.ts +0 -2
  57. package/dist/plugins/webgis/plugin.d.ts +0 -8
  58. package/dist/plugins/webgis/rules/consistent-logging.d.ts +0 -2
  59. package/dist/plugins/webgis/rules/no-dts-files.d.ts +0 -2
  60. package/dist/plugins/webgis/rules/no-import-outside-src.d.ts +0 -2
  61. package/dist/plugins/webgis/rules/no-story-render-args-type-annotation.d.ts +0 -2
  62. package/dist/plugins/webgis/rules/no-touching-jsdoc.d.ts +0 -2
  63. package/dist/plugins/webgis/rules/no-unsafe-hash-links.d.ts +0 -2
  64. package/dist/plugins/webgis/rules/require-js-in-imports.d.ts +0 -2
@@ -1,3 +1,4 @@
1
- import { TSESLint } from '@typescript-eslint/utils';
2
- declare const _default: TSESLint.FlatConfig.Config[];
3
- export default _default;
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+
3
+ declare const config: TSESLint.FlatConfig.ConfigArray;
4
+ export default config;
@@ -1,6 +1,6 @@
1
- import config from "./index.js";
2
- const applications = [
3
- ...config,
1
+ import config$1 from "./index.js";
2
+ const config = [
3
+ ...config$1,
4
4
  {
5
5
  rules: {
6
6
  // Not autofixable. Can be annoying
@@ -36,5 +36,5 @@ const applications = [
36
36
  }
37
37
  ];
38
38
  export {
39
- applications as default
39
+ config as default
40
40
  };
@@ -1,24 +1,4 @@
1
- /**
2
- * In addition to the main config (index.js), which contains the recommended
3
- * rules that should be enabled all the time, these are some additional rules
4
- * that can be run from time to time. These are not always on either because
5
- * they have too many false positives or are too slow.
6
- */
7
- declare const _default: {
8
- files: string[];
9
- rules: {
10
- "@typescript-eslint/no-unsafe-return": "warn";
11
- "@typescript-eslint/unbound-method": "warn";
12
- "class-methods-use-this": "off";
13
- "@typescript-eslint/class-methods-use-this": ["warn", {
14
- ignoreOverrideMethods: boolean;
15
- ignoreClassesThatImplementAnInterface: string;
16
- }];
17
- /**
18
- * False positive when constructor exists to improve typing/narrow down the
19
- * type
20
- */
21
- "@typescript-eslint/no-useless-constructor": "warn";
22
- };
23
- }[];
24
- export default _default;
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+
3
+ declare const config: TSESLint.FlatConfig.ConfigArray;
4
+ export default config;
@@ -1,4 +1,4 @@
1
- const extra = [
1
+ const config = [
2
2
  {
3
3
  files: ["**/*.ts", "**/*.tsx"],
4
4
  rules: {
@@ -31,5 +31,5 @@ const extra = [
31
31
  }
32
32
  ];
33
33
  export {
34
- extra as default
34
+ config as default
35
35
  };
@@ -1,3 +1,4 @@
1
- import { TSESLint } from '@typescript-eslint/utils';
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+
2
3
  declare const config: TSESLint.FlatConfig.ConfigArray;
3
- export default config;
4
+ export default config;
@@ -181,11 +181,11 @@ const config = [
181
181
  "index",
182
182
  {
183
183
  name: "isNaN",
184
- message: "Use Number.isNaN instead as it has more predictable behavior. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description"
184
+ message: "Use Number.isNaN instead as it has more predictable behavior. See https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description"
185
185
  },
186
186
  {
187
187
  name: "isFinite",
188
- message: "Use Number.isFinite instead as it has more predictable behavior. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description (same applies to isFinite)"
188
+ message: "Use Number.isFinite instead as it has more predictable behavior. See https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description (same applies to isFinite)"
189
189
  },
190
190
  {
191
191
  name: "parseInt",
@@ -355,17 +355,14 @@ const config = [
355
355
  */
356
356
  "@typescript-eslint/no-this-alias": "off",
357
357
  "no-warning-comments": [
358
- // TODO: consider forbidding TODO in favor of BUG, HACK, REFACTOR, FEATURE,
359
- // LOW, TEST, PERF. Then can configure IDE to assign different colors to
360
- // each of those
361
358
  "error",
362
359
  {
363
- // By emitting error for these TODOs, you can use them for things you
364
- // want to do in the current commit (since they will be reported as
365
- // an error by pre-commit hook). Convenient for not-forgetting to do
366
- // something
360
+ // This will error for // ME: comments. This is convenient to write
361
+ // temporary TODOs that ESLint will remind you to resolve before the
362
+ // pull request is merged.
367
363
  terms: ["ME"],
368
- location: "anywhere"
364
+ location: "start",
365
+ decoration: ["/", "*", ">"]
369
366
  }
370
367
  ],
371
368
  // Autofixable, so warn to be less disruptive
@@ -1,3 +1,4 @@
1
- import { TSESLint } from '@typescript-eslint/utils';
2
- declare const _default: TSESLint.FlatConfig.Config[];
3
- export default _default;
1
+ import type { TSESLint } from "@typescript-eslint/utils";
2
+
3
+ declare const config: TSESLint.FlatConfig.ConfigArray;
4
+ export default config;
@@ -4,16 +4,16 @@ const storybookConfig = [
4
4
  {
5
5
  ignores: ["**/storybook-static*"]
6
6
  },
7
- ...eslintPluginStorybook.configs["flat/recommended"].map((config) => ({
8
- ...config,
7
+ ...eslintPluginStorybook.configs["flat/recommended"].map((config2) => ({
8
+ ...config2,
9
9
  files: ["**/*.stories.@(ts|tsx)"]
10
10
  })),
11
- ...eslintPluginStorybook.configs["flat/addon-interactions"].map((config) => ({
12
- ...config,
11
+ ...eslintPluginStorybook.configs["flat/addon-interactions"].map((config2) => ({
12
+ ...config2,
13
13
  files: ["**/*.stories.@(ts|tsx)"]
14
14
  })),
15
- ...eslintPluginStorybook.configs["flat/csf-strict"].map((config) => ({
16
- ...config,
15
+ ...eslintPluginStorybook.configs["flat/csf-strict"].map((config2) => ({
16
+ ...config2,
17
17
  files: ["**/*.stories.@(ts|tsx)"]
18
18
  })),
19
19
  {
@@ -42,7 +42,7 @@ const storybookConfig = [
42
42
  }
43
43
  }
44
44
  ];
45
- const lumina = [
45
+ const config = [
46
46
  ...storybookConfig,
47
47
  {
48
48
  ...luminaPlugin.configs.recommended,
@@ -218,5 +218,5 @@ declare global {
218
218
  },*/
219
219
  ];
220
220
  export {
221
- lumina as default
221
+ config as default
222
222
  };
@@ -1,41 +1,4 @@
1
- import { ESLintUtils, AST_NODE_TYPES } from "@typescript-eslint/utils";
2
- const version = "5.2.0-next.2";
3
- const packageJson = {
4
- version
5
- };
6
- function makeEslintPlugin(pluginName, urlCreator) {
7
- const rules = [];
8
- const creator = ESLintUtils.RuleCreator(urlCreator);
9
- return {
10
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
11
- createRule(rule) {
12
- const { meta, name, ...rest } = rule;
13
- const docs = { ...meta.docs, name };
14
- const ruleModule = creator({ ...rest, meta: { ...meta, docs }, name });
15
- rules.push(ruleModule);
16
- return ruleModule;
17
- },
18
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
19
- finalize() {
20
- const config = {
21
- rules: Object.fromEntries(
22
- rules.map((rule) => [`${pluginName}/${rule.meta.docs.name}`, rule.meta.docs.defaultLevel])
23
- )
24
- };
25
- const plugin = {
26
- meta: { name: `@arcgis/eslint-plugin-${pluginName}`, version: packageJson.version },
27
- configs: {
28
- recommended: config
29
- },
30
- rules: Object.fromEntries(rules.map((rule) => [rule.meta.docs.name, rule]))
31
- };
32
- config.plugins = {
33
- [pluginName]: plugin
34
- };
35
- return plugin;
36
- }
37
- };
38
- }
1
+ import { AST_NODE_TYPES } from "@typescript-eslint/utils";
39
2
  const unwrapExpression = (expression) => expression.type === AST_NODE_TYPES.TSAsExpression || expression.type === AST_NODE_TYPES.TSNonNullExpression || expression.type === AST_NODE_TYPES.TSSatisfiesExpression ? unwrapExpression(expression.expression) : expression;
40
3
  const luminaEntrypointName = "@arcgis/lumina";
41
4
  const luminaTestEntrypointName = "@arcgis/lumina-compiler/testing";
@@ -154,7 +117,6 @@ export {
154
117
  checkForLuminaJsx as j,
155
118
  isBindThisCallee as k,
156
119
  luminaJsxExportName as l,
157
- makeEslintPlugin as m,
158
120
  parsePropertyDecorator as p,
159
121
  sourceCodeDeclaresComponent as s,
160
122
  unwrapExpression as u
@@ -0,0 +1,41 @@
1
+ import { ESLintUtils } from "@typescript-eslint/utils";
2
+ const version = "5.2.0-next.21";
3
+ const packageJson = {
4
+ version
5
+ };
6
+ function makeEslintPlugin(pluginName, urlCreator) {
7
+ const rules = [];
8
+ const creator = ESLintUtils.RuleCreator(urlCreator);
9
+ return {
10
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
11
+ createRule(rule) {
12
+ const { meta, name, ...rest } = rule;
13
+ const docs = { ...meta.docs, name };
14
+ const ruleModule = creator({ ...rest, meta: { ...meta, docs }, name });
15
+ rules.push(ruleModule);
16
+ return ruleModule;
17
+ },
18
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
19
+ finalize() {
20
+ const config = {
21
+ rules: Object.fromEntries(
22
+ rules.map((rule) => [`${pluginName}/${rule.meta.docs.name}`, rule.meta.docs.defaultLevel])
23
+ )
24
+ };
25
+ const plugin = {
26
+ meta: { name: `@arcgis/eslint-plugin-${pluginName}`, version: packageJson.version },
27
+ configs: {
28
+ recommended: config
29
+ },
30
+ rules: Object.fromEntries(rules.map((rule) => [rule.meta.docs.name, rule]))
31
+ };
32
+ config.plugins = {
33
+ [pluginName]: plugin
34
+ };
35
+ return plugin;
36
+ }
37
+ };
38
+ }
39
+ export {
40
+ makeEslintPlugin as m
41
+ };
@@ -0,0 +1,4 @@
1
+ import type { EslintPlugin } from "../utils/makePlugin.js";
2
+
3
+ /** Rules specific to \@arcgis/core */
4
+ export const corePlugin: EslintPlugin;