@jsse/eslint-config 0.3.7 → 0.4.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cli.js +3 -3
  3. package/dist/esm/config-fns.d.ts +109 -34
  4. package/dist/esm/config-fns.js +111 -35
  5. package/dist/esm/configs/{comments.d.ts → de-morgan.d.ts} +1 -1
  6. package/dist/esm/configs/de-morgan.js +9 -0
  7. package/dist/esm/configs/eslint-comments.d.ts +2 -0
  8. package/dist/esm/configs/{comments.js → eslint-comments.js} +1 -1
  9. package/dist/esm/configs/gql.d.ts +2 -2
  10. package/dist/esm/configs/markdown.js +1 -1
  11. package/dist/esm/configs/prettier.d.ts +2 -2
  12. package/dist/esm/configs/react.d.ts +3 -3
  13. package/dist/esm/configs/stylistic.js +1 -1
  14. package/dist/esm/configs/ts/parser.d.ts +2 -2
  15. package/dist/esm/configs/ts/parser.js +7 -5
  16. package/dist/esm/configs/ts/typescript-rules.d.ts +9 -4
  17. package/dist/esm/configs/ts/typescript-rules.js +26 -62
  18. package/dist/esm/configs/ts/typescript.js +56 -43
  19. package/dist/esm/define-config.d.ts +3 -3
  20. package/dist/esm/define-config.js +38 -28
  21. package/dist/esm/fixable.d.ts +2 -1
  22. package/dist/esm/fixable.js +3 -395
  23. package/dist/esm/generated/fixable-rules-map.d.ts +2 -0
  24. package/dist/esm/generated/fixable-rules-map.js +436 -0
  25. package/dist/esm/generated/version.d.ts +1 -1
  26. package/dist/esm/generated/version.js +1 -1
  27. package/dist/esm/index.d.ts +1 -1
  28. package/dist/esm/index.js +0 -1
  29. package/dist/esm/lager.d.ts +1 -1
  30. package/dist/esm/lager.js +1 -1
  31. package/dist/esm/plugins-all.d.ts +11 -8
  32. package/dist/esm/plugins-all.js +99 -10
  33. package/dist/esm/plugins.d.ts +1 -0
  34. package/dist/esm/plugins.js +4 -1
  35. package/dist/esm/presets.d.ts +16 -0
  36. package/dist/esm/presets.js +96 -1
  37. package/dist/esm/types.d.ts +34 -22
  38. package/dist/esm/utils.d.ts +5 -5
  39. package/dist/esm/utils.js +1 -1
  40. package/dist/index.d.ts +7404 -6303
  41. package/dist/index.js +289 -227
  42. package/package.json +20 -27
  43. package/dist/esm/plugindex.d.ts +0 -7
  44. package/dist/esm/plugindex.js +0 -60
@@ -0,0 +1,436 @@
1
+ export const FIXABLE_RULES_MAP = {
2
+ antfu: [
3
+ "antfu/consistent-chaining",
4
+ "antfu/consistent-list-newline",
5
+ "antfu/curly",
6
+ "antfu/if-newline",
7
+ "antfu/import-dedupe",
8
+ "antfu/indent-unindent",
9
+ "antfu/top-level-function",
10
+ ],
11
+ deMorgan: [
12
+ "de-morgan/no-negated-conjunction",
13
+ "de-morgan/no-negated-disjunction",
14
+ ],
15
+ eslintComments: [],
16
+ import: [
17
+ "import/consistent-type-specifier-style",
18
+ "import/extensions",
19
+ "import/first",
20
+ "import/imports-first",
21
+ "import/newline-after-import",
22
+ "import/no-absolute-path",
23
+ "import/no-duplicates",
24
+ "import/no-empty-named-blocks",
25
+ "import/no-import-module-exports",
26
+ "import/no-namespace",
27
+ "import/no-relative-packages",
28
+ "import/no-useless-path-segments",
29
+ "import/order",
30
+ ],
31
+ jsdoc: [
32
+ "jsdoc/check-alignment",
33
+ "jsdoc/check-line-alignment",
34
+ "jsdoc/check-param-names",
35
+ "jsdoc/check-property-names",
36
+ "jsdoc/check-tag-names",
37
+ "jsdoc/check-types",
38
+ "jsdoc/convert-to-jsdoc-comments",
39
+ "jsdoc/empty-tags",
40
+ "jsdoc/lines-before-block",
41
+ "jsdoc/match-name",
42
+ "jsdoc/multiline-blocks",
43
+ "jsdoc/no-bad-blocks",
44
+ "jsdoc/no-blank-block-descriptions",
45
+ "jsdoc/no-blank-blocks",
46
+ "jsdoc/no-defaults",
47
+ "jsdoc/no-missing-syntax",
48
+ "jsdoc/no-multi-asterisks",
49
+ "jsdoc/no-restricted-syntax",
50
+ "jsdoc/no-types",
51
+ "jsdoc/require-asterisk-prefix",
52
+ "jsdoc/require-description-complete-sentence",
53
+ "jsdoc/require-example",
54
+ "jsdoc/require-hyphen-before-param-description",
55
+ "jsdoc/require-jsdoc",
56
+ "jsdoc/require-param",
57
+ "jsdoc/require-param-description",
58
+ "jsdoc/require-param-type",
59
+ "jsdoc/require-property",
60
+ "jsdoc/require-returns",
61
+ "jsdoc/sort-tags",
62
+ "jsdoc/tag-lines",
63
+ "jsdoc/text-escaping",
64
+ ],
65
+ jsonc: [
66
+ "jsonc/array-bracket-newline",
67
+ "jsonc/array-bracket-spacing",
68
+ "jsonc/array-element-newline",
69
+ "jsonc/auto",
70
+ "jsonc/comma-dangle",
71
+ "jsonc/comma-style",
72
+ "jsonc/indent",
73
+ "jsonc/key-spacing",
74
+ "jsonc/no-binary-expression",
75
+ "jsonc/no-binary-numeric-literals",
76
+ "jsonc/no-escape-sequence-in-identifier",
77
+ "jsonc/no-floating-decimal",
78
+ "jsonc/no-hexadecimal-numeric-literals",
79
+ "jsonc/no-number-props",
80
+ "jsonc/no-numeric-separators",
81
+ "jsonc/no-octal-numeric-literals",
82
+ "jsonc/no-parenthesized",
83
+ "jsonc/no-plus-sign",
84
+ "jsonc/no-template-literals",
85
+ "jsonc/no-unicode-codepoint-escapes",
86
+ "jsonc/object-curly-newline",
87
+ "jsonc/object-curly-spacing",
88
+ "jsonc/object-property-newline",
89
+ "jsonc/quote-props",
90
+ "jsonc/quotes",
91
+ "jsonc/sort-array-values",
92
+ "jsonc/sort-keys",
93
+ "jsonc/space-unary-ops",
94
+ "jsonc/valid-json-number",
95
+ ],
96
+ markdown: [],
97
+ n: [
98
+ "n/exports-style",
99
+ "n/file-extension-in-import",
100
+ "n/hashbang",
101
+ "n/prefer-node-protocol",
102
+ "n/shebang",
103
+ ],
104
+ noOnlyTests: ["no-only-tests/no-only-tests"],
105
+ perfectionist: [
106
+ "perfectionist/sort-array-includes",
107
+ "perfectionist/sort-classes",
108
+ "perfectionist/sort-decorators",
109
+ "perfectionist/sort-enums",
110
+ "perfectionist/sort-exports",
111
+ "perfectionist/sort-heritage-clauses",
112
+ "perfectionist/sort-imports",
113
+ "perfectionist/sort-interfaces",
114
+ "perfectionist/sort-intersection-types",
115
+ "perfectionist/sort-jsx-props",
116
+ "perfectionist/sort-maps",
117
+ "perfectionist/sort-modules",
118
+ "perfectionist/sort-named-exports",
119
+ "perfectionist/sort-named-imports",
120
+ "perfectionist/sort-object-types",
121
+ "perfectionist/sort-objects",
122
+ "perfectionist/sort-sets",
123
+ "perfectionist/sort-switch-case",
124
+ "perfectionist/sort-union-types",
125
+ "perfectionist/sort-variable-declarations",
126
+ ],
127
+ react: [
128
+ "react/destructuring-assignment",
129
+ "react/function-component-definition",
130
+ "react/jsx-boolean-value",
131
+ "react/jsx-closing-bracket-location",
132
+ "react/jsx-closing-tag-location",
133
+ "react/jsx-curly-brace-presence",
134
+ "react/jsx-curly-newline",
135
+ "react/jsx-curly-spacing",
136
+ "react/jsx-equals-spacing",
137
+ "react/jsx-first-prop-new-line",
138
+ "react/jsx-fragments",
139
+ "react/jsx-indent",
140
+ "react/jsx-indent-props",
141
+ "react/jsx-max-props-per-line",
142
+ "react/jsx-newline",
143
+ "react/jsx-no-leaked-render",
144
+ "react/jsx-no-target-blank",
145
+ "react/jsx-no-useless-fragment",
146
+ "react/jsx-one-expression-per-line",
147
+ "react/jsx-props-no-multi-spaces",
148
+ "react/jsx-sort-props",
149
+ "react/jsx-space-before-closing",
150
+ "react/jsx-tag-spacing",
151
+ "react/jsx-wrap-multilines",
152
+ "react/no-arrow-function-lifecycle",
153
+ "react/no-unknown-property",
154
+ "react/prefer-read-only-props",
155
+ "react/self-closing-comp",
156
+ "react/sort-prop-types",
157
+ ],
158
+ reactHooks: ["react-hooks/exhaustive-deps"],
159
+ reactRefresh: [],
160
+ stylistic: [
161
+ "@stylistic/array-bracket-newline",
162
+ "@stylistic/array-bracket-spacing",
163
+ "@stylistic/array-element-newline",
164
+ "@stylistic/arrow-parens",
165
+ "@stylistic/arrow-spacing",
166
+ "@stylistic/block-spacing",
167
+ "@stylistic/brace-style",
168
+ "@stylistic/comma-dangle",
169
+ "@stylistic/comma-spacing",
170
+ "@stylistic/comma-style",
171
+ "@stylistic/computed-property-spacing",
172
+ "@stylistic/curly-newline",
173
+ "@stylistic/dot-location",
174
+ "@stylistic/eol-last",
175
+ "@stylistic/func-call-spacing",
176
+ "@stylistic/function-call-argument-newline",
177
+ "@stylistic/function-call-spacing",
178
+ "@stylistic/function-paren-newline",
179
+ "@stylistic/generator-star-spacing",
180
+ "@stylistic/implicit-arrow-linebreak",
181
+ "@stylistic/indent",
182
+ "@stylistic/indent-binary-ops",
183
+ "@stylistic/jsx-closing-bracket-location",
184
+ "@stylistic/jsx-closing-tag-location",
185
+ "@stylistic/jsx-curly-brace-presence",
186
+ "@stylistic/jsx-curly-newline",
187
+ "@stylistic/jsx-curly-spacing",
188
+ "@stylistic/jsx-equals-spacing",
189
+ "@stylistic/jsx-first-prop-new-line",
190
+ "@stylistic/jsx-function-call-newline",
191
+ "@stylistic/jsx-indent",
192
+ "@stylistic/jsx-indent-props",
193
+ "@stylistic/jsx-max-props-per-line",
194
+ "@stylistic/jsx-newline",
195
+ "@stylistic/jsx-one-expression-per-line",
196
+ "@stylistic/jsx-props-no-multi-spaces",
197
+ "@stylistic/jsx-quotes",
198
+ "@stylistic/jsx-self-closing-comp",
199
+ "@stylistic/jsx-sort-props",
200
+ "@stylistic/jsx-tag-spacing",
201
+ "@stylistic/jsx-wrap-multilines",
202
+ "@stylistic/key-spacing",
203
+ "@stylistic/keyword-spacing",
204
+ "@stylistic/linebreak-style",
205
+ "@stylistic/lines-around-comment",
206
+ "@stylistic/lines-between-class-members",
207
+ "@stylistic/member-delimiter-style",
208
+ "@stylistic/multiline-comment-style",
209
+ "@stylistic/multiline-ternary",
210
+ "@stylistic/new-parens",
211
+ "@stylistic/newline-per-chained-call",
212
+ "@stylistic/no-confusing-arrow",
213
+ "@stylistic/no-extra-parens",
214
+ "@stylistic/no-extra-semi",
215
+ "@stylistic/no-floating-decimal",
216
+ "@stylistic/no-multi-spaces",
217
+ "@stylistic/no-multiple-empty-lines",
218
+ "@stylistic/no-trailing-spaces",
219
+ "@stylistic/no-whitespace-before-property",
220
+ "@stylistic/nonblock-statement-body-position",
221
+ "@stylistic/object-curly-newline",
222
+ "@stylistic/object-curly-spacing",
223
+ "@stylistic/object-property-newline",
224
+ "@stylistic/one-var-declaration-per-line",
225
+ "@stylistic/operator-linebreak",
226
+ "@stylistic/padded-blocks",
227
+ "@stylistic/padding-line-between-statements",
228
+ "@stylistic/quote-props",
229
+ "@stylistic/quotes",
230
+ "@stylistic/rest-spread-spacing",
231
+ "@stylistic/semi",
232
+ "@stylistic/semi-spacing",
233
+ "@stylistic/semi-style",
234
+ "@stylistic/space-before-blocks",
235
+ "@stylistic/space-before-function-paren",
236
+ "@stylistic/space-in-parens",
237
+ "@stylistic/space-infix-ops",
238
+ "@stylistic/space-unary-ops",
239
+ "@stylistic/spaced-comment",
240
+ "@stylistic/switch-colon-spacing",
241
+ "@stylistic/template-curly-spacing",
242
+ "@stylistic/template-tag-spacing",
243
+ "@stylistic/type-annotation-spacing",
244
+ "@stylistic/type-generic-spacing",
245
+ "@stylistic/type-named-tuple-spacing",
246
+ "@stylistic/wrap-iife",
247
+ "@stylistic/wrap-regex",
248
+ "@stylistic/yield-star-spacing",
249
+ ],
250
+ tsdoc: [],
251
+ typescript: [
252
+ "@typescript-eslint/array-type",
253
+ "@typescript-eslint/ban-tslint-comment",
254
+ "@typescript-eslint/consistent-generic-constructors",
255
+ "@typescript-eslint/consistent-indexed-object-style",
256
+ "@typescript-eslint/consistent-type-assertions",
257
+ "@typescript-eslint/consistent-type-definitions",
258
+ "@typescript-eslint/consistent-type-exports",
259
+ "@typescript-eslint/consistent-type-imports",
260
+ "@typescript-eslint/dot-notation",
261
+ "@typescript-eslint/explicit-member-accessibility",
262
+ "@typescript-eslint/method-signature-style",
263
+ "@typescript-eslint/no-array-constructor",
264
+ "@typescript-eslint/no-confusing-void-expression",
265
+ "@typescript-eslint/no-duplicate-type-constituents",
266
+ "@typescript-eslint/no-dynamic-delete",
267
+ "@typescript-eslint/no-empty-interface",
268
+ "@typescript-eslint/no-explicit-any",
269
+ "@typescript-eslint/no-extra-non-null-assertion",
270
+ "@typescript-eslint/no-import-type-side-effects",
271
+ "@typescript-eslint/no-inferrable-types",
272
+ "@typescript-eslint/no-meaningless-void-operator",
273
+ "@typescript-eslint/no-restricted-types",
274
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare",
275
+ "@typescript-eslint/no-unnecessary-qualifier",
276
+ "@typescript-eslint/no-unnecessary-template-expression",
277
+ "@typescript-eslint/no-unnecessary-type-arguments",
278
+ "@typescript-eslint/no-unnecessary-type-assertion",
279
+ "@typescript-eslint/no-useless-empty-export",
280
+ "@typescript-eslint/no-wrapper-object-types",
281
+ "@typescript-eslint/non-nullable-type-assertion-style",
282
+ "@typescript-eslint/prefer-as-const",
283
+ "@typescript-eslint/prefer-destructuring",
284
+ "@typescript-eslint/prefer-function-type",
285
+ "@typescript-eslint/prefer-includes",
286
+ "@typescript-eslint/prefer-namespace-keyword",
287
+ "@typescript-eslint/prefer-optional-chain",
288
+ "@typescript-eslint/prefer-readonly",
289
+ "@typescript-eslint/prefer-reduce-type-parameter",
290
+ "@typescript-eslint/prefer-regexp-exec",
291
+ "@typescript-eslint/prefer-return-this-type",
292
+ "@typescript-eslint/prefer-string-starts-ends-with",
293
+ "@typescript-eslint/prefer-ts-expect-error",
294
+ "@typescript-eslint/promise-function-async",
295
+ "@typescript-eslint/return-await",
296
+ "@typescript-eslint/sort-type-constituents",
297
+ ],
298
+ unicorn: [
299
+ "unicorn/better-regex",
300
+ "unicorn/catch-error-name",
301
+ "unicorn/consistent-assert",
302
+ "unicorn/consistent-date-clone",
303
+ "unicorn/consistent-destructuring",
304
+ "unicorn/consistent-empty-array-spread",
305
+ "unicorn/consistent-existence-index-check",
306
+ "unicorn/custom-error-definition",
307
+ "unicorn/empty-brace-spaces",
308
+ "unicorn/escape-case",
309
+ "unicorn/explicit-length-check",
310
+ "unicorn/new-for-builtins",
311
+ "unicorn/no-array-for-each",
312
+ "unicorn/no-array-method-this-argument",
313
+ "unicorn/no-await-expression-member",
314
+ "unicorn/no-console-spaces",
315
+ "unicorn/no-for-loop",
316
+ "unicorn/no-hex-escape",
317
+ "unicorn/no-instanceof-builtins",
318
+ "unicorn/no-lonely-if",
319
+ "unicorn/no-named-default",
320
+ "unicorn/no-negated-condition",
321
+ "unicorn/no-nested-ternary",
322
+ "unicorn/no-new-array",
323
+ "unicorn/no-new-buffer",
324
+ "unicorn/no-null",
325
+ "unicorn/no-single-promise-in-promise-methods",
326
+ "unicorn/no-static-only-class",
327
+ "unicorn/no-typeof-undefined",
328
+ "unicorn/no-unnecessary-array-flat-depth",
329
+ "unicorn/no-unnecessary-array-splice-count",
330
+ "unicorn/no-unnecessary-await",
331
+ "unicorn/no-unnecessary-slice-end",
332
+ "unicorn/no-unreadable-array-destructuring",
333
+ "unicorn/no-useless-fallback-in-spread",
334
+ "unicorn/no-useless-length-check",
335
+ "unicorn/no-useless-promise-resolve-reject",
336
+ "unicorn/no-useless-spread",
337
+ "unicorn/no-useless-undefined",
338
+ "unicorn/no-zero-fractions",
339
+ "unicorn/number-literal-case",
340
+ "unicorn/numeric-separators-style",
341
+ "unicorn/prefer-add-event-listener",
342
+ "unicorn/prefer-array-find",
343
+ "unicorn/prefer-array-flat",
344
+ "unicorn/prefer-array-flat-map",
345
+ "unicorn/prefer-array-index-of",
346
+ "unicorn/prefer-array-some",
347
+ "unicorn/prefer-at",
348
+ "unicorn/prefer-date-now",
349
+ "unicorn/prefer-default-parameters",
350
+ "unicorn/prefer-dom-node-append",
351
+ "unicorn/prefer-dom-node-dataset",
352
+ "unicorn/prefer-dom-node-remove",
353
+ "unicorn/prefer-export-from",
354
+ "unicorn/prefer-global-this",
355
+ "unicorn/prefer-import-meta-properties",
356
+ "unicorn/prefer-includes",
357
+ "unicorn/prefer-json-parse-buffer",
358
+ "unicorn/prefer-keyboard-event-key",
359
+ "unicorn/prefer-math-min-max",
360
+ "unicorn/prefer-math-trunc",
361
+ "unicorn/prefer-modern-dom-apis",
362
+ "unicorn/prefer-modern-math-apis",
363
+ "unicorn/prefer-module",
364
+ "unicorn/prefer-native-coercion-functions",
365
+ "unicorn/prefer-negative-index",
366
+ "unicorn/prefer-node-protocol",
367
+ "unicorn/prefer-number-properties",
368
+ "unicorn/prefer-object-from-entries",
369
+ "unicorn/prefer-optional-catch-binding",
370
+ "unicorn/prefer-prototype-methods",
371
+ "unicorn/prefer-query-selector",
372
+ "unicorn/prefer-reflect-apply",
373
+ "unicorn/prefer-regexp-test",
374
+ "unicorn/prefer-set-has",
375
+ "unicorn/prefer-set-size",
376
+ "unicorn/prefer-single-call",
377
+ "unicorn/prefer-spread",
378
+ "unicorn/prefer-string-raw",
379
+ "unicorn/prefer-string-replace-all",
380
+ "unicorn/prefer-string-slice",
381
+ "unicorn/prefer-string-starts-ends-with",
382
+ "unicorn/prefer-string-trim-start-end",
383
+ "unicorn/prefer-switch",
384
+ "unicorn/prefer-ternary",
385
+ "unicorn/prefer-type-error",
386
+ "unicorn/prevent-abbreviations",
387
+ "unicorn/relative-url-style",
388
+ "unicorn/require-array-join-separator",
389
+ "unicorn/require-number-to-fixed-digits-argument",
390
+ "unicorn/string-content",
391
+ "unicorn/switch-case-braces",
392
+ "unicorn/template-indent",
393
+ "unicorn/text-encoding-identifier-case",
394
+ "unicorn/throw-new-error",
395
+ ],
396
+ unusedImports: [
397
+ "unused-imports/no-unused-imports",
398
+ "unused-imports/no-unused-vars",
399
+ ],
400
+ vitest: [
401
+ "vitest/consistent-test-it",
402
+ "vitest/no-alias-methods",
403
+ "vitest/no-focused-tests",
404
+ "vitest/no-identical-title",
405
+ "vitest/no-import-node-test",
406
+ "vitest/no-interpolation-in-snapshots",
407
+ "vitest/no-test-prefixes",
408
+ "vitest/padding-around-after-all-blocks",
409
+ "vitest/padding-around-after-each-blocks",
410
+ "vitest/padding-around-all",
411
+ "vitest/padding-around-before-all-blocks",
412
+ "vitest/padding-around-before-each-blocks",
413
+ "vitest/padding-around-describe-blocks",
414
+ "vitest/padding-around-expect-groups",
415
+ "vitest/padding-around-test-blocks",
416
+ "vitest/prefer-called-with",
417
+ "vitest/prefer-comparison-matcher",
418
+ "vitest/prefer-describe-function-title",
419
+ "vitest/prefer-expect-resolves",
420
+ "vitest/prefer-lowercase-title",
421
+ "vitest/prefer-mock-promise-shorthand",
422
+ "vitest/prefer-spy-on",
423
+ "vitest/prefer-strict-boolean-matchers",
424
+ "vitest/prefer-to-be",
425
+ "vitest/prefer-to-be-falsy",
426
+ "vitest/prefer-to-be-object",
427
+ "vitest/prefer-to-be-truthy",
428
+ "vitest/prefer-to-contain",
429
+ "vitest/prefer-to-have-length",
430
+ "vitest/prefer-todo",
431
+ "vitest/prefer-vi-mocked",
432
+ "vitest/require-mock-type-parameters",
433
+ "vitest/valid-expect",
434
+ "vitest/valid-title",
435
+ ],
436
+ };
@@ -1 +1 @@
1
- export declare const VERSION = "0.3.7";
1
+ export declare const VERSION = "0.4.0";
@@ -1 +1 @@
1
- export const VERSION = "0.3.7";
1
+ export const VERSION = "0.4.0";
@@ -5,5 +5,5 @@ export { VERSION } from "./generated/version.js";
5
5
  export * as globs from "./globs.js";
6
6
  export * from "./plugins.js";
7
7
  export { jsseReact } from "./presets.js";
8
- export * from "./types.js";
8
+ export type * from "./types.js";
9
9
  export * from "./utils.js";
package/dist/esm/index.js CHANGED
@@ -5,5 +5,4 @@ export { VERSION } from "./generated/version.js";
5
5
  export * as globs from "./globs.js";
6
6
  export * from "./plugins.js";
7
7
  export { jsseReact } from "./presets.js";
8
- export * from "./types.js";
9
8
  export * from "./utils.js";
@@ -1,5 +1,5 @@
1
1
  import Debug from "debug";
2
- export declare const debug: Debug.Debugger;
2
+ export declare const dbg: Debug.Debugger;
3
3
  declare const LAGER_LEVELS: {
4
4
  readonly trace: 10;
5
5
  readonly debug: 20;
package/dist/esm/lager.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-console */
2
2
  /* eslint-disable perfectionist/sort-objects */
3
3
  import Debug from "debug";
4
- export const debug = Debug("jsse:eslint-config");
4
+ export const dbg = Debug("jsse:eslint-config");
5
5
  const LAGER_LEVELS = {
6
6
  trace: 10,
7
7
  debug: 20,
@@ -1,15 +1,13 @@
1
- /**
2
- * ALL PLUGINS STATICALLY IMPORTED
3
- */
4
- export { pluginAntfu, pluginEslintComments, pluginImport, pluginN, pluginPerfectionist, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
5
- export { default as pluginMarkdown } from "@eslint/markdown";
1
+ import * as pluginReactRefresh from "eslint-plugin-react-refresh";
2
+ export { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImport, pluginN, pluginPerfectionist, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
6
3
  /**
7
4
  * The main `plugins.ts` does not export these plugins, but
8
5
  * exports functions that dynamically import them, so
9
6
  * we provide them here for testing etc
10
7
  */
8
+ export { default as pluginMarkdown } from "@eslint/markdown";
11
9
  export { default as pluginStylistic } from "@stylistic/eslint-plugin";
12
- export { default as pluginTs } from "@typescript-eslint/eslint-plugin";
10
+ export { default as pluginTypescript } from "@typescript-eslint/eslint-plugin";
13
11
  export * as parserTs from "@typescript-eslint/parser";
14
12
  export { default as pluginVitest } from "@vitest/eslint-plugin";
15
13
  export { default as pluginJsdoc } from "eslint-plugin-jsdoc";
@@ -17,7 +15,12 @@ export * as pluginJsonc from "eslint-plugin-jsonc";
17
15
  export { default as pluginNoOnlyTests } from "eslint-plugin-no-only-tests";
18
16
  export { default as pluginReact } from "eslint-plugin-react";
19
17
  export { default as pluginReactHooks } from "eslint-plugin-react-hooks";
20
- export * as pluginReactRefresh from "eslint-plugin-react-refresh";
21
- export { default as pluginTailwind } from "eslint-plugin-tailwindcss";
22
18
  export { default as pluginTsdoc } from "eslint-plugin-tsdoc";
23
19
  export { default as parserJsonc } from "jsonc-eslint-parser";
20
+ export { pluginReactRefresh };
21
+ type PluginIndexEntry = {
22
+ plugin: any;
23
+ prefix: string;
24
+ };
25
+ type PluginsIndex = Record<string, PluginIndexEntry>;
26
+ export declare const plugindex: PluginsIndex;
@@ -1,26 +1,115 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1
+ /* eslint-disable unicorn/prefer-export-from */
2
+ import pluginMarkdown from "@eslint/markdown";
2
3
  // @ts-nocheck
3
- /**
4
- * ALL PLUGINS STATICALLY IMPORTED
5
- */
6
- export { pluginAntfu, pluginEslintComments, pluginImport, pluginN, pluginPerfectionist, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
7
- export { default as pluginMarkdown } from "@eslint/markdown";
4
+ import pluginStylistic from "@stylistic/eslint-plugin";
5
+ import pluginTypescript from "@typescript-eslint/eslint-plugin";
6
+ import pluginVitest from "@vitest/eslint-plugin";
7
+ import pluginJsdoc from "eslint-plugin-jsdoc";
8
+ import * as pluginJsonc from "eslint-plugin-jsonc";
9
+ // @ts-expect-error - no types
10
+ import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
11
+ import pluginReact from "eslint-plugin-react";
12
+ import pluginReactHooks from "eslint-plugin-react-hooks";
13
+ import * as pluginReactRefresh from "eslint-plugin-react-refresh";
14
+ import pluginTsdoc from "eslint-plugin-tsdoc";
15
+ import { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImport, pluginN, pluginPerfectionist, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
16
+ export { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImport, pluginN, pluginPerfectionist, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
8
17
  /**
9
18
  * The main `plugins.ts` does not export these plugins, but
10
19
  * exports functions that dynamically import them, so
11
20
  * we provide them here for testing etc
12
21
  */
22
+ export { default as pluginMarkdown } from "@eslint/markdown";
13
23
  export { default as pluginStylistic } from "@stylistic/eslint-plugin";
14
- export { default as pluginTs } from "@typescript-eslint/eslint-plugin";
24
+ export { default as pluginTypescript } from "@typescript-eslint/eslint-plugin";
15
25
  export * as parserTs from "@typescript-eslint/parser";
16
26
  export { default as pluginVitest } from "@vitest/eslint-plugin";
17
27
  export { default as pluginJsdoc } from "eslint-plugin-jsdoc";
18
28
  export * as pluginJsonc from "eslint-plugin-jsonc";
19
- // TODO: export { default as pluginMarkdown } from "@eslint/markdown";
29
+ // @ts-expect-error - no types
20
30
  export { default as pluginNoOnlyTests } from "eslint-plugin-no-only-tests";
21
31
  export { default as pluginReact } from "eslint-plugin-react";
22
32
  export { default as pluginReactHooks } from "eslint-plugin-react-hooks";
23
- export * as pluginReactRefresh from "eslint-plugin-react-refresh";
24
- export { default as pluginTailwind } from "eslint-plugin-tailwindcss";
25
33
  export { default as pluginTsdoc } from "eslint-plugin-tsdoc";
26
34
  export { default as parserJsonc } from "jsonc-eslint-parser";
35
+ export { pluginReactRefresh };
36
+ export const plugindex = {
37
+ antfu: {
38
+ plugin: pluginAntfu,
39
+ prefix: "antfu/",
40
+ },
41
+ deMorgan: {
42
+ plugin: pluginDeMorgan,
43
+ prefix: "de-morgan/",
44
+ },
45
+ eslintComments: {
46
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
47
+ plugin: pluginEslintComments,
48
+ prefix: "eslint-comments/",
49
+ },
50
+ import: {
51
+ plugin: pluginImport,
52
+ prefix: "import/",
53
+ },
54
+ jsdoc: {
55
+ plugin: pluginJsdoc,
56
+ prefix: "jsdoc/",
57
+ },
58
+ jsonc: {
59
+ plugin: pluginJsonc,
60
+ prefix: "jsonc/",
61
+ },
62
+ markdown: {
63
+ plugin: pluginMarkdown,
64
+ prefix: "markdown/",
65
+ },
66
+ n: {
67
+ plugin: pluginN,
68
+ prefix: "n/",
69
+ },
70
+ noOnlyTests: {
71
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
72
+ plugin: pluginNoOnlyTests,
73
+ prefix: "no-only-tests/",
74
+ },
75
+ perfectionist: {
76
+ plugin: pluginPerfectionist,
77
+ prefix: "perfectionist/",
78
+ },
79
+ react: {
80
+ plugin: pluginReact,
81
+ prefix: "react/",
82
+ },
83
+ reactHooks: {
84
+ plugin: pluginReactHooks,
85
+ prefix: "react-hooks/",
86
+ },
87
+ reactRefresh: {
88
+ plugin: pluginReactRefresh,
89
+ prefix: "react-refresh/",
90
+ },
91
+ stylistic: {
92
+ plugin: pluginStylistic,
93
+ prefix: "@stylistic/",
94
+ },
95
+ tsdoc: {
96
+ plugin: pluginTsdoc,
97
+ prefix: "tsdoc/",
98
+ },
99
+ typescript: {
100
+ plugin: pluginTypescript,
101
+ prefix: "@typescript-eslint/",
102
+ },
103
+ unicorn: {
104
+ plugin: pluginUnicorn,
105
+ prefix: "unicorn/",
106
+ },
107
+ unusedImports: {
108
+ plugin: pluginUnusedImports,
109
+ prefix: "unused-imports/",
110
+ },
111
+ vitest: {
112
+ plugin: pluginVitest,
113
+ prefix: "vitest/",
114
+ },
115
+ };
@@ -3,6 +3,7 @@ export { default as pluginEslintComments } from "@eslint-community/eslint-plugin
3
3
  export { default as pluginTs } from "@typescript-eslint/eslint-plugin";
4
4
  export * as parserTs from "@typescript-eslint/parser";
5
5
  export { default as pluginAntfu } from "eslint-plugin-antfu";
6
+ export { default as pluginDeMorgan } from "eslint-plugin-de-morgan";
6
7
  export * as pluginImport from "eslint-plugin-import-x";
7
8
  export { default as pluginN } from "eslint-plugin-n";
8
9
  export { default as pluginPerfectionist } from "eslint-plugin-perfectionist";
@@ -8,6 +8,7 @@ export { default as pluginEslintComments } from "@eslint-community/eslint-plugin
8
8
  export { default as pluginTs } from "@typescript-eslint/eslint-plugin";
9
9
  export * as parserTs from "@typescript-eslint/parser";
10
10
  export { default as pluginAntfu } from "eslint-plugin-antfu";
11
+ export { default as pluginDeMorgan } from "eslint-plugin-de-morgan";
11
12
  export * as pluginImport from "eslint-plugin-import-x";
12
13
  export { default as pluginN } from "eslint-plugin-n";
13
14
  export { default as pluginPerfectionist } from "eslint-plugin-perfectionist";
@@ -106,6 +107,8 @@ export async function safeImportPluginTailwind() {
106
107
  return ok(plugin);
107
108
  }
108
109
  catch (e) {
109
- return err(new Error(`Failed to import \`eslint-plugin-tailwindcss\`. You might need to install it. ${e}`));
110
+ const msg = (e instanceof Error ? e.message : String(e)) ||
111
+ `unknown error ${String(e)}`;
112
+ return err(new Error(msg));
110
113
  }
111
114
  }