@arcgis/eslint-config 5.2.0-next.4 → 5.2.0-next.40
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/applications.d.ts +4 -3
- package/dist/config/applications.js +4 -4
- package/dist/config/extra.d.ts +4 -24
- package/dist/config/extra.js +2 -2
- package/dist/config/index.d.ts +3 -2
- package/dist/config/index.js +2 -2
- package/dist/config/lumina.d.ts +4 -3
- package/dist/config/lumina.js +8 -8
- package/dist/{estree-DhsSViAu.js → estree-CDc-die8.js} +1 -39
- package/dist/makePlugin-BcalTk4U.js +41 -0
- package/dist/plugins/core/index.d.ts +4 -0
- package/dist/plugins/core/index.js +717 -0
- package/dist/plugins/lumina/index.d.ts +4 -5
- package/dist/plugins/lumina/index.js +2 -1
- package/dist/plugins/utils/makePlugin.d.ts +15 -16
- package/dist/plugins/webgis/index.d.ts +4 -5
- package/dist/plugins/webgis/index.js +795 -119
- package/dist/utils/defineBoundaries.d.ts +22 -38
- package/dist/utils/disableRules.d.ts +6 -6
- package/package.json +6 -4
- package/dist/config/storybook.d.ts +0 -2
- package/dist/plugins/lumina/plugin.d.ts +0 -8
- package/dist/plugins/lumina/rules/add-missing-jsx-import.d.ts +0 -2
- package/dist/plugins/lumina/rules/auto-add-type.d.ts +0 -3
- package/dist/plugins/lumina/rules/ban-events.d.ts +0 -6
- package/dist/plugins/lumina/rules/component-placement-rules.d.ts +0 -2
- package/dist/plugins/lumina/rules/consistent-event-naming.d.ts +0 -15
- package/dist/plugins/lumina/rules/consistent-nullability.d.ts +0 -2
- package/dist/plugins/lumina/rules/decorators-context.d.ts +0 -2
- package/dist/plugins/lumina/rules/explicit-setter-type.d.ts +0 -19
- package/dist/plugins/lumina/rules/member-ordering/build.d.ts +0 -4
- package/dist/plugins/lumina/rules/member-ordering/comments.d.ts +0 -19
- package/dist/plugins/lumina/rules/member-ordering/config.d.ts +0 -36
- package/dist/plugins/lumina/rules/member-ordering/normalize.d.ts +0 -10
- package/dist/plugins/lumina/rules/member-ordering.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-create-element-component.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-ignore-jsdoc-tag.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-incorrect-dynamic-tag-name.d.ts +0 -3
- package/dist/plugins/lumina/rules/no-inline-arrow-in-ref.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-inline-exposure-jsdoc-tag.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-invalid-directives-prop.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-jsdoc-xref-links.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-jsx-spread.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-listen-in-connected-callback.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-non-component-exports.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-property-name-start-with-on.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-render-false.d.ts +0 -3
- package/dist/plugins/lumina/rules/no-unnecessary-assertion-on-event.d.ts +0 -3
- package/dist/plugins/lumina/rules/no-unnecessary-attribute-name.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-unnecessary-bind-this.d.ts +0 -2
- package/dist/plugins/lumina/rules/no-unnecessary-key.d.ts +0 -2
- package/dist/plugins/lumina/rules/tag-name-rules.d.ts +0 -8
- package/dist/plugins/lumina/utils/checker.d.ts +0 -4
- package/dist/plugins/lumina/utils/estree.d.ts +0 -33
- package/dist/plugins/lumina/utils/tags.d.ts +0 -14
- package/dist/plugins/utils/helpers.d.ts +0 -2
- package/dist/plugins/webgis/plugin.d.ts +0 -8
- package/dist/plugins/webgis/rules/consistent-logging.d.ts +0 -2
- package/dist/plugins/webgis/rules/no-dts-files.d.ts +0 -2
- package/dist/plugins/webgis/rules/no-import-outside-src.d.ts +0 -2
- package/dist/plugins/webgis/rules/no-story-render-args-type-annotation.d.ts +0 -2
- package/dist/plugins/webgis/rules/no-touching-jsdoc.d.ts +0 -2
- package/dist/plugins/webgis/rules/no-unsafe-hash-links.d.ts +0 -2
- package/dist/plugins/webgis/rules/require-js-in-imports.d.ts +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { TSESLint } from
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
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
|
-
|
|
39
|
+
config as default
|
|
40
40
|
};
|
package/dist/config/extra.d.ts
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
package/dist/config/extra.js
CHANGED
package/dist/config/index.d.ts
CHANGED
package/dist/config/index.js
CHANGED
|
@@ -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/
|
|
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/
|
|
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",
|
package/dist/config/lumina.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { TSESLint } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
+
|
|
3
|
+
declare const config: TSESLint.FlatConfig.ConfigArray;
|
|
4
|
+
export default config;
|
package/dist/config/lumina.js
CHANGED
|
@@ -4,16 +4,16 @@ const storybookConfig = [
|
|
|
4
4
|
{
|
|
5
5
|
ignores: ["**/storybook-static*"]
|
|
6
6
|
},
|
|
7
|
-
...eslintPluginStorybook.configs["flat/recommended"].map((
|
|
8
|
-
...
|
|
7
|
+
...eslintPluginStorybook.configs["flat/recommended"].map((config2) => ({
|
|
8
|
+
...config2,
|
|
9
9
|
files: ["**/*.stories.@(ts|tsx)"]
|
|
10
10
|
})),
|
|
11
|
-
...eslintPluginStorybook.configs["flat/addon-interactions"].map((
|
|
12
|
-
...
|
|
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((
|
|
16
|
-
...
|
|
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
|
|
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
|
-
|
|
221
|
+
config as default
|
|
222
222
|
};
|
|
@@ -1,41 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const version = "5.2.0-next.4";
|
|
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.40";
|
|
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
|
+
};
|