@lichthagel/eslint-config 1.0.30 → 1.0.32
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/index.cjs +497 -559
- package/dist/index.d.cts +7077 -7780
- package/dist/index.d.mts +11149 -0
- package/dist/index.mjs +468 -0
- package/package.json +15 -15
- package/dist/index.d.ts +0 -11852
- package/dist/index.js +0 -526
package/dist/index.js
DELETED
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
// src/configs/browser.ts
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
var browser_default = [
|
|
4
|
-
{
|
|
5
|
-
name: "lichthagel/browser",
|
|
6
|
-
languageOptions: {
|
|
7
|
-
globals: {
|
|
8
|
-
...globals.browser,
|
|
9
|
-
document: "readonly",
|
|
10
|
-
navigator: "readonly",
|
|
11
|
-
window: "readonly"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
// src/configs/javascript.ts
|
|
18
|
-
import js from "@eslint/js";
|
|
19
|
-
import globals2 from "globals";
|
|
20
|
-
var javascript_default = [
|
|
21
|
-
{ name: "js/recommended", ...js.configs.recommended },
|
|
22
|
-
{
|
|
23
|
-
name: "lichthagel/javascript",
|
|
24
|
-
languageOptions: {
|
|
25
|
-
ecmaVersion: 2022,
|
|
26
|
-
globals: {
|
|
27
|
-
...globals2.es2022
|
|
28
|
-
},
|
|
29
|
-
parserOptions: {
|
|
30
|
-
ecmaVersion: 2022,
|
|
31
|
-
sourceType: "module"
|
|
32
|
-
},
|
|
33
|
-
sourceType: "module"
|
|
34
|
-
},
|
|
35
|
-
rules: {
|
|
36
|
-
"accessor-pairs": "error",
|
|
37
|
-
"array-callback-return": "error",
|
|
38
|
-
"arrow-body-style": "error",
|
|
39
|
-
"block-scoped-var": "error",
|
|
40
|
-
"curly": ["error", "all"],
|
|
41
|
-
"default-case-last": "error",
|
|
42
|
-
"dot-notation": "error",
|
|
43
|
-
"eqeqeq": ["error", "smart"],
|
|
44
|
-
"new-cap": [
|
|
45
|
-
"error",
|
|
46
|
-
{
|
|
47
|
-
capIsNew: false,
|
|
48
|
-
newIsCap: true,
|
|
49
|
-
properties: true
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"no-alert": "error",
|
|
53
|
-
"no-array-constructor": "error",
|
|
54
|
-
"no-await-in-loop": "error",
|
|
55
|
-
"no-bitwise": "error",
|
|
56
|
-
"no-caller": "error",
|
|
57
|
-
"no-cond-assign": ["error", "always"],
|
|
58
|
-
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
59
|
-
"no-duplicate-imports": "error",
|
|
60
|
-
"no-eval": "error",
|
|
61
|
-
"no-extend-native": "error",
|
|
62
|
-
"no-extra-bind": "error",
|
|
63
|
-
"no-implied-eval": "error",
|
|
64
|
-
"no-iterator": "error",
|
|
65
|
-
"no-label-var": "error",
|
|
66
|
-
"no-labels": "error",
|
|
67
|
-
"no-lone-blocks": "error",
|
|
68
|
-
"no-multi-assign": "error",
|
|
69
|
-
"no-multi-str": "error",
|
|
70
|
-
"no-new": "error",
|
|
71
|
-
"no-new-func": "error",
|
|
72
|
-
"no-new-wrappers": "error",
|
|
73
|
-
"no-octal-escape": "error",
|
|
74
|
-
"no-promise-executor-return": ["error", { allowVoid: true }],
|
|
75
|
-
"no-proto": "error",
|
|
76
|
-
"no-restricted-globals": ["error", { name: "global", message: "Use `globalThis` instead." }, { name: "self", message: "Use `globalThis` instead." }],
|
|
77
|
-
"no-restricted-properties": [
|
|
78
|
-
"error",
|
|
79
|
-
{ message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.", property: "__proto__" },
|
|
80
|
-
{ message: "Use `Object.defineProperty` instead.", property: "__defineGetter__" },
|
|
81
|
-
{ message: "Use `Object.defineProperty` instead.", property: "__defineSetter__" },
|
|
82
|
-
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
|
|
83
|
-
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
|
|
84
|
-
],
|
|
85
|
-
"no-restricted-syntax": [
|
|
86
|
-
"error",
|
|
87
|
-
"DebuggerStatement",
|
|
88
|
-
"LabeledStatement",
|
|
89
|
-
"WithStatement",
|
|
90
|
-
"TSEnumDeclaration[const=true]",
|
|
91
|
-
"TSExportAssignment"
|
|
92
|
-
],
|
|
93
|
-
"no-self-compare": "error",
|
|
94
|
-
"no-sequences": "error",
|
|
95
|
-
"no-template-curly-in-string": "error",
|
|
96
|
-
"no-throw-literal": "error",
|
|
97
|
-
"no-undef-init": "error",
|
|
98
|
-
"no-unmodified-loop-condition": "error",
|
|
99
|
-
"no-unneeded-ternary": "error",
|
|
100
|
-
"no-unreachable-loop": "error",
|
|
101
|
-
"no-unused-expressions": ["error", { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true }],
|
|
102
|
-
"no-useless-call": "error",
|
|
103
|
-
"no-useless-computed-key": "error",
|
|
104
|
-
"no-useless-concat": "error",
|
|
105
|
-
"no-useless-constructor": "error",
|
|
106
|
-
"no-useless-rename": "error",
|
|
107
|
-
"no-useless-return": "error",
|
|
108
|
-
"no-var": "error",
|
|
109
|
-
"object-shorthand": ["error", "always", { ignoreConstructors: false }],
|
|
110
|
-
"prefer-arrow-callback": "error",
|
|
111
|
-
"prefer-const": "error",
|
|
112
|
-
"prefer-destructuring": ["error", { AssignmentExpression: { array: false, object: false } }],
|
|
113
|
-
"prefer-exponentiation-operator": "error",
|
|
114
|
-
"prefer-object-spread": "error",
|
|
115
|
-
"prefer-promise-reject-errors": "error",
|
|
116
|
-
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
117
|
-
"prefer-rest-params": "error",
|
|
118
|
-
"prefer-spread": "error",
|
|
119
|
-
"prefer-template": "error",
|
|
120
|
-
"require-await": "error",
|
|
121
|
-
"sort-imports": [
|
|
122
|
-
"error",
|
|
123
|
-
{
|
|
124
|
-
allowSeparatedGroups: true,
|
|
125
|
-
ignoreCase: false,
|
|
126
|
-
ignoreDeclarationSort: true
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
"symbol-description": "error",
|
|
130
|
-
"use-isnan": ["error", { enforceForIndexOf: true, enforceForSwitchCase: true }],
|
|
131
|
-
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
132
|
-
"yoda": "error"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
];
|
|
136
|
-
|
|
137
|
-
// src/configs/node.ts
|
|
138
|
-
import globals3 from "globals";
|
|
139
|
-
var node = async () => {
|
|
140
|
-
const pluginN = await import("eslint-plugin-n").then((mod) => mod.default);
|
|
141
|
-
return [
|
|
142
|
-
pluginN.configs["flat/recommended-module"],
|
|
143
|
-
{
|
|
144
|
-
name: "lichthagel/node",
|
|
145
|
-
languageOptions: {
|
|
146
|
-
globals: {
|
|
147
|
-
...globals3.node
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
rules: {
|
|
151
|
-
"n/handle-callback-err": ["error", "^.*(e|E)rr(or)?$"],
|
|
152
|
-
"n/no-new-require": "error",
|
|
153
|
-
"n/no-path-concat": "error",
|
|
154
|
-
"n/no-process-env": "error",
|
|
155
|
-
"n/no-missing-import": "off",
|
|
156
|
-
"n/no-missing-require": "off"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
];
|
|
160
|
-
};
|
|
161
|
-
var node_default = node;
|
|
162
|
-
|
|
163
|
-
// src/configs/perfectionist.ts
|
|
164
|
-
import perfectionst from "eslint-plugin-perfectionist";
|
|
165
|
-
var perfectionist_default = [
|
|
166
|
-
{
|
|
167
|
-
name: "perfectionist/recommended-natural",
|
|
168
|
-
...perfectionst.configs["recommended-natural"]
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
name: "lichthagel/perfectionist",
|
|
172
|
-
rules: {
|
|
173
|
-
"perfectionist/sort-imports": [
|
|
174
|
-
"error",
|
|
175
|
-
{
|
|
176
|
-
type: "natural",
|
|
177
|
-
internalPattern: [
|
|
178
|
-
"^@/.*",
|
|
179
|
-
"^~.*",
|
|
180
|
-
"^$.*",
|
|
181
|
-
"^#.*"
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"perfectionist/sort-object-types": "off",
|
|
186
|
-
"perfectionist/sort-objects": [
|
|
187
|
-
"off",
|
|
188
|
-
{
|
|
189
|
-
customGroups: [
|
|
190
|
-
{
|
|
191
|
-
groupName: "id",
|
|
192
|
-
elementNamePattern: "^(?:id|uuid|key|index|slug)$"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
groupName: "name",
|
|
196
|
-
elementNamePattern: "^(?:name|title|label)$"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
groups: ["id", "unknown"],
|
|
200
|
-
partitionByComment: true,
|
|
201
|
-
partitionByNewLine: true
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"perfectionist/sort-union-types": [
|
|
205
|
-
"error",
|
|
206
|
-
{
|
|
207
|
-
groups: [
|
|
208
|
-
"named",
|
|
209
|
-
["intersection", "union"],
|
|
210
|
-
"unknown",
|
|
211
|
-
"nullish"
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
"sort-imports": "off"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
];
|
|
219
|
-
|
|
220
|
-
// src/configs/solid.ts
|
|
221
|
-
var solid = async (options = {}) => {
|
|
222
|
-
const {
|
|
223
|
-
withTypescript = false
|
|
224
|
-
} = options;
|
|
225
|
-
const configSolid = await import("eslint-plugin-solid/configs/recommended").then((mod) => mod.default);
|
|
226
|
-
return [
|
|
227
|
-
{
|
|
228
|
-
name: "solid/recommended",
|
|
229
|
-
files: ["**/*.jsx", ...withTypescript ? ["**/*.tsx"] : []],
|
|
230
|
-
...configSolid
|
|
231
|
-
}
|
|
232
|
-
];
|
|
233
|
-
};
|
|
234
|
-
var solid_default = solid;
|
|
235
|
-
|
|
236
|
-
// src/configs/stylistic.ts
|
|
237
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
238
|
-
var stylistic_default = [
|
|
239
|
-
{
|
|
240
|
-
name: "stylistic/custom",
|
|
241
|
-
...stylistic.configs.customize({
|
|
242
|
-
arrowParens: true,
|
|
243
|
-
braceStyle: "1tbs",
|
|
244
|
-
commaDangle: "always-multiline",
|
|
245
|
-
indent: 2,
|
|
246
|
-
jsx: true,
|
|
247
|
-
quoteProps: "consistent-as-needed",
|
|
248
|
-
quotes: "double",
|
|
249
|
-
semi: true
|
|
250
|
-
})
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
name: "lichthagel/stylistic",
|
|
254
|
-
rules: {
|
|
255
|
-
// JavaScript
|
|
256
|
-
"@stylistic/array-bracket-newline": ["error", { minItems: 4, multiline: true }],
|
|
257
|
-
"@stylistic/array-element-newline": ["error", { minItems: 4, multiline: true }],
|
|
258
|
-
"@stylistic/curly-newline": ["error", { consistent: true }],
|
|
259
|
-
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
260
|
-
"@stylistic/function-call-spacing": ["error", "never"],
|
|
261
|
-
"@stylistic/function-paren-newline": ["error", "multiline-arguments"],
|
|
262
|
-
"@stylistic/generator-star-spacing": ["error", { after: false, before: true }],
|
|
263
|
-
"@stylistic/implicit-arrow-linebreak": ["off", "beside"],
|
|
264
|
-
"@stylistic/lines-around-comment": [
|
|
265
|
-
"error",
|
|
266
|
-
{
|
|
267
|
-
afterHashbangComment: true,
|
|
268
|
-
allowArrayStart: true,
|
|
269
|
-
allowBlockStart: true,
|
|
270
|
-
allowClassStart: true,
|
|
271
|
-
allowEnumStart: true,
|
|
272
|
-
allowInterfaceStart: true,
|
|
273
|
-
allowModuleStart: true,
|
|
274
|
-
allowObjectStart: true,
|
|
275
|
-
allowTypeStart: true,
|
|
276
|
-
applyDefaultIgnorePatterns: true,
|
|
277
|
-
beforeBlockComment: true
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
"@stylistic/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: false }],
|
|
281
|
-
"@stylistic/multiline-ternary": ["error", "always-multiline"],
|
|
282
|
-
"@stylistic/newline-per-chained-call": ["error", { ignoreChainWithDepth: 2 }],
|
|
283
|
-
"@stylistic/no-extra-semi": "error",
|
|
284
|
-
"@stylistic/nonblock-statement-body-position": ["error", "beside"],
|
|
285
|
-
"@stylistic/object-curly-newline": ["error", { consistent: true, minProperties: 4, multiline: true }],
|
|
286
|
-
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
287
|
-
"@stylistic/one-var-declaration-per-line": ["error", "always"],
|
|
288
|
-
"@stylistic/operator-linebreak": ["error", "before"],
|
|
289
|
-
"@stylistic/semi-style": ["error", "last"],
|
|
290
|
-
"@stylistic/switch-colon-spacing": ["error", { after: true, before: false }],
|
|
291
|
-
// JSX
|
|
292
|
-
"@stylistic/jsx-closing-bracket-location": ["error", "line-aligned"],
|
|
293
|
-
"@stylistic/jsx-curly-brace-presence": ["error", { children: "never", propElementValues: "always", props: "never" }],
|
|
294
|
-
"@stylistic/jsx-pascal-case": "error",
|
|
295
|
-
"@stylistic/jsx-props-no-multi-spaces": "error",
|
|
296
|
-
"@stylistic/jsx-self-closing-comp": "error"
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
];
|
|
300
|
-
|
|
301
|
-
// src/configs/svelte.ts
|
|
302
|
-
var SVELTE_FILES = ["**/*.svelte"];
|
|
303
|
-
var svelte = async (options = {}) => {
|
|
304
|
-
const {
|
|
305
|
-
disableStylistic = false,
|
|
306
|
-
withTypescript = false
|
|
307
|
-
} = options;
|
|
308
|
-
const pluginSvelte = await import("eslint-plugin-svelte").then((mod) => mod.default);
|
|
309
|
-
const configs = [
|
|
310
|
-
...pluginSvelte.configs["flat/recommended"].map((configItem) => ({
|
|
311
|
-
name: "svelte/recommended",
|
|
312
|
-
...configItem
|
|
313
|
-
})),
|
|
314
|
-
{
|
|
315
|
-
name: "lichthagel/svelte",
|
|
316
|
-
files: SVELTE_FILES,
|
|
317
|
-
languageOptions: {
|
|
318
|
-
parserOptions: {
|
|
319
|
-
extraFileExtensions: [".svelte"],
|
|
320
|
-
parser: withTypescript ? "@typescript-eslint/parser" : null,
|
|
321
|
-
project: true
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
rules: {
|
|
325
|
-
"svelte/block-lang": [
|
|
326
|
-
"error",
|
|
327
|
-
{
|
|
328
|
-
enforceScriptPresent: false,
|
|
329
|
-
enforceStylePresent: false,
|
|
330
|
-
script: [withTypescript ? "ts" : null]
|
|
331
|
-
}
|
|
332
|
-
],
|
|
333
|
-
"svelte/first-attribute-linebreak": [
|
|
334
|
-
"error",
|
|
335
|
-
{
|
|
336
|
-
multiline: "below",
|
|
337
|
-
singleline: "beside"
|
|
338
|
-
}
|
|
339
|
-
],
|
|
340
|
-
"svelte/html-closing-bracket-spacing": [
|
|
341
|
-
"error",
|
|
342
|
-
{
|
|
343
|
-
endTag: "never",
|
|
344
|
-
selfClosingTag: "always",
|
|
345
|
-
startTag: "never"
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
"svelte/html-quotes": [
|
|
349
|
-
"error",
|
|
350
|
-
{
|
|
351
|
-
prefer: "double"
|
|
352
|
-
}
|
|
353
|
-
],
|
|
354
|
-
"svelte/indent": [
|
|
355
|
-
"error",
|
|
356
|
-
{
|
|
357
|
-
alignAttributesVertically: true,
|
|
358
|
-
indent: 2
|
|
359
|
-
}
|
|
360
|
-
],
|
|
361
|
-
"svelte/infinite-reactive-loop": "error",
|
|
362
|
-
"svelte/max-attributes-per-line": [
|
|
363
|
-
"error",
|
|
364
|
-
{
|
|
365
|
-
multiline: 1,
|
|
366
|
-
singleline: 3
|
|
367
|
-
}
|
|
368
|
-
],
|
|
369
|
-
"svelte/mustache-spacing": "error",
|
|
370
|
-
"svelte/no-dupe-on-directives": "error",
|
|
371
|
-
"svelte/no-dupe-use-directives": "error",
|
|
372
|
-
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
373
|
-
"svelte/no-goto-without-base": "error",
|
|
374
|
-
"svelte/no-ignored-unsubscribe": "error",
|
|
375
|
-
"svelte/no-immutable-reactive-statements": "error",
|
|
376
|
-
"svelte/no-reactive-functions": "error",
|
|
377
|
-
"svelte/no-reactive-literals": "error",
|
|
378
|
-
"svelte/no-spaces-around-equal-signs-in-attribute": "error",
|
|
379
|
-
"svelte/no-target-blank": "error",
|
|
380
|
-
"svelte/no-trailing-spaces": "error",
|
|
381
|
-
"svelte/no-useless-mustaches": "error",
|
|
382
|
-
"svelte/require-store-callbacks-use-set-param": "error",
|
|
383
|
-
"svelte/spaced-html-comment": ["error", "always"],
|
|
384
|
-
"svelte/valid-each-key": "error",
|
|
385
|
-
...disableStylistic ? {
|
|
386
|
-
"@stylistic/indent": "off",
|
|
387
|
-
// superseded by svelte/indent
|
|
388
|
-
"@stylistic/indent-binary-ops": "off",
|
|
389
|
-
// superseded by svelte/indent
|
|
390
|
-
"@stylistic/no-trailing-spaces": "off"
|
|
391
|
-
// superseded by svelte/no-trailing-spaces
|
|
392
|
-
} : {}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
];
|
|
396
|
-
return configs;
|
|
397
|
-
};
|
|
398
|
-
var svelte_default = svelte;
|
|
399
|
-
|
|
400
|
-
// src/configs/tailwindcss.ts
|
|
401
|
-
var tailwindcss = async () => {
|
|
402
|
-
const pluginTailwind = await import("eslint-plugin-tailwindcss").then((mod) => mod.default);
|
|
403
|
-
return [
|
|
404
|
-
...pluginTailwind.configs["flat/recommended"].map((config) => ({
|
|
405
|
-
...config,
|
|
406
|
-
name: config.name?.replaceAll(":", "/")
|
|
407
|
-
})),
|
|
408
|
-
{
|
|
409
|
-
name: "lichthagel/tailwindcss",
|
|
410
|
-
rules: {
|
|
411
|
-
"tailwindcss/classnames-order": "error",
|
|
412
|
-
"tailwindcss/enforces-negative-arbitrary-values": "error",
|
|
413
|
-
"tailwindcss/enforces-shorthand": "error",
|
|
414
|
-
"tailwindcss/no-contradicting-classname": "error",
|
|
415
|
-
"tailwindcss/no-unnecessary-arbitrary-value": "error"
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
];
|
|
419
|
-
};
|
|
420
|
-
var tailwindcss_default = tailwindcss;
|
|
421
|
-
|
|
422
|
-
// src/configs/typescript.ts
|
|
423
|
-
import ts from "typescript-eslint";
|
|
424
|
-
var typescript_default = [
|
|
425
|
-
...ts.configs.recommendedTypeChecked,
|
|
426
|
-
{
|
|
427
|
-
name: "lichthagel/typescript",
|
|
428
|
-
rules: {
|
|
429
|
-
"@typescript-eslint/array-type": "error",
|
|
430
|
-
"@typescript-eslint/consistent-indexed-object-style": ["warn", "index-signature"],
|
|
431
|
-
"@typescript-eslint/consistent-type-assertions": ["warn", { assertionStyle: "as", objectLiteralTypeAssertions: "allow" }],
|
|
432
|
-
"@typescript-eslint/consistent-type-definitions": ["warn", "type"],
|
|
433
|
-
"@typescript-eslint/consistent-type-exports": "error",
|
|
434
|
-
"@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
|
|
435
|
-
"@typescript-eslint/default-param-last": "warn",
|
|
436
|
-
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
437
|
-
"@typescript-eslint/method-signature-style": "warn",
|
|
438
|
-
"@typescript-eslint/no-array-constructor": "error",
|
|
439
|
-
"@typescript-eslint/no-useless-empty-export": "error",
|
|
440
|
-
"default-param-last": "off"
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
];
|
|
444
|
-
|
|
445
|
-
// src/configs/unicorn.ts
|
|
446
|
-
import unicornPlugin from "eslint-plugin-unicorn";
|
|
447
|
-
var unicorn_default = [
|
|
448
|
-
{
|
|
449
|
-
name: "unicorn/flat/recommended",
|
|
450
|
-
...unicornPlugin.configs["flat/recommended"]
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
name: "lichthagel/unicorn",
|
|
454
|
-
rules: {
|
|
455
|
-
"unicorn/consistent-destructuring": "error",
|
|
456
|
-
"unicorn/filename-case": [
|
|
457
|
-
"error",
|
|
458
|
-
{
|
|
459
|
-
cases: {
|
|
460
|
-
camelCase: true,
|
|
461
|
-
kebabCase: true,
|
|
462
|
-
pascalCase: true
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
],
|
|
466
|
-
"unicorn/import-style": "off",
|
|
467
|
-
"unicorn/no-null": "off",
|
|
468
|
-
"unicorn/no-useless-undefined": ["error", { checkArguments: false }],
|
|
469
|
-
"unicorn/prevent-abbreviations": "off"
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
];
|
|
473
|
-
|
|
474
|
-
// src/factory.ts
|
|
475
|
-
var lichthagel = async (options = {}) => {
|
|
476
|
-
const {
|
|
477
|
-
browser = false,
|
|
478
|
-
node: node2 = false,
|
|
479
|
-
solid: solid2 = false,
|
|
480
|
-
stylistic: stylistic2 = true,
|
|
481
|
-
svelte: svelte2 = false,
|
|
482
|
-
tailwindcss: tailwindcss2 = false,
|
|
483
|
-
typescript = true,
|
|
484
|
-
...rest
|
|
485
|
-
} = options;
|
|
486
|
-
if (Object.keys(rest).length > 0) {
|
|
487
|
-
throw new Error(`Unknown options: ${Object.keys(rest).join(", ")}`);
|
|
488
|
-
}
|
|
489
|
-
const config = [...javascript_default, ...unicorn_default, ...perfectionist_default];
|
|
490
|
-
if (stylistic2) {
|
|
491
|
-
config.push(...stylistic_default);
|
|
492
|
-
}
|
|
493
|
-
if (browser) {
|
|
494
|
-
config.push(...browser_default);
|
|
495
|
-
}
|
|
496
|
-
if (node2) {
|
|
497
|
-
config.push(...await node_default());
|
|
498
|
-
}
|
|
499
|
-
if (typescript) {
|
|
500
|
-
config.push(...typescript_default);
|
|
501
|
-
}
|
|
502
|
-
if (solid2) {
|
|
503
|
-
config.push(...await solid_default({ withTypescript: typescript }));
|
|
504
|
-
}
|
|
505
|
-
if (svelte2) {
|
|
506
|
-
config.push(...await svelte_default({ disableStylistic: stylistic2, withTypescript: typescript }));
|
|
507
|
-
}
|
|
508
|
-
if (tailwindcss2) {
|
|
509
|
-
config.push(...await tailwindcss_default());
|
|
510
|
-
}
|
|
511
|
-
return config;
|
|
512
|
-
};
|
|
513
|
-
var factory_default = lichthagel;
|
|
514
|
-
export {
|
|
515
|
-
browser_default as browser,
|
|
516
|
-
factory_default as default,
|
|
517
|
-
javascript_default as javascript,
|
|
518
|
-
node_default as node,
|
|
519
|
-
perfectionist_default as perfectionist,
|
|
520
|
-
solid_default as solid,
|
|
521
|
-
stylistic_default as stylistic,
|
|
522
|
-
svelte_default as svelte,
|
|
523
|
-
tailwindcss_default as tailwindcss,
|
|
524
|
-
typescript_default as typescript,
|
|
525
|
-
unicorn_default as unicorn
|
|
526
|
-
};
|