@so1ve/eslint-config 4.2.2 → 4.6.0
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/configs/astro.mjs +1 -3
- package/dist/configs/command.mjs +1 -3
- package/dist/configs/comments.mjs +1 -3
- package/dist/configs/de-morgan.mjs +1 -3
- package/dist/configs/formatting.mjs +11 -7
- package/dist/configs/html.mjs +1 -3
- package/dist/configs/ignores.mjs +4 -6
- package/dist/configs/imports.mjs +1 -3
- package/dist/configs/index.mjs +25 -26
- package/dist/configs/javascript.mjs +1 -3
- package/dist/configs/jsonc.mjs +34 -9
- package/dist/configs/mdx.mjs +1 -3
- package/dist/configs/node.mjs +1 -3
- package/dist/configs/only-error.mjs +1 -3
- package/dist/configs/perfectionist.mjs +1 -3
- package/dist/configs/pnpm.mjs +6 -18
- package/dist/configs/promise.mjs +1 -3
- package/dist/configs/solid.mjs +1 -3
- package/dist/configs/sort-imports.mjs +1 -2
- package/dist/configs/test.mjs +2 -9
- package/dist/configs/toml.mjs +5 -4
- package/dist/configs/typescript.mjs +1 -3
- package/dist/configs/unicorn.mjs +1 -3
- package/dist/configs/vue.mjs +3 -6
- package/dist/configs/yaml.mjs +20 -6
- package/dist/factory.mjs +1 -3
- package/dist/globs.mjs +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -2
- package/dist/plugins.mjs +1 -2
- package/dist/typegen.d.mts +2377 -2029
- package/dist/types.d.mts +1 -1
- package/dist/utils.d.mts +0 -1
- package/dist/utils.mjs +1 -2
- package/package.json +44 -48
package/dist/configs/astro.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_ASTRO } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/astro.ts
|
|
5
4
|
async function astro({ overrides = {} } = {}) {
|
|
6
5
|
const [pluginAstro, parserAstro, parserTs] = await Promise.all([
|
|
@@ -39,6 +38,5 @@ async function astro({ overrides = {} } = {}) {
|
|
|
39
38
|
}
|
|
40
39
|
}];
|
|
41
40
|
}
|
|
42
|
-
|
|
43
41
|
//#endregion
|
|
44
|
-
export { astro };
|
|
42
|
+
export { astro };
|
package/dist/configs/command.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pluginComments } from "../plugins.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/comments.ts
|
|
4
3
|
const comments = () => [{
|
|
5
4
|
name: "so1ve/comments/setup",
|
|
@@ -14,6 +13,5 @@ const comments = () => [{
|
|
|
14
13
|
"eslint-comments/no-unused-enable": "error"
|
|
15
14
|
}
|
|
16
15
|
}];
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
export { comments };
|
|
17
|
+
export { comments };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GLOB_TESTS, GLOB_TSCONFIG } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/formatting.ts
|
|
5
4
|
async function formatting(options) {
|
|
6
5
|
return [
|
|
@@ -26,7 +25,13 @@ async function formatting(options) {
|
|
|
26
25
|
"style/padding-line-between-statements": ["error", {
|
|
27
26
|
blankLine: "always",
|
|
28
27
|
prev: "*",
|
|
29
|
-
next:
|
|
28
|
+
next: [
|
|
29
|
+
"return",
|
|
30
|
+
"continue",
|
|
31
|
+
"break",
|
|
32
|
+
"throw",
|
|
33
|
+
"debugger"
|
|
34
|
+
]
|
|
30
35
|
}],
|
|
31
36
|
"style/quote-props": ["error", "consistent-as-needed"],
|
|
32
37
|
"style/spaced-comment": [
|
|
@@ -48,7 +53,7 @@ async function formatting(options) {
|
|
|
48
53
|
},
|
|
49
54
|
(options?.jsonc ?? true) && [{
|
|
50
55
|
name: "so1ve/formatting/rules/sort-package-json",
|
|
51
|
-
files: [
|
|
56
|
+
files: ["**/package.json"],
|
|
52
57
|
rules: { "jsonc/sort-keys": [
|
|
53
58
|
"error",
|
|
54
59
|
{
|
|
@@ -285,10 +290,9 @@ async function formatting(options) {
|
|
|
285
290
|
(options?.test ?? true) && {
|
|
286
291
|
name: "so1ve/formatting/rules/test",
|
|
287
292
|
files: GLOB_TESTS,
|
|
288
|
-
rules: { "
|
|
293
|
+
rules: { "vitest/padding-around-all": "error" }
|
|
289
294
|
}
|
|
290
295
|
].flat().filter(Boolean);
|
|
291
296
|
}
|
|
292
|
-
|
|
293
297
|
//#endregion
|
|
294
|
-
export { formatting };
|
|
298
|
+
export { formatting };
|
package/dist/configs/html.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_HTML } from "../globs.mjs";
|
|
2
2
|
import { interopDefault, renameRules } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/html.ts
|
|
5
4
|
async function html() {
|
|
6
5
|
const [parserHtml, pluginHtml, pluginHtmlJsSupport] = await Promise.all([
|
|
@@ -32,6 +31,5 @@ async function html() {
|
|
|
32
31
|
}
|
|
33
32
|
}];
|
|
34
33
|
}
|
|
35
|
-
|
|
36
34
|
//#endregion
|
|
37
|
-
export { html };
|
|
35
|
+
export { html };
|
package/dist/configs/ignores.mjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { GLOB_EXCLUDE } from "../globs.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/ignores.ts
|
|
4
3
|
function ignores(userIgnores = []) {
|
|
5
|
-
let ignores
|
|
6
|
-
ignores
|
|
4
|
+
let ignores = [...GLOB_EXCLUDE];
|
|
5
|
+
ignores = typeof userIgnores === "function" ? userIgnores(ignores) : [...ignores, ...userIgnores];
|
|
7
6
|
return [{
|
|
8
7
|
name: "so1ve/ignores",
|
|
9
|
-
ignores
|
|
8
|
+
ignores
|
|
10
9
|
}];
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
//#endregion
|
|
14
|
-
export { ignores };
|
|
12
|
+
export { ignores };
|
package/dist/configs/imports.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_DTS } from "../globs.mjs";
|
|
2
2
|
import { pluginImport, pluginImportLite } from "../plugins.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/imports.ts
|
|
5
4
|
const imports = (options = {}) => [
|
|
6
5
|
{
|
|
@@ -70,6 +69,5 @@ const imports = (options = {}) => [
|
|
|
70
69
|
rules: { "import/no-duplicates": "off" }
|
|
71
70
|
}
|
|
72
71
|
];
|
|
73
|
-
|
|
74
72
|
//#endregion
|
|
75
|
-
export { imports };
|
|
73
|
+
export { imports };
|
package/dist/configs/index.mjs
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
export { };
|
|
1
|
+
import "./astro.mjs";
|
|
2
|
+
import "./command.mjs";
|
|
3
|
+
import "./comments.mjs";
|
|
4
|
+
import "./de-morgan.mjs";
|
|
5
|
+
import "./formatting.mjs";
|
|
6
|
+
import "./html.mjs";
|
|
7
|
+
import "./ignores.mjs";
|
|
8
|
+
import "./imports.mjs";
|
|
9
|
+
import "./javascript.mjs";
|
|
10
|
+
import "./jsonc.mjs";
|
|
11
|
+
import "./mdx.mjs";
|
|
12
|
+
import "./node.mjs";
|
|
13
|
+
import "./only-error.mjs";
|
|
14
|
+
import "./perfectionist.mjs";
|
|
15
|
+
import "./pnpm.mjs";
|
|
16
|
+
import "./promise.mjs";
|
|
17
|
+
import "./solid.mjs";
|
|
18
|
+
import "./sort-imports.mjs";
|
|
19
|
+
import "./test.mjs";
|
|
20
|
+
import "./toml.mjs";
|
|
21
|
+
import "./typescript.mjs";
|
|
22
|
+
import "./unicorn.mjs";
|
|
23
|
+
import "./vue.mjs";
|
|
24
|
+
import "./yaml.mjs";
|
|
25
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GLOB_SRC, GLOB_SRC_EXT } from "../globs.mjs";
|
|
2
2
|
import { pluginArrayFunc, pluginNoAwaitInPromise, pluginRegexp, pluginSo1ve, pluginUnusedImports } from "../plugins.mjs";
|
|
3
3
|
import globals from "globals";
|
|
4
|
-
|
|
5
4
|
//#region src/configs/javascript.ts
|
|
6
5
|
async function javascript({ overrides } = {}) {
|
|
7
6
|
const regexpRecommended = pluginRegexp.configs["flat/recommended"];
|
|
@@ -321,6 +320,5 @@ async function javascript({ overrides } = {}) {
|
|
|
321
320
|
}
|
|
322
321
|
];
|
|
323
322
|
}
|
|
324
|
-
|
|
325
323
|
//#endregion
|
|
326
|
-
export { javascript };
|
|
324
|
+
export { javascript };
|
package/dist/configs/jsonc.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { GLOB_ESLINTRC, GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/jsonc.ts
|
|
5
4
|
async function jsonc() {
|
|
6
|
-
const [parserJsonc, pluginJsonc] = await Promise.all([interopDefault(import("jsonc-eslint-parser")), interopDefault(import("eslint-plugin-jsonc"))]);
|
|
7
5
|
return [{
|
|
8
6
|
name: "so1ve/jsonc/setup",
|
|
9
|
-
plugins: { jsonc:
|
|
7
|
+
plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) }
|
|
10
8
|
}, {
|
|
11
9
|
name: "so1ve/jsonc/rules",
|
|
12
10
|
files: [
|
|
@@ -15,16 +13,43 @@ async function jsonc() {
|
|
|
15
13
|
GLOB_JSONC,
|
|
16
14
|
GLOB_ESLINTRC
|
|
17
15
|
],
|
|
18
|
-
|
|
16
|
+
language: "jsonc/x",
|
|
19
17
|
rules: {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
"jsonc/no-bigint-literals": "error",
|
|
19
|
+
"jsonc/no-binary-expression": "error",
|
|
20
|
+
"jsonc/no-binary-numeric-literals": "error",
|
|
21
|
+
"jsonc/no-dupe-keys": "error",
|
|
22
|
+
"jsonc/no-escape-sequence-in-identifier": "error",
|
|
23
|
+
"jsonc/no-floating-decimal": "error",
|
|
24
|
+
"jsonc/no-hexadecimal-numeric-literals": "error",
|
|
25
|
+
"jsonc/no-infinity": "error",
|
|
26
|
+
"jsonc/no-irregular-whitespace": "error",
|
|
27
|
+
"jsonc/no-multi-str": "error",
|
|
28
|
+
"jsonc/no-nan": "error",
|
|
29
|
+
"jsonc/no-number-props": "error",
|
|
30
|
+
"jsonc/no-numeric-separators": "error",
|
|
22
31
|
"jsonc/no-octal-escape": "error",
|
|
32
|
+
"jsonc/no-octal-numeric-literals": "error",
|
|
33
|
+
"jsonc/no-octal": "error",
|
|
34
|
+
"jsonc/no-parenthesized": "error",
|
|
35
|
+
"jsonc/no-plus-sign": "error",
|
|
36
|
+
"jsonc/no-regexp-literals": "error",
|
|
37
|
+
"jsonc/no-sparse-arrays": "error",
|
|
38
|
+
"jsonc/no-template-literals": "error",
|
|
39
|
+
"jsonc/no-undefined-value": "error",
|
|
40
|
+
"jsonc/no-unicode-codepoint-escapes": "error",
|
|
41
|
+
"jsonc/no-useless-escape": "error",
|
|
42
|
+
"jsonc/quote-props": "error",
|
|
23
43
|
"jsonc/quotes-props": "off",
|
|
24
|
-
"jsonc/quotes": "off"
|
|
44
|
+
"jsonc/quotes": "off",
|
|
45
|
+
"jsonc/space-unary-ops": "error",
|
|
46
|
+
"jsonc/valid-json-number": "error",
|
|
47
|
+
"jsonc/vue-custom-block/no-parsing-error": "error",
|
|
48
|
+
"no-unused-expressions": "off",
|
|
49
|
+
"no-unused-vars": "off",
|
|
50
|
+
"strict": "off"
|
|
25
51
|
}
|
|
26
52
|
}];
|
|
27
53
|
}
|
|
28
|
-
|
|
29
54
|
//#endregion
|
|
30
|
-
export { jsonc };
|
|
55
|
+
export { jsonc };
|
package/dist/configs/mdx.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_MARKDOWN } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/mdx.ts
|
|
5
4
|
async function mdx({ componentExts = [], overrides } = {}) {
|
|
6
5
|
const pluginMdx = await interopDefault(import("eslint-plugin-mdx"));
|
|
@@ -38,6 +37,5 @@ async function mdx({ componentExts = [], overrides } = {}) {
|
|
|
38
37
|
}
|
|
39
38
|
}];
|
|
40
39
|
}
|
|
41
|
-
|
|
42
40
|
//#endregion
|
|
43
|
-
export { mdx };
|
|
41
|
+
export { mdx };
|
package/dist/configs/node.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pluginNode } from "../plugins.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/node.ts
|
|
4
3
|
const node = () => [{
|
|
5
4
|
name: "so1ve/node/setup",
|
|
@@ -16,6 +15,5 @@ const node = () => [{
|
|
|
16
15
|
"node/process-exit-as-throw": "error"
|
|
17
16
|
}
|
|
18
17
|
}];
|
|
19
|
-
|
|
20
18
|
//#endregion
|
|
21
|
-
export { node };
|
|
19
|
+
export { node };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { pluginOnlyError } from "../plugins.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/only-error.ts
|
|
4
3
|
const onlyError = () => [{
|
|
5
4
|
name: "so1ve/only-error",
|
|
6
5
|
plugins: { "only-error": pluginOnlyError }
|
|
7
6
|
}];
|
|
8
|
-
|
|
9
7
|
//#endregion
|
|
10
|
-
export { onlyError };
|
|
8
|
+
export { onlyError };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { interopDefault } from "../utils.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/perfectionist.ts
|
|
4
3
|
async function perfectionist() {
|
|
5
4
|
return [{
|
|
@@ -29,6 +28,5 @@ async function perfectionist() {
|
|
|
29
28
|
}
|
|
30
29
|
}];
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
//#endregion
|
|
34
|
-
export { perfectionist };
|
|
32
|
+
export { perfectionist };
|
package/dist/configs/pnpm.mjs
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { interopDefault } from "../utils.mjs";
|
|
2
2
|
import "find-up-simple";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/pnpm.ts
|
|
5
4
|
async function pnpm(options) {
|
|
6
5
|
const { json = true, yaml = true } = options;
|
|
7
|
-
const [pluginPnpm, yamlParser
|
|
8
|
-
interopDefault(import("eslint-plugin-pnpm")),
|
|
9
|
-
yaml ? interopDefault(import("yaml-eslint-parser")) : void 0,
|
|
10
|
-
json ? interopDefault(import("jsonc-eslint-parser")) : void 0
|
|
11
|
-
]);
|
|
6
|
+
const [pluginPnpm, yamlParser] = await Promise.all([interopDefault(import("eslint-plugin-pnpm")), yaml ? interopDefault(import("yaml-eslint-parser")) : void 0]);
|
|
12
7
|
const configs = [];
|
|
13
8
|
if (json) configs.push({
|
|
14
9
|
files: ["package.json", "**/package.json"],
|
|
15
|
-
|
|
10
|
+
language: "jsonc/x",
|
|
16
11
|
name: "so1ve/pnpm/package-json",
|
|
17
12
|
plugins: { pnpm: pluginPnpm },
|
|
18
13
|
rules: { "pnpm/json-prefer-workspace-settings": "error" }
|
|
@@ -31,6 +26,7 @@ async function pnpm(options) {
|
|
|
31
26
|
{
|
|
32
27
|
order: [
|
|
33
28
|
...[
|
|
29
|
+
"allowBuilds",
|
|
34
30
|
"cacheDir",
|
|
35
31
|
"catalogMode",
|
|
36
32
|
"cleanupUnusedCatalogs",
|
|
@@ -43,18 +39,15 @@ async function pnpm(options) {
|
|
|
43
39
|
"hoistPattern",
|
|
44
40
|
"hoistWorkspacePackages",
|
|
45
41
|
"ignoreCompatibilityDb",
|
|
46
|
-
"ignoreDepScripts",
|
|
47
42
|
"ignoreScripts",
|
|
48
43
|
"ignoreWorkspaceRootCheck",
|
|
49
|
-
"managePackageManagerVersions",
|
|
50
44
|
"minimumReleaseAge",
|
|
51
45
|
"minimumReleaseAgeExclude",
|
|
52
46
|
"modulesDir",
|
|
53
47
|
"nodeLinker",
|
|
54
48
|
"nodeVersion",
|
|
55
49
|
"optimisticRepeatInstall",
|
|
56
|
-
"
|
|
57
|
-
"packageManagerStrictVersion",
|
|
50
|
+
"pmOnFail",
|
|
58
51
|
"preferSymlinkedExecutables",
|
|
59
52
|
"preferWorkspacePackages",
|
|
60
53
|
"publicHoistPattern",
|
|
@@ -78,13 +71,9 @@ async function pnpm(options) {
|
|
|
78
71
|
"patchedDependencies",
|
|
79
72
|
...[
|
|
80
73
|
"allowedDeprecatedVersions",
|
|
81
|
-
"
|
|
74
|
+
"allowUnusedPatches",
|
|
82
75
|
"configDependencies",
|
|
83
|
-
"ignoredBuiltDependencies",
|
|
84
76
|
"ignoredOptionalDependencies",
|
|
85
|
-
"neverBuiltDependencies",
|
|
86
|
-
"onlyBuiltDependencies",
|
|
87
|
-
"onlyBuiltDependenciesFile",
|
|
88
77
|
"packageExtensions",
|
|
89
78
|
"peerDependencyRules"
|
|
90
79
|
],
|
|
@@ -101,6 +90,5 @@ async function pnpm(options) {
|
|
|
101
90
|
});
|
|
102
91
|
return configs;
|
|
103
92
|
}
|
|
104
|
-
|
|
105
93
|
//#endregion
|
|
106
|
-
export { pnpm };
|
|
94
|
+
export { pnpm };
|
package/dist/configs/promise.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pluginPromise } from "../plugins.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/promise.ts
|
|
4
3
|
const promise = () => [{
|
|
5
4
|
name: "so1ve/promise/setup",
|
|
@@ -8,6 +7,5 @@ const promise = () => [{
|
|
|
8
7
|
name: "so1ve/promise/rules",
|
|
9
8
|
rules: { "promise/param-names": "error" }
|
|
10
9
|
}];
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
export { promise };
|
|
11
|
+
export { promise };
|
package/dist/configs/solid.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { interopDefault } from "../utils.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/solid.ts
|
|
4
3
|
async function solid({ overrides, typescript } = {}) {
|
|
5
4
|
const pluginSolid = await interopDefault(import("eslint-plugin-solid"));
|
|
@@ -19,6 +18,5 @@ async function solid({ overrides, typescript } = {}) {
|
|
|
19
18
|
}
|
|
20
19
|
}];
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
//#endregion
|
|
24
|
-
export { solid };
|
|
22
|
+
export { solid };
|
package/dist/configs/test.mjs
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { GLOB_TESTS } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/test.ts
|
|
5
4
|
async function test({ overrides } = {}) {
|
|
6
|
-
const [pluginNoOnlyTests, pluginVitest
|
|
7
|
-
interopDefault(import("eslint-plugin-no-only-tests")),
|
|
8
|
-
interopDefault(import("@vitest/eslint-plugin")),
|
|
9
|
-
interopDefault(import("eslint-plugin-jest-formatting"))
|
|
10
|
-
]);
|
|
5
|
+
const [pluginNoOnlyTests, pluginVitest] = await Promise.all([interopDefault(import("eslint-plugin-no-only-tests")), interopDefault(import("@vitest/eslint-plugin"))]);
|
|
11
6
|
return [{
|
|
12
7
|
name: "so1ve/test/setup",
|
|
13
8
|
plugins: {
|
|
14
|
-
"jest-formatting": pluginJestFormatting,
|
|
15
9
|
"no-only-tests": pluginNoOnlyTests,
|
|
16
10
|
"vitest": pluginVitest
|
|
17
11
|
}
|
|
@@ -41,6 +35,5 @@ async function test({ overrides } = {}) {
|
|
|
41
35
|
}
|
|
42
36
|
}];
|
|
43
37
|
}
|
|
44
|
-
|
|
45
38
|
//#endregion
|
|
46
|
-
export { test };
|
|
39
|
+
export { test };
|
package/dist/configs/toml.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_TOML } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/configs/toml.ts
|
|
5
4
|
async function toml({ overrides } = {}) {
|
|
6
5
|
const [parserToml, pluginToml] = await Promise.all([interopDefault(import("toml-eslint-parser")), interopDefault(import("eslint-plugin-toml"))]);
|
|
@@ -12,13 +11,15 @@ async function toml({ overrides } = {}) {
|
|
|
12
11
|
languageOptions: { parser: parserToml },
|
|
13
12
|
files: [GLOB_TOML],
|
|
14
13
|
rules: {
|
|
15
|
-
...pluginToml.configs.recommended.rules,
|
|
16
14
|
"no-irregular-whitespace": "off",
|
|
17
15
|
"style/spaced-comment": "off",
|
|
16
|
+
"toml/no-unreadable-number-separator": "error",
|
|
17
|
+
"toml/precision-of-fractional-seconds": "error",
|
|
18
|
+
"toml/precision-of-integer": "error",
|
|
19
|
+
"toml/vue-custom-block/no-parsing-error": "error",
|
|
18
20
|
...overrides
|
|
19
21
|
}
|
|
20
22
|
}];
|
|
21
23
|
}
|
|
22
|
-
|
|
23
24
|
//#endregion
|
|
24
|
-
export { toml };
|
|
25
|
+
export { toml };
|
|
@@ -2,7 +2,6 @@ import { GLOB_ASTRO_TS, GLOB_MARKDOWN_CODE, GLOB_TS, GLOB_TSX } from "../globs.m
|
|
|
2
2
|
import { renameRules } from "../utils.mjs";
|
|
3
3
|
import { pluginImport } from "../plugins.mjs";
|
|
4
4
|
import tseslint from "typescript-eslint";
|
|
5
|
-
|
|
6
5
|
//#region src/configs/typescript.ts
|
|
7
6
|
const typescript = async ({ componentExts = [], parserOptions, overrides } = {}) => [
|
|
8
7
|
{
|
|
@@ -227,6 +226,5 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
|
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
];
|
|
230
|
-
|
|
231
229
|
//#endregion
|
|
232
|
-
export { typescript };
|
|
230
|
+
export { typescript };
|
package/dist/configs/unicorn.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pluginUnicorn } from "../plugins.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/configs/unicorn.ts
|
|
4
3
|
const unicorn = () => [{
|
|
5
4
|
name: "so1ve/unicorn/setup",
|
|
@@ -56,6 +55,5 @@ const unicorn = () => [{
|
|
|
56
55
|
"unicorn/throw-new-error": "error"
|
|
57
56
|
}
|
|
58
57
|
}];
|
|
59
|
-
|
|
60
58
|
//#endregion
|
|
61
|
-
export { unicorn };
|
|
59
|
+
export { unicorn };
|
package/dist/configs/vue.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GLOB_VUE } from "../globs.mjs";
|
|
2
2
|
import { interopDefault } from "../utils.mjs";
|
|
3
3
|
import tseslint from "typescript-eslint";
|
|
4
|
-
|
|
5
4
|
//#region src/configs/vue.ts
|
|
6
5
|
async function vue({ overrides, typescript } = {}) {
|
|
7
6
|
const [parserVue, pluginVue] = await Promise.all([interopDefault(import("vue-eslint-parser")), interopDefault(import("eslint-plugin-vue"))]);
|
|
@@ -90,9 +89,8 @@ async function vue({ overrides, typescript } = {}) {
|
|
|
90
89
|
"defineProps",
|
|
91
90
|
"defineSlots"
|
|
92
91
|
] }],
|
|
93
|
-
"vue/dot-location": ["error", "property"],
|
|
94
|
-
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
95
92
|
"vue/eqeqeq": ["error", "smart"],
|
|
93
|
+
"vue/html-closing-bracket-newline": "off",
|
|
96
94
|
"vue/html-closing-bracket-spacing": "off",
|
|
97
95
|
"vue/html-comment-content-newline": ["error", {
|
|
98
96
|
singleline: "ignore",
|
|
@@ -151,7 +149,7 @@ async function vue({ overrides, typescript } = {}) {
|
|
|
151
149
|
multiline: true,
|
|
152
150
|
consistent: true
|
|
153
151
|
}],
|
|
154
|
-
"vue/object-property-newline": ["error", {
|
|
152
|
+
"vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
155
153
|
"vue/object-shorthand": [
|
|
156
154
|
"error",
|
|
157
155
|
"always",
|
|
@@ -189,6 +187,5 @@ async function vue({ overrides, typescript } = {}) {
|
|
|
189
187
|
}
|
|
190
188
|
}];
|
|
191
189
|
}
|
|
192
|
-
|
|
193
190
|
//#endregion
|
|
194
|
-
export { vue };
|
|
191
|
+
export { vue };
|
package/dist/configs/yaml.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GLOB_YAML } from "../globs.mjs";
|
|
2
|
-
import { interopDefault
|
|
3
|
-
|
|
2
|
+
import { interopDefault } from "../utils.mjs";
|
|
4
3
|
//#region src/configs/yaml.ts
|
|
5
4
|
async function yaml({ overrides } = {}) {
|
|
6
5
|
const [parserYaml, pluginYaml] = await Promise.all([interopDefault(import("yaml-eslint-parser")), interopDefault(import("eslint-plugin-yml"))]);
|
|
@@ -12,14 +11,29 @@ async function yaml({ overrides } = {}) {
|
|
|
12
11
|
languageOptions: { parser: parserYaml },
|
|
13
12
|
files: [GLOB_YAML],
|
|
14
13
|
rules: {
|
|
15
|
-
...renameRules(pluginYaml.configs.prettier.rules, { yml: "yaml" }),
|
|
16
|
-
...renameRules(pluginYaml.configs.recommended.rules, { yml: "yaml" }),
|
|
17
14
|
"style/spaced-comment": "off",
|
|
15
|
+
"yaml/block-mapping-colon-indicator-newline": "off",
|
|
16
|
+
"yaml/block-mapping-question-indicator-newline": "off",
|
|
17
|
+
"yaml/block-sequence-hyphen-indicator-newline": "off",
|
|
18
|
+
"yaml/flow-mapping-curly-newline": "off",
|
|
19
|
+
"yaml/flow-mapping-curly-spacing": "off",
|
|
20
|
+
"yaml/flow-sequence-bracket-newline": "off",
|
|
21
|
+
"yaml/flow-sequence-bracket-spacing": "off",
|
|
22
|
+
"yaml/indent": "off",
|
|
23
|
+
"yaml/key-spacing": "off",
|
|
18
24
|
"yaml/no-empty-document": "off",
|
|
25
|
+
"yaml/no-empty-key": "error",
|
|
26
|
+
"yaml/no-empty-mapping-value": "error",
|
|
27
|
+
"yaml/no-empty-sequence-entry": "error",
|
|
28
|
+
"yaml/no-irregular-whitespace": "error",
|
|
29
|
+
"yaml/no-multiple-empty-lines": "off",
|
|
30
|
+
"yaml/no-tab-indent": "error",
|
|
31
|
+
"yaml/no-trailing-zeros": "off",
|
|
32
|
+
"yaml/quotes": "off",
|
|
33
|
+
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
19
34
|
...overrides
|
|
20
35
|
}
|
|
21
36
|
}];
|
|
22
37
|
}
|
|
23
|
-
|
|
24
38
|
//#endregion
|
|
25
|
-
export { yaml };
|
|
39
|
+
export { yaml };
|
package/dist/factory.mjs
CHANGED
|
@@ -28,7 +28,6 @@ import { findUpSync } from "find-up-simple";
|
|
|
28
28
|
import fs from "node:fs";
|
|
29
29
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
30
30
|
import { isPackageExists } from "local-pkg";
|
|
31
|
-
|
|
32
31
|
//#region src/factory.ts
|
|
33
32
|
const flatConfigProps = [
|
|
34
33
|
"files",
|
|
@@ -109,6 +108,5 @@ function getOverrides(options, key) {
|
|
|
109
108
|
..."overrides" in sub ? sub.overrides : {}
|
|
110
109
|
};
|
|
111
110
|
}
|
|
112
|
-
|
|
113
111
|
//#endregion
|
|
114
|
-
export { defaultPluginRenaming, getOverrides, so1ve };
|
|
112
|
+
export { defaultPluginRenaming, getOverrides, so1ve };
|
package/dist/globs.mjs
CHANGED
|
@@ -75,6 +75,5 @@ const GLOB_EXCLUDE = [
|
|
|
75
75
|
"**/*.vue.ts",
|
|
76
76
|
"**/*.vue.tsx"
|
|
77
77
|
];
|
|
78
|
-
|
|
79
78
|
//#endregion
|
|
80
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_VUE, GLOB_YAML };
|
|
79
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_VUE, GLOB_YAML };
|
package/dist/index.d.mts
CHANGED
|
@@ -23,8 +23,7 @@ import { typescript } from "./configs/typescript.mjs";
|
|
|
23
23
|
import { unicorn } from "./configs/unicorn.mjs";
|
|
24
24
|
import { vue } from "./configs/vue.mjs";
|
|
25
25
|
import { yaml } from "./configs/yaml.mjs";
|
|
26
|
-
import "./configs/index.mjs";
|
|
27
26
|
import { ResolvedOptions, defaultPluginRenaming, getOverrides, so1ve } from "./factory.mjs";
|
|
28
27
|
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_VUE, GLOB_YAML } from "./globs.mjs";
|
|
29
28
|
import { interopDefault, renameRules } from "./utils.mjs";
|
|
30
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_VUE, GLOB_YAML, MaybeArray, MaybePromise, Options, OptionsComponentExts, OptionsHasTypeScript, OptionsOverrides, OptionsPnpm, OptionsTypeScriptParserOptions, ResolvedOptions, Rules, TypedFlatConfigItem, astro, command, comments, deMorgan, defaultPluginRenaming, formatting, getOverrides, html, ignores, imports, interopDefault, javascript, jsonc, mdx, node, onlyError, perfectionist, pnpm, promise, renameRules, so1ve, solid, sortImports, test, toml, typescript, unicorn, vue, yaml };
|
|
29
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DTS, GLOB_ESLINTRC, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_PACKAGEJSON, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_VUE, GLOB_YAML, type MaybeArray, type MaybePromise, type Options, type OptionsComponentExts, type OptionsHasTypeScript, type OptionsOverrides, type OptionsPnpm, type OptionsTypeScriptParserOptions, ResolvedOptions, type Rules, type TypedFlatConfigItem, astro, command, comments, deMorgan, defaultPluginRenaming, formatting, getOverrides, html, ignores, imports, interopDefault, javascript, jsonc, mdx, node, onlyError, perfectionist, pnpm, promise, renameRules, so1ve, solid, sortImports, test, toml, typescript, unicorn, vue, yaml };
|