@ota-meshi/eslint-plugin 0.15.3 → 0.16.1
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/lib/config-builder/+astro-with-ts.js +38 -0
- package/lib/config-builder/+astro.js +30 -0
- package/lib/config-builder/+eslint-plugin.js +26 -0
- package/lib/config-builder/+json.js +32 -0
- package/lib/config-builder/+md.js +43 -0
- package/lib/config-builder/+node.js +29 -0
- package/lib/config-builder/+package-json.js +29 -0
- package/lib/config-builder/+prettier.js +28 -0
- package/lib/config-builder/+svelte-with-ts.js +42 -0
- package/lib/config-builder/+svelte.js +30 -0
- package/lib/config-builder/+toml.js +32 -0
- package/lib/config-builder/+typescript.js +17 -0
- package/lib/config-builder/+vue2-with-ts.js +38 -0
- package/lib/config-builder/+vue2.js +30 -0
- package/lib/config-builder/+vue3-with-ts.js +38 -0
- package/lib/config-builder/+vue3.js +30 -0
- package/lib/config-builder/+yaml.js +32 -0
- package/lib/config-builder/base-plugins/eslint-comments.js +20 -0
- package/lib/config-builder/base-plugins/regexp.js +20 -0
- package/lib/config-builder/fallback.js +22 -0
- package/lib/config-builder/index.js +50 -0
- package/lib/config-builder/plugins/json-schema.js +30 -0
- package/lib/config-builder/plugins/ts/base-config.js +44 -0
- package/lib/config-builder/plugins/ts/index.js +5 -0
- package/lib/config-builder/recommended.js +38 -0
- package/lib/config-helpers/+astro.js +5 -0
- package/lib/config-helpers/+eslint-plugin.js +102 -0
- package/lib/config-helpers/+json.js +10 -0
- package/lib/config-helpers/+md.js +44 -0
- package/lib/config-helpers/+node.js +25 -0
- package/lib/config-helpers/+package-json.js +4 -0
- package/lib/config-helpers/+prettier.js +44 -0
- package/lib/config-helpers/+svelte.js +16 -0
- package/lib/config-helpers/+toml.js +5 -0
- package/lib/config-helpers/+typescript.js +18 -0
- package/lib/config-helpers/+vue.js +5 -0
- package/lib/config-helpers/+yaml.js +7 -0
- package/lib/config-helpers/base-plugins/eslint-comments.js +7 -0
- package/lib/config-helpers/base-plugins/regexp.js +10 -0
- package/lib/config-helpers/plugins/json-schema.js +31 -0
- package/lib/config-helpers/plugins/ts/base-config.js +114 -0
- package/lib/config-helpers/plugins/ts/index.js +21 -0
- package/lib/config-helpers/recommended.js +241 -0
- package/lib/configs/+eslint-plugin.js +22 -95
- package/lib/configs/+json.js +22 -22
- package/lib/configs/+md.js +30 -29
- package/lib/configs/+node.js +23 -29
- package/lib/configs/+package-json.js +20 -20
- package/lib/configs/+prettier.js +23 -70
- package/lib/configs/+svelte-with-ts.js +47 -25
- package/lib/configs/+svelte.js +23 -32
- package/lib/configs/+toml.js +20 -18
- package/lib/configs/+typescript.js +48 -32
- package/lib/configs/+vue2-with-ts.js +48 -25
- package/lib/configs/+vue2.js +24 -25
- package/lib/configs/+vue3-with-ts.js +48 -25
- package/lib/configs/+vue3.js +24 -25
- package/lib/configs/+yaml.js +22 -22
- package/lib/configs/base-plugins/eslint-comments.js +7 -9
- package/lib/configs/base-plugins/regexp.js +6 -11
- package/lib/configs/fallback.js +15 -0
- package/lib/configs/json-schema/config.js +14 -31
- package/lib/configs/recommended.js +25 -255
- package/lib/configs/ts/base-config.js +10 -118
- package/lib/configs/ts/index.js +4 -16
- package/lib/index.js +15 -23
- package/lib/parsers/any-parser.js +29 -0
- package/lib/rules/missing-module-for-config.js +35 -53
- package/lib/utils/find-root-dir.js +21 -18
- package/lib/utils/get-linters.js +27 -27
- package/lib/utils/module.js +81 -59
- package/package.json +22 -14
package/lib/configs/+prettier.js
CHANGED
|
@@ -1,81 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const _prettier_js_1 = require("../config-helpers/+prettier.js");
|
|
3
|
+
const module_js_1 = require("../utils/module.js");
|
|
4
|
+
const fallback_js_1 = require("./fallback.js");
|
|
4
5
|
function getConfigArrayIfHasConfig(config) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
try {
|
|
7
|
+
const configPath = (0, module_js_1.resolveFromCwd)(`eslint-config-${config}`);
|
|
8
|
+
(0, module_js_1.requireFromCwd)(configPath);
|
|
9
|
+
}
|
|
10
|
+
catch (_e) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
return [config];
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
module.exports = require("../utils/module").requireOf(
|
|
15
|
-
["eslint-plugin-prettier", "eslint-config-prettier", "prettier"],
|
|
16
|
-
() => ({
|
|
15
|
+
module.exports = (0, module_js_1.requireOf)(["eslint-plugin-prettier", "eslint-config-prettier", "prettier"], () => ({
|
|
17
16
|
plugins: ["prettier"],
|
|
18
17
|
extends: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
"prettier",
|
|
19
|
+
...getConfigArrayIfHasConfig("prettier/@typescript-eslint"),
|
|
20
|
+
...getConfigArrayIfHasConfig("prettier/react"),
|
|
21
|
+
...getConfigArrayIfHasConfig("prettier/vue"),
|
|
23
22
|
],
|
|
24
23
|
rules: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"jsonc/array-bracket-newline": "off",
|
|
28
|
-
"jsonc/array-bracket-spacing": "off",
|
|
29
|
-
"jsonc/array-element-newline": "off",
|
|
30
|
-
"jsonc/comma-dangle": "off",
|
|
31
|
-
"jsonc/comma-style": "off",
|
|
32
|
-
"jsonc/indent": "off",
|
|
33
|
-
"jsonc/key-spacing": "off",
|
|
34
|
-
"jsonc/no-floating-decimal": "off",
|
|
35
|
-
"jsonc/object-curly-newline": "off",
|
|
36
|
-
"jsonc/object-curly-spacing": "off",
|
|
37
|
-
"jsonc/object-property-newline": "off",
|
|
38
|
-
"jsonc/quote-props": "off",
|
|
39
|
-
"jsonc/quotes": "off",
|
|
40
|
-
"jsonc/space-unary-ops": "off",
|
|
41
|
-
|
|
42
|
-
"yml/block-mapping-colon-indicator-newline": "off",
|
|
43
|
-
"yml/block-mapping-question-indicator-newline": "off",
|
|
44
|
-
"yml/block-sequence-hyphen-indicator-newline": "off",
|
|
45
|
-
"yml/flow-mapping-curly-newline": "off",
|
|
46
|
-
"yml/flow-mapping-curly-spacing": "off",
|
|
47
|
-
"yml/flow-sequence-bracket-newline": "off",
|
|
48
|
-
"yml/flow-sequence-bracket-spacing": "off",
|
|
49
|
-
"yml/indent": "off",
|
|
50
|
-
"yml/key-spacing": "off",
|
|
51
|
-
"yml/no-multiple-empty-lines": "off",
|
|
52
|
-
"yml/quotes": "off",
|
|
53
|
-
|
|
54
|
-
"svelte/first-attribute-linebreak": "off",
|
|
55
|
-
"svelte/html-closing-bracket-spacing": "off",
|
|
56
|
-
"svelte/html-quotes": "off",
|
|
57
|
-
"svelte/html-self-closing": "off",
|
|
58
|
-
"svelte/indent": "off",
|
|
59
|
-
"svelte/max-attributes-per-line": "off",
|
|
60
|
-
"svelte/mustache-spacing": "off",
|
|
61
|
-
"svelte/no-spaces-around-equal-signs-in-attribute": "off",
|
|
62
|
-
"svelte/no-trailing-spaces": "off",
|
|
63
|
-
"svelte/shorthand-attribute": "off",
|
|
64
|
-
"svelte/shorthand-directive": "off",
|
|
24
|
+
..._prettier_js_1.prettierExtendRules,
|
|
65
25
|
},
|
|
66
26
|
overrides: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
27
|
+
{
|
|
28
|
+
files: _prettier_js_1.prettierOffFiles,
|
|
29
|
+
rules: {
|
|
30
|
+
"prettier/prettier": "off",
|
|
31
|
+
},
|
|
71
32
|
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
files: ["**/*.toml"],
|
|
75
|
-
rules: {
|
|
76
|
-
"prettier/prettier": "off",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
33
|
],
|
|
80
|
-
|
|
81
|
-
);
|
|
34
|
+
}), fallback_js_1.buildFallbackForLegacy);
|
|
@@ -1,33 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
const module_js_1 = require("../utils/module.js");
|
|
26
|
+
const base = __importStar(require("./ts/base-config.js"));
|
|
27
|
+
const _svelte_js_1 = require("../config-helpers/+svelte.js");
|
|
28
|
+
const fallback_js_1 = require("./fallback.js");
|
|
29
|
+
module.exports = (0, module_js_1.requireOf)([
|
|
6
30
|
"@typescript-eslint/parser",
|
|
7
31
|
"typescript",
|
|
8
32
|
"@typescript-eslint/eslint-plugin",
|
|
9
33
|
"svelte-eslint-parser",
|
|
10
|
-
|
|
11
|
-
() => ({
|
|
34
|
+
], () => ({
|
|
12
35
|
overrides: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
{
|
|
37
|
+
files: _svelte_js_1.svelteFiles,
|
|
38
|
+
...base,
|
|
39
|
+
extends: [require.resolve("./+svelte"), ...base.extends],
|
|
40
|
+
parser: require.resolve("svelte-eslint-parser"),
|
|
41
|
+
parserOptions: {
|
|
42
|
+
...base.parserOptions,
|
|
43
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
44
|
+
},
|
|
22
45
|
},
|
|
23
|
-
},
|
|
24
46
|
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
47
|
+
}), (missingList) => ({
|
|
48
|
+
overrides: [
|
|
49
|
+
{
|
|
50
|
+
files: _svelte_js_1.svelteFiles,
|
|
51
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
52
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
}));
|
package/lib/configs/+svelte.js
CHANGED
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const _svelte_js_1 = require("../config-helpers/+svelte.js");
|
|
3
|
+
const module_js_1 = require("../utils/module.js");
|
|
4
|
+
const fallback_js_1 = require("./fallback.js");
|
|
5
|
+
module.exports = (0, module_js_1.requireOf)(["eslint-plugin-svelte@2.9.0"], () => ({
|
|
6
6
|
overrides: [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
{
|
|
8
|
+
files: _svelte_js_1.svelteFiles,
|
|
9
|
+
extends: ["plugin:svelte/recommended"],
|
|
10
|
+
parserOptions: {
|
|
11
|
+
parser: {
|
|
12
|
+
ts: "@typescript-eslint/parser",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
..._svelte_js_1.svelteExtendRules,
|
|
17
|
+
},
|
|
14
18
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"svelte/derived-has-same-inputs-outputs": "error",
|
|
23
|
-
"svelte/prefer-class-directive": "warn",
|
|
24
|
-
"svelte/prefer-style-directive": "warn",
|
|
25
|
-
"svelte/spaced-html-comment": "warn",
|
|
19
|
+
],
|
|
20
|
+
}), (missingList) => ({
|
|
21
|
+
overrides: [
|
|
22
|
+
{
|
|
23
|
+
files: _svelte_js_1.svelteFiles,
|
|
24
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
25
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
26
26
|
},
|
|
27
|
-
},
|
|
28
27
|
],
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
files: ["*.svelte"],
|
|
32
|
-
fallback: () => ({
|
|
33
|
-
processor: "@ota-meshi/missing-parser",
|
|
34
|
-
parser: require.resolve("espree"),
|
|
35
|
-
}),
|
|
36
|
-
},
|
|
37
|
-
);
|
|
28
|
+
}));
|
package/lib/configs/+toml.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const _toml_js_1 = require("../config-helpers/+toml.js");
|
|
3
|
+
const module_js_1 = require("../utils/module.js");
|
|
4
|
+
const fallback_js_1 = require("./fallback.js");
|
|
5
|
+
module.exports = (0, module_js_1.requireOf)(["eslint-plugin-toml"], () => ({
|
|
6
6
|
extends: ["plugin:toml/standard"],
|
|
7
|
-
rules: {},
|
|
8
7
|
overrides: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
{
|
|
9
|
+
files: _toml_js_1.tomlFiles,
|
|
10
|
+
extends: [require.resolve("./json-schema/config")],
|
|
11
|
+
rules: {
|
|
12
|
+
..._toml_js_1.tomlExtendRules,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
13
15
|
],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
);
|
|
16
|
+
}), (missingList) => ({
|
|
17
|
+
overrides: [
|
|
18
|
+
{
|
|
19
|
+
files: _toml_js_1.tomlFiles,
|
|
20
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
21
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
}));
|
|
@@ -1,39 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
const _typescript_js_1 = require("../config-helpers/+typescript.js");
|
|
26
|
+
const module_js_1 = require("../utils/module.js");
|
|
27
|
+
const base = __importStar(require("./ts/base-config.js"));
|
|
28
|
+
const fallback_js_1 = require("./fallback.js");
|
|
29
|
+
module.exports = (0, module_js_1.requireOf)([
|
|
6
30
|
"@typescript-eslint/parser",
|
|
7
31
|
"typescript",
|
|
8
32
|
"@typescript-eslint/eslint-plugin",
|
|
9
|
-
|
|
10
|
-
() => ({
|
|
33
|
+
], () => ({
|
|
11
34
|
overrides: [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
{
|
|
36
|
+
files: _typescript_js_1.tsFiles,
|
|
37
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
38
|
+
...base,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
files: _typescript_js_1.tsTestFiles,
|
|
42
|
+
rules: {
|
|
43
|
+
..._typescript_js_1.tsTestExtendRules,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
}), (missingList) => ({
|
|
48
|
+
overrides: [
|
|
49
|
+
{
|
|
50
|
+
files: _typescript_js_1.tsFiles,
|
|
51
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
52
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
28
53
|
},
|
|
29
|
-
},
|
|
30
54
|
],
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
files: ["*.ts", "*.mts", "*.cts"],
|
|
34
|
-
fallback: () => ({
|
|
35
|
-
processor: "@ota-meshi/missing-parser",
|
|
36
|
-
parser: require.resolve("espree"),
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
);
|
|
55
|
+
}));
|
|
@@ -1,33 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
const _vue_js_1 = require("../config-helpers/+vue.js");
|
|
26
|
+
const module_js_1 = require("../utils/module.js");
|
|
27
|
+
const fallback_js_1 = require("./fallback.js");
|
|
28
|
+
const base = __importStar(require("./ts/base-config.js"));
|
|
29
|
+
module.exports = (0, module_js_1.requireOf)([
|
|
6
30
|
"@typescript-eslint/parser",
|
|
7
31
|
"typescript",
|
|
8
32
|
"@typescript-eslint/eslint-plugin",
|
|
33
|
+
"eslint-plugin-vue",
|
|
9
34
|
"vue-eslint-parser",
|
|
10
|
-
|
|
11
|
-
() => ({
|
|
35
|
+
], () => ({
|
|
12
36
|
overrides: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
{
|
|
38
|
+
files: _vue_js_1.vueFiles,
|
|
39
|
+
...base,
|
|
40
|
+
extends: [require.resolve("./+vue2"), ...base.extends],
|
|
41
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
42
|
+
parserOptions: {
|
|
43
|
+
...base.parserOptions,
|
|
44
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
45
|
+
},
|
|
22
46
|
},
|
|
23
|
-
},
|
|
24
47
|
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
48
|
+
}), (missingList) => ({
|
|
49
|
+
overrides: [
|
|
50
|
+
{
|
|
51
|
+
files: _vue_js_1.vueFiles,
|
|
52
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
53
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
}));
|
package/lib/configs/+vue2.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
() => ({
|
|
2
|
+
const _vue_js_1 = require("../config-helpers/+vue.js");
|
|
3
|
+
const module_js_1 = require("../utils/module.js");
|
|
4
|
+
const fallback_js_1 = require("./fallback.js");
|
|
5
|
+
module.exports = (0, module_js_1.requireOf)(["eslint-plugin-vue", "vue-eslint-parser"], () => ({
|
|
7
6
|
extends: ["plugin:vue/recommended"],
|
|
8
7
|
overrides: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
{
|
|
9
|
+
files: _vue_js_1.vueFiles,
|
|
10
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
11
|
+
parserOptions: {
|
|
12
|
+
parser: {
|
|
13
|
+
ts: "@typescript-eslint/parser",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
..._vue_js_1.vueExtendRules,
|
|
18
|
+
},
|
|
19
19
|
},
|
|
20
|
-
},
|
|
21
20
|
],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
21
|
+
}), (missingList) => ({
|
|
22
|
+
overrides: [
|
|
23
|
+
{
|
|
24
|
+
files: _vue_js_1.vueFiles,
|
|
25
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
26
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
}));
|
|
@@ -1,33 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
const _vue_js_1 = require("../config-helpers/+vue.js");
|
|
26
|
+
const module_js_1 = require("../utils/module.js");
|
|
27
|
+
const fallback_js_1 = require("./fallback.js");
|
|
28
|
+
const base = __importStar(require("./ts/base-config.js"));
|
|
29
|
+
module.exports = (0, module_js_1.requireOf)([
|
|
6
30
|
"@typescript-eslint/parser",
|
|
7
31
|
"typescript",
|
|
8
32
|
"@typescript-eslint/eslint-plugin",
|
|
33
|
+
"eslint-plugin-vue",
|
|
9
34
|
"vue-eslint-parser",
|
|
10
|
-
|
|
11
|
-
() => ({
|
|
35
|
+
], () => ({
|
|
12
36
|
overrides: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
{
|
|
38
|
+
files: _vue_js_1.vueFiles,
|
|
39
|
+
...base,
|
|
40
|
+
extends: [require.resolve("./+vue3"), ...base.extends],
|
|
41
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
42
|
+
parserOptions: {
|
|
43
|
+
...base.parserOptions,
|
|
44
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
45
|
+
},
|
|
22
46
|
},
|
|
23
|
-
},
|
|
24
47
|
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
48
|
+
}), (missingList) => ({
|
|
49
|
+
overrides: [
|
|
50
|
+
{
|
|
51
|
+
files: _vue_js_1.vueFiles,
|
|
52
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
53
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
}));
|
package/lib/configs/+vue3.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
() => ({
|
|
2
|
+
const _vue_js_1 = require("../config-helpers/+vue.js");
|
|
3
|
+
const module_js_1 = require("../utils/module.js");
|
|
4
|
+
const fallback_js_1 = require("./fallback.js");
|
|
5
|
+
module.exports = (0, module_js_1.requireOf)(["eslint-plugin-vue", "vue-eslint-parser"], () => ({
|
|
7
6
|
extends: ["plugin:vue/vue3-recommended"],
|
|
8
7
|
overrides: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
{
|
|
9
|
+
files: _vue_js_1.vueFiles,
|
|
10
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
11
|
+
parserOptions: {
|
|
12
|
+
parser: {
|
|
13
|
+
ts: "@typescript-eslint/parser",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
..._vue_js_1.vueExtendRules,
|
|
18
|
+
},
|
|
19
19
|
},
|
|
20
|
-
},
|
|
21
20
|
],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
21
|
+
}), (missingList) => ({
|
|
22
|
+
overrides: [
|
|
23
|
+
{
|
|
24
|
+
files: _vue_js_1.vueFiles,
|
|
25
|
+
parser: require.resolve("../parsers/any-parser"),
|
|
26
|
+
...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
}));
|