@ota-meshi/eslint-plugin 0.13.1 → 0.13.3
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/configs/+json.js +6 -1
- package/lib/configs/+md.js +6 -1
- package/lib/configs/+package-json.js +6 -1
- package/lib/configs/+svelte-with-ts.js +2 -0
- package/lib/configs/+svelte.js +3 -1
- package/lib/configs/+toml.js +6 -1
- package/lib/configs/+vue2-with-ts.js +32 -0
- package/lib/configs/+vue3-with-ts.js +32 -0
- package/lib/index.js +2 -0
- package/lib/rules/missing-module-for-config.js +3 -1
- package/package.json +4 -4
package/lib/configs/+json.js
CHANGED
package/lib/configs/+md.js
CHANGED
|
@@ -6,6 +6,7 @@ module.exports = require("../utils/module").requireOf(
|
|
|
6
6
|
"@typescript-eslint/parser",
|
|
7
7
|
"typescript",
|
|
8
8
|
"@typescript-eslint/eslint-plugin",
|
|
9
|
+
"svelte-eslint-parser",
|
|
9
10
|
],
|
|
10
11
|
() => ({
|
|
11
12
|
overrides: [
|
|
@@ -13,6 +14,7 @@ module.exports = require("../utils/module").requireOf(
|
|
|
13
14
|
files: ["*.svelte"],
|
|
14
15
|
extends: [require.resolve("./+svelte"), ...base.extends],
|
|
15
16
|
...base,
|
|
17
|
+
parser: require.resolve("svelte-eslint-parser"),
|
|
16
18
|
parserOptions: {
|
|
17
19
|
...base.parserOptions,
|
|
18
20
|
parser: require.resolve("@typescript-eslint/parser"),
|
package/lib/configs/+svelte.js
CHANGED
|
@@ -8,7 +8,9 @@ module.exports = require("../utils/module").requireOf(
|
|
|
8
8
|
files: ["*.svelte"],
|
|
9
9
|
extends: ["plugin:svelte/recommended"],
|
|
10
10
|
parserOptions: {
|
|
11
|
-
|
|
11
|
+
parser: {
|
|
12
|
+
ts: require.resolve("@typescript-eslint/parser"),
|
|
13
|
+
},
|
|
12
14
|
},
|
|
13
15
|
rules: {
|
|
14
16
|
"svelte/no-store-async": "error",
|
package/lib/configs/+toml.js
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const base = require("./ts/base-config");
|
|
4
|
+
module.exports = require("../utils/module").requireOf(
|
|
5
|
+
[
|
|
6
|
+
"@typescript-eslint/parser",
|
|
7
|
+
"typescript",
|
|
8
|
+
"@typescript-eslint/eslint-plugin",
|
|
9
|
+
"vue-eslint-parser",
|
|
10
|
+
],
|
|
11
|
+
() => ({
|
|
12
|
+
overrides: [
|
|
13
|
+
{
|
|
14
|
+
files: ["*.vue"],
|
|
15
|
+
extends: [require.resolve("./+vue2"), ...base.extends],
|
|
16
|
+
...base,
|
|
17
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
18
|
+
parserOptions: {
|
|
19
|
+
...base.parserOptions,
|
|
20
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
21
|
+
extraFileExtensions: [".vue"],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
{
|
|
27
|
+
files: ["*.vue"],
|
|
28
|
+
fallback: () => ({
|
|
29
|
+
processor: "@ota-meshi/missing-parser",
|
|
30
|
+
}),
|
|
31
|
+
}
|
|
32
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const base = require("./ts/base-config");
|
|
4
|
+
module.exports = require("../utils/module").requireOf(
|
|
5
|
+
[
|
|
6
|
+
"@typescript-eslint/parser",
|
|
7
|
+
"typescript",
|
|
8
|
+
"@typescript-eslint/eslint-plugin",
|
|
9
|
+
"vue-eslint-parser",
|
|
10
|
+
],
|
|
11
|
+
() => ({
|
|
12
|
+
overrides: [
|
|
13
|
+
{
|
|
14
|
+
files: ["*.vue"],
|
|
15
|
+
extends: [require.resolve("./+vue3"), ...base.extends],
|
|
16
|
+
...base,
|
|
17
|
+
parser: require.resolve("vue-eslint-parser"),
|
|
18
|
+
parserOptions: {
|
|
19
|
+
...base.parserOptions,
|
|
20
|
+
parser: require.resolve("@typescript-eslint/parser"),
|
|
21
|
+
extraFileExtensions: [".vue"],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
{
|
|
27
|
+
files: ["*.vue"],
|
|
28
|
+
fallback: () => ({
|
|
29
|
+
processor: "@ota-meshi/missing-parser",
|
|
30
|
+
}),
|
|
31
|
+
}
|
|
32
|
+
);
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,9 @@ module.exports = {
|
|
|
9
9
|
"+prettier": require("./configs/+prettier"),
|
|
10
10
|
"+typescript": require("./configs/+typescript"),
|
|
11
11
|
"+vue2": require("./configs/+vue2"),
|
|
12
|
+
"+vue2-with-ts": require("./configs/+vue2-with-ts"),
|
|
12
13
|
"+vue3": require("./configs/+vue3"),
|
|
14
|
+
"+vue3-with-ts": require("./configs/+vue3-with-ts"),
|
|
13
15
|
"+svelte": require("./configs/+svelte"),
|
|
14
16
|
"+svelte-with-ts": require("./configs/+svelte-with-ts"),
|
|
15
17
|
"+yaml": require("./configs/+yaml"),
|
|
@@ -5,6 +5,7 @@ const getLinters = require("../utils/get-linters");
|
|
|
5
5
|
const findRootDir = require("../utils/find-root-dir");
|
|
6
6
|
|
|
7
7
|
let shouldFix = false;
|
|
8
|
+
const fixedModules = new Set();
|
|
8
9
|
patch();
|
|
9
10
|
|
|
10
11
|
module.exports = {
|
|
@@ -26,7 +27,8 @@ module.exports = {
|
|
|
26
27
|
const modules = context.options[0];
|
|
27
28
|
for (const moduleName of modules) {
|
|
28
29
|
let consoleOutput = "";
|
|
29
|
-
if (shouldFix) {
|
|
30
|
+
if (shouldFix && !fixedModules.has(moduleName)) {
|
|
31
|
+
fixedModules.add(moduleName);
|
|
30
32
|
const cwd = findRootDir(context.getFilename());
|
|
31
33
|
if (cwd) {
|
|
32
34
|
const result = spawnSync("npm", ["install", "-D", moduleName], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ota-meshi/eslint-plugin",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "ESLint configuration plugin for me.",
|
|
5
5
|
"repository": "git+https://github.com/ota-meshi/eslint-plugin.git",
|
|
6
6
|
"homepage": "https://github.com/ota-meshi/eslint-plugin#readme",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
42
42
|
"eslint-plugin-markdown": "^3.0.0",
|
|
43
43
|
"eslint-plugin-node": "^11.1.0",
|
|
44
|
-
"eslint-plugin-node-dependencies": "^0.
|
|
44
|
+
"eslint-plugin-node-dependencies": "^0.10.0",
|
|
45
45
|
"eslint-plugin-prettier": "^4.0.0",
|
|
46
46
|
"eslint-plugin-regexp": "^1.0.0",
|
|
47
47
|
"eslint-plugin-svelte": "^2.9.0",
|
|
48
|
-
"eslint-plugin-toml": "^0.
|
|
48
|
+
"eslint-plugin-toml": "^0.4.0",
|
|
49
49
|
"eslint-plugin-vue": "^9.0.0",
|
|
50
50
|
"eslint-plugin-yml": "^1.0.0",
|
|
51
51
|
"mocha": "^10.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"prettier-plugin-pkg": "^0.17.0",
|
|
54
54
|
"prettier-plugin-svelte": "^2.7.1",
|
|
55
55
|
"svelte": "^3.50.1",
|
|
56
|
-
"typescript": "^
|
|
56
|
+
"typescript": "^5.0.0"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|