@so1ve/eslint-config 4.1.8 → 4.2.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.
Files changed (62) hide show
  1. package/dist/configs/astro.d.mts +8 -0
  2. package/dist/configs/astro.mjs +44 -0
  3. package/dist/configs/command.d.mts +6 -0
  4. package/dist/configs/command.mjs +10 -0
  5. package/dist/configs/comments.d.mts +6 -0
  6. package/dist/configs/comments.mjs +19 -0
  7. package/dist/configs/de-morgan.d.mts +6 -0
  8. package/dist/configs/de-morgan.mjs +10 -0
  9. package/dist/configs/formatting.d.mts +6 -0
  10. package/dist/configs/formatting.mjs +294 -0
  11. package/dist/configs/html.d.mts +6 -0
  12. package/dist/configs/html.mjs +37 -0
  13. package/dist/configs/ignores.d.mts +6 -0
  14. package/dist/configs/ignores.mjs +14 -0
  15. package/dist/configs/imports.d.mts +6 -0
  16. package/dist/configs/imports.mjs +75 -0
  17. package/dist/configs/index.d.mts +24 -0
  18. package/dist/configs/index.mjs +26 -0
  19. package/dist/configs/javascript.d.mts +8 -0
  20. package/dist/configs/javascript.mjs +326 -0
  21. package/dist/configs/jsonc.d.mts +6 -0
  22. package/dist/configs/jsonc.mjs +30 -0
  23. package/dist/configs/mdx.d.mts +9 -0
  24. package/dist/configs/mdx.mjs +43 -0
  25. package/dist/configs/node.d.mts +6 -0
  26. package/dist/configs/node.mjs +21 -0
  27. package/dist/configs/only-error.d.mts +6 -0
  28. package/dist/configs/only-error.mjs +10 -0
  29. package/dist/configs/perfectionist.d.mts +6 -0
  30. package/dist/configs/perfectionist.mjs +34 -0
  31. package/dist/configs/pnpm.d.mts +6 -0
  32. package/dist/configs/pnpm.mjs +106 -0
  33. package/dist/configs/promise.d.mts +6 -0
  34. package/dist/configs/promise.mjs +13 -0
  35. package/dist/configs/solid.d.mts +9 -0
  36. package/dist/configs/solid.mjs +24 -0
  37. package/dist/configs/sort-imports.d.mts +6 -0
  38. package/dist/configs/sort-imports.mjs +11 -0
  39. package/dist/configs/test.d.mts +8 -0
  40. package/dist/configs/test.mjs +46 -0
  41. package/dist/configs/toml.d.mts +8 -0
  42. package/dist/configs/toml.mjs +24 -0
  43. package/dist/configs/typescript.d.mts +10 -0
  44. package/dist/configs/typescript.mjs +232 -0
  45. package/dist/configs/unicorn.d.mts +6 -0
  46. package/dist/configs/unicorn.mjs +61 -0
  47. package/dist/configs/vue.d.mts +9 -0
  48. package/dist/configs/vue.mjs +194 -0
  49. package/dist/configs/yaml.d.mts +8 -0
  50. package/dist/configs/yaml.mjs +25 -0
  51. package/dist/factory.d.mts +21 -0
  52. package/dist/factory.mjs +114 -0
  53. package/dist/globs.d.mts +31 -0
  54. package/dist/globs.mjs +80 -0
  55. package/dist/index.d.mts +30 -16646
  56. package/dist/index.mjs +28 -2298
  57. package/dist/plugins.mjs +15 -0
  58. package/dist/typegen.d.mts +16308 -0
  59. package/dist/types.d.mts +175 -0
  60. package/dist/utils.d.mts +30 -0
  61. package/dist/utils.mjs +32 -0
  62. package/package.json +4 -6
@@ -0,0 +1,326 @@
1
+ import { GLOB_SRC, GLOB_SRC_EXT } from "../globs.mjs";
2
+ import { pluginArrayFunc, pluginNoAwaitInPromise, pluginRegexp, pluginSo1ve, pluginUnusedImports } from "../plugins.mjs";
3
+ import globals from "globals";
4
+
5
+ //#region src/configs/javascript.ts
6
+ async function javascript({ overrides } = {}) {
7
+ const regexpRecommended = pluginRegexp.configs["flat/recommended"];
8
+ return [
9
+ {
10
+ name: "so1ve/javascript/setup",
11
+ plugins: {
12
+ "array-func": pluginArrayFunc,
13
+ "no-await-in-promise": pluginNoAwaitInPromise,
14
+ "so1ve": pluginSo1ve,
15
+ "unused-imports": pluginUnusedImports
16
+ }
17
+ },
18
+ {
19
+ name: "so1ve/javascript/rules",
20
+ languageOptions: {
21
+ ecmaVersion: "latest",
22
+ globals: {
23
+ ...globals.browser,
24
+ ...globals.es2021,
25
+ ...globals.node,
26
+ document: "readonly",
27
+ navigator: "readonly",
28
+ window: "readonly"
29
+ },
30
+ parserOptions: {
31
+ ecmaFeatures: { jsx: true },
32
+ ecmaVersion: "latest",
33
+ sourceType: "module"
34
+ },
35
+ sourceType: "module"
36
+ },
37
+ linterOptions: { reportUnusedDisableDirectives: true },
38
+ rules: {
39
+ "accessor-pairs": ["error", {
40
+ setWithoutGet: true,
41
+ enforceForClassMembers: true
42
+ }],
43
+ "array-bracket-newline": "off",
44
+ "array-callback-return": "error",
45
+ "array-element-newline": "off",
46
+ "array-func/avoid-reverse": "error",
47
+ "array-func/from-map": "off",
48
+ "array-func/no-unnecessary-this-arg": "off",
49
+ "array-func/prefer-array-from": "off",
50
+ "array-func/prefer-flat-map": "error",
51
+ "array-func/prefer-flat": "off",
52
+ "arrow-body-style": "off",
53
+ "arrow-parens": "off",
54
+ "block-scoped-var": "error",
55
+ "complexity": ["off", 11],
56
+ "consistent-return": "off",
57
+ "constructor-super": "error",
58
+ "default-case-last": "error",
59
+ "dot-notation": ["error", { allowKeywords: true }],
60
+ "eqeqeq": ["error", "smart"],
61
+ "function-call-argument-newline": "off",
62
+ "function-paren-newline": "off",
63
+ "generator-star": "off",
64
+ "implicit-arrow-linebreak": "off",
65
+ "indent-legacy": "off",
66
+ "indent": "off",
67
+ "jsx-quotes": "off",
68
+ "linebreak-style": "off",
69
+ "new-cap": ["error", {
70
+ newIsCap: true,
71
+ capIsNew: false,
72
+ properties: true
73
+ }],
74
+ "newline-per-chained-call": "off",
75
+ "no-alert": "error",
76
+ "no-array-constructor": "error",
77
+ "no-arrow-condition": "off",
78
+ "no-async-promise-executor": "error",
79
+ "no-await-in-promise/no-await-in-promise": "error",
80
+ "no-caller": "error",
81
+ "no-case-declarations": "error",
82
+ "no-class-assign": "error",
83
+ "no-comma-dangle": "off",
84
+ "no-compare-neg-zero": "error",
85
+ "no-cond-assign": ["error", "always"],
86
+ "no-confusing-arrow": "off",
87
+ "no-console": ["error", { allow: [
88
+ "error",
89
+ "warn",
90
+ "table",
91
+ "time"
92
+ ] }],
93
+ "no-const-assign": "error",
94
+ "no-constant-condition": "error",
95
+ "no-control-regex": "error",
96
+ "no-debugger": "error",
97
+ "no-delete-var": "error",
98
+ "no-dupe-args": "error",
99
+ "no-dupe-class-members": "error",
100
+ "no-dupe-keys": "error",
101
+ "no-duplicate-case": "error",
102
+ "no-empty-character-class": "error",
103
+ "no-empty-pattern": "error",
104
+ "no-empty": ["error", { allowEmptyCatch: true }],
105
+ "no-eval": "error",
106
+ "no-ex-assign": "error",
107
+ "no-extend-native": "error",
108
+ "no-extra-bind": "error",
109
+ "no-extra-boolean-cast": "error",
110
+ "no-extra-semi": "off",
111
+ "no-fallthrough": "error",
112
+ "no-func-assign": "error",
113
+ "no-global-assign": "error",
114
+ "no-implied-eval": "error",
115
+ "no-import-assign": "error",
116
+ "no-invalid-regexp": "error",
117
+ "no-invalid-this": "error",
118
+ "no-irregular-whitespace": "error",
119
+ "no-iterator": "error",
120
+ "no-labels": ["error", {
121
+ allowLoop: true,
122
+ allowSwitch: false
123
+ }],
124
+ "no-lone-blocks": "error",
125
+ "no-loss-of-precision": "error",
126
+ "no-misleading-character-class": "error",
127
+ "no-multi-str": "error",
128
+ "no-new-func": "error",
129
+ "no-new-native-nonconstructor": "error",
130
+ "no-new-wrappers": "error",
131
+ "no-obj-calls": "error",
132
+ "no-object-constructor": "error",
133
+ "no-octal-escape": "error",
134
+ "no-octal": "error",
135
+ "no-param-reassign": "off",
136
+ "no-proto": "error",
137
+ "no-prototype-builtins": "error",
138
+ "no-redeclare": ["error", { builtinGlobals: false }],
139
+ "no-regex-spaces": "error",
140
+ "no-reserved-keys": "off",
141
+ "no-restricted-globals": [
142
+ "error",
143
+ {
144
+ name: "global",
145
+ message: "Use `globalThis` instead."
146
+ },
147
+ {
148
+ name: "self",
149
+ message: "Use `globalThis` instead."
150
+ },
151
+ {
152
+ name: "isNaN",
153
+ message: "Use `Number.isNaN` instead"
154
+ },
155
+ {
156
+ name: "isFinite",
157
+ message: "Use `Number.isFinite` instead"
158
+ },
159
+ {
160
+ name: "parseFloat",
161
+ message: "Use `Number.parseFloat` instead"
162
+ },
163
+ {
164
+ name: "parseInt",
165
+ message: "Use `Number.parseInt` instead"
166
+ }
167
+ ],
168
+ "no-restricted-properties": [
169
+ "error",
170
+ {
171
+ object: "globalThis",
172
+ property: "isNaN",
173
+ message: "Use `Number.isNaN` instead"
174
+ },
175
+ {
176
+ object: "globalThis",
177
+ property: "isFinite",
178
+ message: "Use `Number.isFinite` instead"
179
+ },
180
+ {
181
+ object: "globalThis",
182
+ property: "parseFloat",
183
+ message: "Use `Number.parseFloat` instead"
184
+ },
185
+ {
186
+ object: "globalThis",
187
+ property: "parseInt",
188
+ message: "Use `Number.parseInt` instead"
189
+ },
190
+ {
191
+ object: "window",
192
+ property: "isNaN",
193
+ message: "Use `Number.isNaN` instead"
194
+ },
195
+ {
196
+ object: "window",
197
+ property: "isFinite",
198
+ message: "Use `Number.isFinite` instead"
199
+ },
200
+ {
201
+ object: "window",
202
+ property: "parseFloat",
203
+ message: "Use `Number.parseFloat` instead"
204
+ },
205
+ {
206
+ object: "window",
207
+ property: "parseInt",
208
+ message: "Use `Number.parseInt` instead"
209
+ }
210
+ ],
211
+ "no-restricted-syntax": [
212
+ "error",
213
+ "DebuggerStatement",
214
+ "LabeledStatement",
215
+ "WithStatement"
216
+ ],
217
+ "no-return-await": "off",
218
+ "no-self-assign": ["error", { props: true }],
219
+ "no-self-compare": "error",
220
+ "no-sequences": "error",
221
+ "no-shadow-restricted-names": "error",
222
+ "no-space-before-semi": "off",
223
+ "no-spaced-func": "off",
224
+ "no-template-curly-in-string": "error",
225
+ "no-this-before-super": "error",
226
+ "no-throw-literal": "error",
227
+ "no-undef-init": "error",
228
+ "no-undef": "error",
229
+ "no-unexpected-multiline": "error",
230
+ "no-unmodified-loop-condition": "error",
231
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
232
+ "no-unreachable-loop": "error",
233
+ "no-unreachable": "error",
234
+ "no-unsafe-finally": "error",
235
+ "no-unsafe-negation": "error",
236
+ "no-unused-expressions": ["error", {
237
+ allowShortCircuit: true,
238
+ allowTernary: true,
239
+ allowTaggedTemplates: true
240
+ }],
241
+ "no-unused-vars": ["error", {
242
+ args: "none",
243
+ caughtErrors: "none",
244
+ ignoreRestSiblings: true,
245
+ vars: "all"
246
+ }],
247
+ "no-use-before-define": ["error", {
248
+ functions: false,
249
+ classes: false,
250
+ variables: true
251
+ }],
252
+ "no-useless-backreference": "error",
253
+ "no-useless-call": "error",
254
+ "no-useless-catch": "error",
255
+ "no-useless-computed-key": "error",
256
+ "no-useless-constructor": "error",
257
+ "no-useless-rename": "error",
258
+ "no-useless-return": "error",
259
+ "no-var": "error",
260
+ "no-void": "error",
261
+ "no-with": "error",
262
+ "no-wrap-func": "off",
263
+ "nonblock-statement-body-position": "off",
264
+ "object-shorthand": [
265
+ "error",
266
+ "always",
267
+ { ignoreConstructors: false }
268
+ ],
269
+ "one-var-declaration-per-line": "off",
270
+ "one-var": ["error", "never"],
271
+ "prefer-arrow-callback": ["error", {
272
+ allowNamedFunctions: false,
273
+ allowUnboundThis: true
274
+ }],
275
+ "prefer-const": ["error", {
276
+ destructuring: "all",
277
+ ignoreReadBeforeAssign: true
278
+ }],
279
+ "prefer-exponentiation-operator": "error",
280
+ "prefer-promise-reject-errors": "error",
281
+ "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
282
+ "prefer-rest-params": "error",
283
+ "prefer-spread": "error",
284
+ "prefer-template": "error",
285
+ "require-await": "off",
286
+ "so1ve/import-dedupe": "error",
287
+ "so1ve/require-async-with-await": "error",
288
+ "switch-colon-spacing": "off",
289
+ "symbol-description": "off",
290
+ "unused-imports/no-unused-imports": "error",
291
+ "unused-imports/no-unused-vars": ["error", {
292
+ vars: "all",
293
+ varsIgnorePattern: "^_",
294
+ args: "after-used",
295
+ argsIgnorePattern: "^_",
296
+ ignoreRestSiblings: true
297
+ }],
298
+ "use-isnan": ["error", {
299
+ enforceForSwitchCase: true,
300
+ enforceForIndexOf: true
301
+ }],
302
+ "valid-typeof": ["error", { requireStringLiterals: true }],
303
+ "vars-on-top": "error",
304
+ "wrap-regex": "off",
305
+ "yoda": ["error", "never"],
306
+ ...overrides
307
+ }
308
+ },
309
+ {
310
+ ...regexpRecommended,
311
+ name: "so1ve/javascript/regexp",
312
+ rules: {
313
+ ...regexpRecommended.rules,
314
+ "regexp/no-unused-capturing-group": "off"
315
+ }
316
+ },
317
+ {
318
+ name: "so1ve/javascript/cli",
319
+ files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
320
+ rules: { "no-console": "off" }
321
+ }
322
+ ];
323
+ }
324
+
325
+ //#endregion
326
+ export { javascript };
@@ -0,0 +1,6 @@
1
+ import { TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/jsonc.d.ts
4
+ declare function jsonc(): Promise<TypedFlatConfigItem[]>;
5
+ //#endregion
6
+ export { jsonc };
@@ -0,0 +1,30 @@
1
+ import { GLOB_ESLINTRC, GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from "../globs.mjs";
2
+ import { interopDefault } from "../utils.mjs";
3
+
4
+ //#region src/configs/jsonc.ts
5
+ async function jsonc() {
6
+ const [parserJsonc, pluginJsonc] = await Promise.all([interopDefault(import("jsonc-eslint-parser")), interopDefault(import("eslint-plugin-jsonc"))]);
7
+ return [{
8
+ name: "so1ve/jsonc/setup",
9
+ plugins: { jsonc: pluginJsonc }
10
+ }, {
11
+ name: "so1ve/jsonc/rules",
12
+ files: [
13
+ GLOB_JSON,
14
+ GLOB_JSON5,
15
+ GLOB_JSONC,
16
+ GLOB_ESLINTRC
17
+ ],
18
+ languageOptions: { parser: parserJsonc },
19
+ rules: {
20
+ ...pluginJsonc.configs.base.overrides[0].rules,
21
+ ...pluginJsonc.configs["recommended-with-jsonc"].rules,
22
+ "jsonc/no-octal-escape": "error",
23
+ "jsonc/quotes-props": "off",
24
+ "jsonc/quotes": "off"
25
+ }
26
+ }];
27
+ }
28
+
29
+ //#endregion
30
+ export { jsonc };
@@ -0,0 +1,9 @@
1
+ import { OptionsComponentExts, OptionsOverrides, TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/mdx.d.ts
4
+ declare function mdx({
5
+ componentExts,
6
+ overrides
7
+ }?: OptionsComponentExts & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
8
+ //#endregion
9
+ export { mdx };
@@ -0,0 +1,43 @@
1
+ import { GLOB_MARKDOWN } from "../globs.mjs";
2
+ import { interopDefault } from "../utils.mjs";
3
+
4
+ //#region src/configs/mdx.ts
5
+ async function mdx({ componentExts = [], overrides } = {}) {
6
+ const pluginMdx = await interopDefault(import("eslint-plugin-mdx"));
7
+ return [{
8
+ ...pluginMdx.flat,
9
+ name: "so1ve/mdx/setup",
10
+ processor: pluginMdx.createRemarkProcessor({
11
+ lintCodeBlocks: true,
12
+ languageMapper: {}
13
+ })
14
+ }, {
15
+ ...pluginMdx.flatCodeBlocks,
16
+ name: "so1ve/mdx/rules",
17
+ files: [...pluginMdx.flatCodeBlocks.files, ...componentExts.map((ext) => `${GLOB_MARKDOWN}/*.${ext}`)],
18
+ rules: {
19
+ ...pluginMdx.flatCodeBlocks.rules,
20
+ "html/require-doctype": "off",
21
+ "import/no-unresolved": "off",
22
+ "no-alert": "off",
23
+ "no-console": "off",
24
+ "no-restricted-imports": "off",
25
+ "no-undef": "off",
26
+ "no-unused-expressions": "off",
27
+ "ts/consistent-type-imports": "off",
28
+ "ts/no-namespace": "off",
29
+ "ts/no-redeclare": "off",
30
+ "ts/no-require-imports": "off",
31
+ "ts/no-unused-expressions": "off",
32
+ "ts/no-unused-vars": "off",
33
+ "ts/no-use-before-define": "off",
34
+ "ts/no-var-requires": "off",
35
+ "unused-imports/no-unused-imports": "off",
36
+ "unused-imports/no-unused-vars": "off",
37
+ ...overrides
38
+ }
39
+ }];
40
+ }
41
+
42
+ //#endregion
43
+ export { mdx };
@@ -0,0 +1,6 @@
1
+ import { TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/node.d.ts
4
+ declare const node: () => TypedFlatConfigItem[];
5
+ //#endregion
6
+ export { node };
@@ -0,0 +1,21 @@
1
+ import { pluginNode } from "../plugins.mjs";
2
+
3
+ //#region src/configs/node.ts
4
+ const node = () => [{
5
+ name: "so1ve/node/setup",
6
+ plugins: { node: pluginNode }
7
+ }, {
8
+ name: "so1ve/node/rules",
9
+ rules: {
10
+ "node/handle-callback-err": ["error", "^(err|error)$"],
11
+ "node/no-callback-literal": "off",
12
+ "node/no-deprecated-api": "error",
13
+ "node/no-exports-assign": "error",
14
+ "node/no-new-require": "error",
15
+ "node/no-path-concat": "error",
16
+ "node/process-exit-as-throw": "error"
17
+ }
18
+ }];
19
+
20
+ //#endregion
21
+ export { node };
@@ -0,0 +1,6 @@
1
+ import { TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/only-error.d.ts
4
+ declare const onlyError: () => TypedFlatConfigItem[];
5
+ //#endregion
6
+ export { onlyError };
@@ -0,0 +1,10 @@
1
+ import { pluginOnlyError } from "../plugins.mjs";
2
+
3
+ //#region src/configs/only-error.ts
4
+ const onlyError = () => [{
5
+ name: "so1ve/only-error",
6
+ plugins: { "only-error": pluginOnlyError }
7
+ }];
8
+
9
+ //#endregion
10
+ export { onlyError };
@@ -0,0 +1,6 @@
1
+ import { TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/perfectionist.d.ts
4
+ declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
5
+ //#endregion
6
+ export { perfectionist };
@@ -0,0 +1,34 @@
1
+ import { interopDefault } from "../utils.mjs";
2
+
3
+ //#region src/configs/perfectionist.ts
4
+ async function perfectionist() {
5
+ return [{
6
+ name: "so1ve/perfectionist/setup",
7
+ plugins: { perfectionist: await interopDefault(import("eslint-plugin-perfectionist")) }
8
+ }, {
9
+ name: "so1ve/perfectionist/rules",
10
+ rules: {
11
+ "perfectionist/sort-array-includes": ["error", {
12
+ ignoreCase: false,
13
+ partitionByComment: true,
14
+ partitionByNewLine: true,
15
+ type: "natural"
16
+ }],
17
+ "perfectionist/sort-decorators": ["error", { type: "natural" }],
18
+ "perfectionist/sort-heritage-clauses": ["error", { type: "natural" }],
19
+ "perfectionist/sort-maps": ["error", {
20
+ partitionByComment: true,
21
+ partitionByNewLine: true,
22
+ type: "natural"
23
+ }],
24
+ "perfectionist/sort-sets": ["error", {
25
+ partitionByComment: true,
26
+ partitionByNewLine: true,
27
+ type: "natural"
28
+ }]
29
+ }
30
+ }];
31
+ }
32
+
33
+ //#endregion
34
+ export { perfectionist };
@@ -0,0 +1,6 @@
1
+ import { OptionsPnpm, TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/pnpm.d.ts
4
+ declare function pnpm(options: OptionsPnpm): Promise<TypedFlatConfigItem[]>;
5
+ //#endregion
6
+ export { pnpm };
@@ -0,0 +1,106 @@
1
+ import { interopDefault } from "../utils.mjs";
2
+ import "find-up-simple";
3
+
4
+ //#region src/configs/pnpm.ts
5
+ async function pnpm(options) {
6
+ const { json = true, yaml = true } = options;
7
+ const [pluginPnpm, yamlParser, jsoncParser] = await Promise.all([
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
+ ]);
12
+ const configs = [];
13
+ if (json) configs.push({
14
+ files: ["package.json", "**/package.json"],
15
+ languageOptions: { parser: jsoncParser },
16
+ name: "so1ve/pnpm/package-json",
17
+ plugins: { pnpm: pluginPnpm },
18
+ rules: { "pnpm/json-prefer-workspace-settings": "error" }
19
+ });
20
+ if (yaml) configs.push({
21
+ files: ["pnpm-workspace.yaml"],
22
+ languageOptions: { parser: yamlParser },
23
+ name: "so1ve/pnpm/pnpm-workspace-yaml",
24
+ plugins: { pnpm: pluginPnpm },
25
+ rules: { "pnpm/yaml-enforce-settings": ["error", { settings: { shellEmulator: true } }] }
26
+ }, {
27
+ files: ["pnpm-workspace.yaml"],
28
+ name: "so1ve/yaml/pnpm-workspace-yaml-sort",
29
+ rules: { "yaml/sort-keys": [
30
+ "error",
31
+ {
32
+ order: [
33
+ ...[
34
+ "cacheDir",
35
+ "catalogMode",
36
+ "cleanupUnusedCatalogs",
37
+ "dedupeDirectDeps",
38
+ "deployAllFiles",
39
+ "enablePrePostScripts",
40
+ "engineStrict",
41
+ "extendNodePath",
42
+ "hoist",
43
+ "hoistPattern",
44
+ "hoistWorkspacePackages",
45
+ "ignoreCompatibilityDb",
46
+ "ignoreDepScripts",
47
+ "ignoreScripts",
48
+ "ignoreWorkspaceRootCheck",
49
+ "managePackageManagerVersions",
50
+ "minimumReleaseAge",
51
+ "minimumReleaseAgeExclude",
52
+ "modulesDir",
53
+ "nodeLinker",
54
+ "nodeVersion",
55
+ "optimisticRepeatInstall",
56
+ "packageManagerStrict",
57
+ "packageManagerStrictVersion",
58
+ "preferSymlinkedExecutables",
59
+ "preferWorkspacePackages",
60
+ "publicHoistPattern",
61
+ "registrySupportsTimeField",
62
+ "requiredScripts",
63
+ "resolutionMode",
64
+ "savePrefix",
65
+ "scriptShell",
66
+ "shamefullyHoist",
67
+ "shellEmulator",
68
+ "stateDir",
69
+ "supportedArchitectures",
70
+ "symlink",
71
+ "tag",
72
+ "trustPolicy",
73
+ "trustPolicyExclude",
74
+ "updateNotifier"
75
+ ],
76
+ "packages",
77
+ "overrides",
78
+ "patchedDependencies",
79
+ ...[
80
+ "allowedDeprecatedVersions",
81
+ "allowNonAppliedPatches",
82
+ "configDependencies",
83
+ "ignoredBuiltDependencies",
84
+ "ignoredOptionalDependencies",
85
+ "neverBuiltDependencies",
86
+ "onlyBuiltDependencies",
87
+ "onlyBuiltDependenciesFile",
88
+ "packageExtensions",
89
+ "peerDependencyRules"
90
+ ],
91
+ "catalog",
92
+ "catalogs"
93
+ ],
94
+ pathPattern: "^$"
95
+ },
96
+ {
97
+ order: { type: "asc" },
98
+ pathPattern: ".*"
99
+ }
100
+ ] }
101
+ });
102
+ return configs;
103
+ }
104
+
105
+ //#endregion
106
+ export { pnpm };
@@ -0,0 +1,6 @@
1
+ import { TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/promise.d.ts
4
+ declare const promise: () => TypedFlatConfigItem[];
5
+ //#endregion
6
+ export { promise };
@@ -0,0 +1,13 @@
1
+ import { pluginPromise } from "../plugins.mjs";
2
+
3
+ //#region src/configs/promise.ts
4
+ const promise = () => [{
5
+ name: "so1ve/promise/setup",
6
+ plugins: { promise: pluginPromise }
7
+ }, {
8
+ name: "so1ve/promise/rules",
9
+ rules: { "promise/param-names": "error" }
10
+ }];
11
+
12
+ //#endregion
13
+ export { promise };
@@ -0,0 +1,9 @@
1
+ import { OptionsHasTypeScript, OptionsOverrides, TypedFlatConfigItem } from "../types.mjs";
2
+
3
+ //#region src/configs/solid.d.ts
4
+ declare function solid({
5
+ overrides,
6
+ typescript
7
+ }?: OptionsHasTypeScript & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
8
+ //#endregion
9
+ export { solid };
@@ -0,0 +1,24 @@
1
+ import { interopDefault } from "../utils.mjs";
2
+
3
+ //#region src/configs/solid.ts
4
+ async function solid({ overrides, typescript } = {}) {
5
+ const pluginSolid = await interopDefault(import("eslint-plugin-solid"));
6
+ return [{
7
+ name: "so1ve/solid/setup",
8
+ plugins: { solid: pluginSolid }
9
+ }, {
10
+ name: "so1ve/solid/rules",
11
+ languageOptions: {
12
+ sourceType: "module",
13
+ parserOptions: { ecmaFeatures: { jsx: true } }
14
+ },
15
+ rules: {
16
+ ...pluginSolid.configs.recommended.rules,
17
+ ...typescript ? pluginSolid.configs.typescript.rules : {},
18
+ ...overrides
19
+ }
20
+ }];
21
+ }
22
+
23
+ //#endregion
24
+ export { solid };