@jsse/eslint-config 0.3.6 → 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 (47) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +17 -12
  3. package/dist/cli.js +3 -3
  4. package/dist/esm/config-fns.d.ts +109 -34
  5. package/dist/esm/config-fns.js +111 -35
  6. package/dist/esm/configs/{comments.d.ts → de-morgan.d.ts} +1 -1
  7. package/dist/esm/configs/de-morgan.js +9 -0
  8. package/dist/esm/configs/eslint-comments.d.ts +2 -0
  9. package/dist/esm/configs/{comments.js → eslint-comments.js} +1 -1
  10. package/dist/esm/configs/gql.d.ts +2 -2
  11. package/dist/esm/configs/markdown.js +1 -1
  12. package/dist/esm/configs/prettier.d.ts +2 -2
  13. package/dist/esm/configs/react.d.ts +3 -3
  14. package/dist/esm/configs/sort-package-json.js +19 -6
  15. package/dist/esm/configs/stylistic.js +1 -1
  16. package/dist/esm/configs/ts/parser.d.ts +2 -2
  17. package/dist/esm/configs/ts/parser.js +7 -5
  18. package/dist/esm/configs/ts/requires-type-checking.js +1 -0
  19. package/dist/esm/configs/ts/typescript-rules.d.ts +9 -4
  20. package/dist/esm/configs/ts/typescript-rules.js +26 -62
  21. package/dist/esm/configs/ts/typescript.js +56 -43
  22. package/dist/esm/define-config.d.ts +3 -3
  23. package/dist/esm/define-config.js +38 -28
  24. package/dist/esm/fixable.d.ts +2 -1
  25. package/dist/esm/fixable.js +3 -391
  26. package/dist/esm/generated/fixable-rules-map.d.ts +2 -0
  27. package/dist/esm/generated/fixable-rules-map.js +436 -0
  28. package/dist/esm/generated/version.d.ts +1 -1
  29. package/dist/esm/generated/version.js +1 -1
  30. package/dist/esm/index.d.ts +1 -1
  31. package/dist/esm/index.js +0 -1
  32. package/dist/esm/lager.d.ts +1 -1
  33. package/dist/esm/lager.js +1 -1
  34. package/dist/esm/plugins-all.d.ts +11 -8
  35. package/dist/esm/plugins-all.js +99 -10
  36. package/dist/esm/plugins.d.ts +1 -0
  37. package/dist/esm/plugins.js +4 -1
  38. package/dist/esm/presets.d.ts +16 -0
  39. package/dist/esm/presets.js +96 -1
  40. package/dist/esm/types.d.ts +34 -22
  41. package/dist/esm/utils.d.ts +5 -5
  42. package/dist/esm/utils.js +1 -1
  43. package/dist/index.d.ts +7445 -6300
  44. package/dist/index.js +373 -238
  45. package/package.json +23 -30
  46. package/dist/esm/plugindex.d.ts +0 -7
  47. package/dist/esm/plugindex.js +0 -60
package/dist/index.js CHANGED
@@ -4,7 +4,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
8
14
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
15
  };
10
16
  var __export = (target, all) => {
@@ -28,9 +34,96 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
34
  mod
29
35
  ));
30
36
 
31
- // node_modules/.pnpm/globals@16.0.0/node_modules/globals/globals.json
37
+ // node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/rules.js
38
+ var require_rules = __commonJS({
39
+ "node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/rules.js"(exports, module) {
40
+ "use strict";
41
+ module.exports = {
42
+ "tailwindcss/classnames-order": "warn",
43
+ "tailwindcss/enforces-negative-arbitrary-values": "warn",
44
+ "tailwindcss/enforces-shorthand": "warn",
45
+ "tailwindcss/migration-from-tailwind-2": "warn",
46
+ "tailwindcss/no-arbitrary-value": "off",
47
+ "tailwindcss/no-custom-classname": "warn",
48
+ "tailwindcss/no-contradicting-classname": "error",
49
+ "tailwindcss/no-unnecessary-arbitrary-value": "warn"
50
+ };
51
+ }
52
+ });
53
+
54
+ // node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/recommended.js
55
+ var require_recommended = __commonJS({
56
+ "node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/recommended.js"(exports, module) {
57
+ "use strict";
58
+ var rules = require_rules();
59
+ module.exports = {
60
+ plugins: ["tailwindcss"],
61
+ parserOptions: {
62
+ ecmaFeatures: {
63
+ jsx: true
64
+ }
65
+ },
66
+ rules
67
+ };
68
+ }
69
+ });
70
+
71
+ // node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/flat-recommended.js
72
+ var require_flat_recommended = __commonJS({
73
+ "node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/config/flat-recommended.js"(exports, module) {
74
+ "use strict";
75
+ var rules = require_rules();
76
+ module.exports = [
77
+ {
78
+ name: "tailwindcss:base",
79
+ plugins: {
80
+ get tailwindcss() {
81
+ return require_lib();
82
+ }
83
+ },
84
+ languageOptions: {
85
+ parserOptions: {
86
+ ecmaFeatures: {
87
+ jsx: true
88
+ }
89
+ }
90
+ }
91
+ },
92
+ {
93
+ name: "tailwindcss:rules",
94
+ rules
95
+ }
96
+ ];
97
+ }
98
+ });
99
+
100
+ // node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/index.js
101
+ var require_lib = __commonJS({
102
+ "node_modules/.pnpm/eslint-plugin-tailwindcss@3.18.0_tailwindcss@3.4.17/node_modules/eslint-plugin-tailwindcss/lib/index.js"(exports, module) {
103
+ "use strict";
104
+ var base = __dirname + "/rules/";
105
+ module.exports = {
106
+ rules: {
107
+ "classnames-order": __require(base + "classnames-order"),
108
+ "enforces-negative-arbitrary-values": __require(base + "enforces-negative-arbitrary-values"),
109
+ "enforces-shorthand": __require(base + "enforces-shorthand"),
110
+ "migration-from-tailwind-2": __require(base + "migration-from-tailwind-2"),
111
+ "no-arbitrary-value": __require(base + "no-arbitrary-value"),
112
+ "no-contradicting-classname": __require(base + "no-contradicting-classname"),
113
+ "no-custom-classname": __require(base + "no-custom-classname"),
114
+ "no-unnecessary-arbitrary-value": __require(base + "no-unnecessary-arbitrary-value")
115
+ },
116
+ configs: {
117
+ recommended: require_recommended(),
118
+ "flat/recommended": require_flat_recommended()
119
+ }
120
+ };
121
+ }
122
+ });
123
+
124
+ // node_modules/.pnpm/globals@16.1.0/node_modules/globals/globals.json
32
125
  var require_globals = __commonJS({
33
- "node_modules/.pnpm/globals@16.0.0/node_modules/globals/globals.json"(exports, module) {
126
+ "node_modules/.pnpm/globals@16.1.0/node_modules/globals/globals.json"(exports, module) {
34
127
  module.exports = {
35
128
  amd: {
36
129
  define: false,
@@ -68,6 +161,7 @@ var require_globals = __commonJS({
68
161
  addEventListener: false,
69
162
  ai: false,
70
163
  AI: false,
164
+ AICreateMonitor: false,
71
165
  AITextSession: false,
72
166
  alert: false,
73
167
  AnalyserNode: false,
@@ -76,6 +170,7 @@ var require_globals = __commonJS({
76
170
  AnimationEvent: false,
77
171
  AnimationPlaybackEvent: false,
78
172
  AnimationTimeline: false,
173
+ AsyncDisposableStack: false,
79
174
  atob: false,
80
175
  Attr: false,
81
176
  Audio: false,
@@ -152,6 +247,7 @@ var require_globals = __commonJS({
152
247
  closed: false,
153
248
  CloseEvent: false,
154
249
  CloseWatcher: false,
250
+ CommandEvent: false,
155
251
  Comment: false,
156
252
  CompositionEvent: false,
157
253
  CompressionStream: false,
@@ -175,6 +271,7 @@ var require_globals = __commonJS({
175
271
  crypto: false,
176
272
  Crypto: false,
177
273
  CryptoKey: false,
274
+ CSPViolationReportBody: false,
178
275
  CSS: false,
179
276
  CSSAnimation: false,
180
277
  CSSConditionRule: false,
@@ -252,7 +349,9 @@ var require_globals = __commonJS({
252
349
  DeviceMotionEventRotationRate: false,
253
350
  DeviceOrientationEvent: false,
254
351
  devicePixelRatio: false,
352
+ DevicePosture: false,
255
353
  dispatchEvent: false,
354
+ DisposableStack: false,
256
355
  document: false,
257
356
  Document: false,
258
357
  DocumentFragment: false,
@@ -311,9 +410,9 @@ var require_globals = __commonJS({
311
410
  FileSystemFileEntry: false,
312
411
  FileSystemFileHandle: false,
313
412
  FileSystemHandle: false,
413
+ FileSystemObserver: false,
314
414
  FileSystemWritableFileStream: false,
315
415
  find: false,
316
- Float16Array: false,
317
416
  focus: false,
318
417
  FocusEvent: false,
319
418
  FontData: false,
@@ -450,6 +549,7 @@ var require_globals = __commonJS({
450
549
  HTMLProgressElement: false,
451
550
  HTMLQuoteElement: false,
452
551
  HTMLScriptElement: false,
552
+ HTMLSelectedContentElement: false,
453
553
  HTMLSelectElement: false,
454
554
  HTMLSlotElement: false,
455
555
  HTMLSourceElement: false,
@@ -508,6 +608,7 @@ var require_globals = __commonJS({
508
608
  KeyboardEvent: false,
509
609
  KeyboardLayoutMap: false,
510
610
  KeyframeEffect: false,
611
+ LanguageDetector: false,
511
612
  LargestContentfulPaint: false,
512
613
  LaunchParams: false,
513
614
  launchQueue: false,
@@ -605,6 +706,7 @@ var require_globals = __commonJS({
605
706
  NotifyPaintEvent: false,
606
707
  NotRestoredReasonDetails: false,
607
708
  NotRestoredReasons: false,
709
+ Observable: false,
608
710
  OfflineAudioCompletionEvent: false,
609
711
  OfflineAudioContext: false,
610
712
  offscreenBuffering: false,
@@ -632,6 +734,7 @@ var require_globals = __commonJS({
632
734
  onchange: true,
633
735
  onclick: true,
634
736
  onclose: true,
737
+ oncommand: true,
635
738
  oncontentvisibilityautostatechange: true,
636
739
  oncontextlost: true,
637
740
  oncontextmenu: true,
@@ -825,6 +928,7 @@ var require_globals = __commonJS({
825
928
  RelativeOrientationSensor: false,
826
929
  RemotePlayback: false,
827
930
  removeEventListener: false,
931
+ ReportBody: false,
828
932
  reportError: false,
829
933
  ReportingObserver: false,
830
934
  Request: false,
@@ -836,6 +940,7 @@ var require_globals = __commonJS({
836
940
  ResizeObserverSize: false,
837
941
  resizeTo: false,
838
942
  Response: false,
943
+ RestrictionTarget: false,
839
944
  RTCCertificate: false,
840
945
  RTCDataChannel: false,
841
946
  RTCDataChannelEvent: false,
@@ -896,6 +1001,11 @@ var require_globals = __commonJS({
896
1001
  ShadowRoot: false,
897
1002
  sharedStorage: false,
898
1003
  SharedStorage: false,
1004
+ SharedStorageAppendMethod: false,
1005
+ SharedStorageClearMethod: false,
1006
+ SharedStorageDeleteMethod: false,
1007
+ SharedStorageModifierMethod: false,
1008
+ SharedStorageSetMethod: false,
899
1009
  SharedStorageWorklet: false,
900
1010
  SharedWorker: false,
901
1011
  showDirectoryPicker: false,
@@ -927,7 +1037,9 @@ var require_globals = __commonJS({
927
1037
  StyleSheet: false,
928
1038
  StyleSheetList: false,
929
1039
  SubmitEvent: false,
1040
+ Subscriber: false,
930
1041
  SubtleCrypto: false,
1042
+ SuppressedError: false,
931
1043
  SVGAElement: false,
932
1044
  SVGAngle: false,
933
1045
  SVGAnimatedAngle: false,
@@ -1131,6 +1243,7 @@ var require_globals = __commonJS({
1131
1243
  WebTransportSendStream: false,
1132
1244
  WGSLLanguageFeatures: false,
1133
1245
  WheelEvent: false,
1246
+ when: false,
1134
1247
  window: false,
1135
1248
  Window: false,
1136
1249
  WindowControlsOverlay: false,
@@ -1209,6 +1322,7 @@ var require_globals = __commonJS({
1209
1322
  eval: false,
1210
1323
  EvalError: false,
1211
1324
  FinalizationRegistry: false,
1325
+ Float16Array: false,
1212
1326
  Float32Array: false,
1213
1327
  Float64Array: false,
1214
1328
  Function: false,
@@ -1921,6 +2035,7 @@ var require_globals = __commonJS({
1921
2035
  eval: false,
1922
2036
  EvalError: false,
1923
2037
  FinalizationRegistry: false,
2038
+ Float16Array: false,
1924
2039
  Float32Array: false,
1925
2040
  Float64Array: false,
1926
2041
  Function: false,
@@ -2223,6 +2338,7 @@ var require_globals = __commonJS({
2223
2338
  __filename: false,
2224
2339
  AbortController: false,
2225
2340
  AbortSignal: false,
2341
+ AsyncDisposableStack: false,
2226
2342
  atob: false,
2227
2343
  Blob: false,
2228
2344
  BroadcastChannel: false,
@@ -2241,6 +2357,7 @@ var require_globals = __commonJS({
2241
2357
  CryptoKey: false,
2242
2358
  CustomEvent: false,
2243
2359
  DecompressionStream: false,
2360
+ DisposableStack: false,
2244
2361
  DOMException: false,
2245
2362
  Event: false,
2246
2363
  EventTarget: false,
@@ -2280,6 +2397,7 @@ var require_globals = __commonJS({
2280
2397
  setTimeout: false,
2281
2398
  structuredClone: false,
2282
2399
  SubtleCrypto: false,
2400
+ SuppressedError: false,
2283
2401
  TextDecoder: false,
2284
2402
  TextDecoderStream: false,
2285
2403
  TextEncoder: false,
@@ -2287,6 +2405,7 @@ var require_globals = __commonJS({
2287
2405
  TransformStream: false,
2288
2406
  TransformStreamDefaultController: false,
2289
2407
  URL: false,
2408
+ URLPattern: false,
2290
2409
  URLSearchParams: false,
2291
2410
  WebAssembly: false,
2292
2411
  WebSocket: false,
@@ -2297,6 +2416,7 @@ var require_globals = __commonJS({
2297
2416
  nodeBuiltin: {
2298
2417
  AbortController: false,
2299
2418
  AbortSignal: false,
2419
+ AsyncDisposableStack: false,
2300
2420
  atob: false,
2301
2421
  Blob: false,
2302
2422
  BroadcastChannel: false,
@@ -2315,6 +2435,7 @@ var require_globals = __commonJS({
2315
2435
  CryptoKey: false,
2316
2436
  CustomEvent: false,
2317
2437
  DecompressionStream: false,
2438
+ DisposableStack: false,
2318
2439
  DOMException: false,
2319
2440
  Event: false,
2320
2441
  EventTarget: false,
@@ -2351,6 +2472,7 @@ var require_globals = __commonJS({
2351
2472
  setTimeout: false,
2352
2473
  structuredClone: false,
2353
2474
  SubtleCrypto: false,
2475
+ SuppressedError: false,
2354
2476
  TextDecoder: false,
2355
2477
  TextDecoderStream: false,
2356
2478
  TextEncoder: false,
@@ -2358,6 +2480,7 @@ var require_globals = __commonJS({
2358
2480
  TransformStream: false,
2359
2481
  TransformStreamDefaultController: false,
2360
2482
  URL: false,
2483
+ URLPattern: false,
2361
2484
  URLSearchParams: false,
2362
2485
  WebAssembly: false,
2363
2486
  WebSocket: false,
@@ -2471,6 +2594,10 @@ var require_globals = __commonJS({
2471
2594
  AbortPaymentEvent: false,
2472
2595
  AbortSignal: false,
2473
2596
  addEventListener: false,
2597
+ ai: false,
2598
+ AI: false,
2599
+ AICreateMonitor: false,
2600
+ AsyncDisposableStack: false,
2474
2601
  atob: false,
2475
2602
  BackgroundFetchEvent: false,
2476
2603
  BackgroundFetchManager: false,
@@ -2511,6 +2638,7 @@ var require_globals = __commonJS({
2511
2638
  CustomEvent: false,
2512
2639
  DecompressionStream: false,
2513
2640
  dispatchEvent: false,
2641
+ DisposableStack: false,
2514
2642
  DOMException: false,
2515
2643
  DOMMatrix: false,
2516
2644
  DOMMatrixReadOnly: false,
@@ -2598,6 +2726,7 @@ var require_globals = __commonJS({
2598
2726
  indexedDB: false,
2599
2727
  InstallEvent: false,
2600
2728
  isSecureContext: false,
2729
+ LanguageDetector: false,
2601
2730
  location: false,
2602
2731
  Lock: false,
2603
2732
  LockManager: false,
@@ -2611,6 +2740,7 @@ var require_globals = __commonJS({
2611
2740
  NetworkInformation: false,
2612
2741
  Notification: false,
2613
2742
  NotificationEvent: false,
2743
+ Observable: false,
2614
2744
  OffscreenCanvas: false,
2615
2745
  OffscreenCanvasRenderingContext2D: false,
2616
2746
  onabortpayment: true,
@@ -2667,10 +2797,12 @@ var require_globals = __commonJS({
2667
2797
  ReadableStreamDefaultReader: false,
2668
2798
  registration: false,
2669
2799
  removeEventListener: false,
2800
+ ReportBody: false,
2670
2801
  reportError: false,
2671
2802
  ReportingObserver: false,
2672
2803
  Request: false,
2673
2804
  Response: false,
2805
+ RestrictionTarget: false,
2674
2806
  scheduler: false,
2675
2807
  Scheduler: false,
2676
2808
  SecurityPolicyViolationEvent: false,
@@ -2686,7 +2818,9 @@ var require_globals = __commonJS({
2686
2818
  StorageBucketManager: false,
2687
2819
  StorageManager: false,
2688
2820
  structuredClone: false,
2821
+ Subscriber: false,
2689
2822
  SubtleCrypto: false,
2823
+ SuppressedError: false,
2690
2824
  SyncEvent: false,
2691
2825
  SyncManager: false,
2692
2826
  TaskController: false,
@@ -2736,6 +2870,7 @@ var require_globals = __commonJS({
2736
2870
  WebTransportDatagramDuplexStream: false,
2737
2871
  WebTransportError: false,
2738
2872
  WGSLLanguageFeatures: false,
2873
+ when: false,
2739
2874
  WindowClient: false,
2740
2875
  WorkerGlobalScope: false,
2741
2876
  WorkerLocation: false,
@@ -2747,6 +2882,7 @@ var require_globals = __commonJS({
2747
2882
  "shared-node-browser": {
2748
2883
  AbortController: false,
2749
2884
  AbortSignal: false,
2885
+ AsyncDisposableStack: false,
2750
2886
  atob: false,
2751
2887
  Blob: false,
2752
2888
  BroadcastChannel: false,
@@ -2763,6 +2899,7 @@ var require_globals = __commonJS({
2763
2899
  CryptoKey: false,
2764
2900
  CustomEvent: false,
2765
2901
  DecompressionStream: false,
2902
+ DisposableStack: false,
2766
2903
  DOMException: false,
2767
2904
  Event: false,
2768
2905
  EventTarget: false,
@@ -2796,6 +2933,7 @@ var require_globals = __commonJS({
2796
2933
  setTimeout: false,
2797
2934
  structuredClone: false,
2798
2935
  SubtleCrypto: false,
2936
+ SuppressedError: false,
2799
2937
  TextDecoder: false,
2800
2938
  TextDecoderStream: false,
2801
2939
  TextEncoder: false,
@@ -2803,6 +2941,7 @@ var require_globals = __commonJS({
2803
2941
  TransformStream: false,
2804
2942
  TransformStreamDefaultController: false,
2805
2943
  URL: false,
2944
+ URLPattern: false,
2806
2945
  URLSearchParams: false,
2807
2946
  WebAssembly: false,
2808
2947
  WebSocket: false,
@@ -2814,12 +2953,14 @@ var require_globals = __commonJS({
2814
2953
  cat: false,
2815
2954
  cd: false,
2816
2955
  chmod: false,
2956
+ cmd: false,
2817
2957
  config: false,
2818
2958
  cp: false,
2819
2959
  dirs: false,
2820
2960
  echo: false,
2821
2961
  env: false,
2822
2962
  error: false,
2963
+ errorCode: false,
2823
2964
  exec: false,
2824
2965
  exit: false,
2825
2966
  find: false,
@@ -2873,6 +3014,9 @@ var require_globals = __commonJS({
2873
3014
  AbortSignal: false,
2874
3015
  addEventListener: false,
2875
3016
  ai: false,
3017
+ AI: false,
3018
+ AICreateMonitor: false,
3019
+ AsyncDisposableStack: false,
2876
3020
  atob: false,
2877
3021
  AudioData: false,
2878
3022
  AudioDecoder: false,
@@ -2910,6 +3054,7 @@ var require_globals = __commonJS({
2910
3054
  DecompressionStream: false,
2911
3055
  DedicatedWorkerGlobalScope: false,
2912
3056
  dispatchEvent: false,
3057
+ DisposableStack: false,
2913
3058
  DOMException: false,
2914
3059
  DOMMatrix: false,
2915
3060
  DOMMatrixReadOnly: false,
@@ -2933,6 +3078,7 @@ var require_globals = __commonJS({
2933
3078
  FileSystemDirectoryHandle: false,
2934
3079
  FileSystemFileHandle: false,
2935
3080
  FileSystemHandle: false,
3081
+ FileSystemObserver: false,
2936
3082
  FileSystemSyncAccessHandle: false,
2937
3083
  FileSystemWritableFileStream: false,
2938
3084
  FontFace: false,
@@ -3004,6 +3150,7 @@ var require_globals = __commonJS({
3004
3150
  importScripts: false,
3005
3151
  indexedDB: false,
3006
3152
  isSecureContext: false,
3153
+ LanguageDetector: false,
3007
3154
  location: false,
3008
3155
  Lock: false,
3009
3156
  LockManager: false,
@@ -3019,6 +3166,7 @@ var require_globals = __commonJS({
3019
3166
  NavigatorUAData: false,
3020
3167
  NetworkInformation: false,
3021
3168
  Notification: false,
3169
+ Observable: false,
3022
3170
  OffscreenCanvas: false,
3023
3171
  OffscreenCanvasRenderingContext2D: false,
3024
3172
  onerror: true,
@@ -3058,11 +3206,13 @@ var require_globals = __commonJS({
3058
3206
  ReadableStreamDefaultController: false,
3059
3207
  ReadableStreamDefaultReader: false,
3060
3208
  removeEventListener: false,
3209
+ ReportBody: false,
3061
3210
  reportError: false,
3062
3211
  ReportingObserver: false,
3063
3212
  Request: false,
3064
3213
  requestAnimationFrame: false,
3065
3214
  Response: false,
3215
+ RestrictionTarget: false,
3066
3216
  RTCDataChannel: false,
3067
3217
  RTCEncodedAudioFrame: false,
3068
3218
  RTCEncodedVideoFrame: false,
@@ -3081,7 +3231,9 @@ var require_globals = __commonJS({
3081
3231
  StorageBucketManager: false,
3082
3232
  StorageManager: false,
3083
3233
  structuredClone: false,
3234
+ Subscriber: false,
3084
3235
  SubtleCrypto: false,
3236
+ SuppressedError: false,
3085
3237
  SyncManager: false,
3086
3238
  TaskController: false,
3087
3239
  TaskPriorityChangeEvent: false,
@@ -3152,6 +3304,7 @@ var require_globals = __commonJS({
3152
3304
  WebTransportDatagramDuplexStream: false,
3153
3305
  WebTransportError: false,
3154
3306
  WGSLLanguageFeatures: false,
3307
+ when: false,
3155
3308
  Worker: false,
3156
3309
  WorkerGlobalScope: false,
3157
3310
  WorkerLocation: false,
@@ -3188,9 +3341,9 @@ var require_globals = __commonJS({
3188
3341
  }
3189
3342
  });
3190
3343
 
3191
- // node_modules/.pnpm/globals@16.0.0/node_modules/globals/index.js
3344
+ // node_modules/.pnpm/globals@16.1.0/node_modules/globals/index.js
3192
3345
  var require_globals2 = __commonJS({
3193
- "node_modules/.pnpm/globals@16.0.0/node_modules/globals/index.js"(exports, module) {
3346
+ "node_modules/.pnpm/globals@16.1.0/node_modules/globals/index.js"(exports, module) {
3194
3347
  "use strict";
3195
3348
  module.exports = require_globals();
3196
3349
  }
@@ -3221,16 +3374,16 @@ var SLOW_RULES = [
3221
3374
  ];
3222
3375
 
3223
3376
  // src/define-config.ts
3224
- import fs3 from "node:fs";
3225
- import process6 from "node:process";
3377
+ import fs3 from "fs";
3378
+ import process6 from "process";
3226
3379
 
3227
3380
  // node_modules/.pnpm/local-pkg@1.1.1/node_modules/local-pkg/dist/index.mjs
3228
- import fs2 from "node:fs";
3229
- import { createRequire as createRequire2 } from "node:module";
3230
- import path2, { dirname as dirname3, join as join2, win32 } from "node:path";
3231
- import process2 from "node:process";
3232
- import fsPromises from "node:fs/promises";
3233
- import { fileURLToPath as fileURLToPath2 } from "node:url";
3381
+ import fs2 from "fs";
3382
+ import { createRequire as createRequire2 } from "module";
3383
+ import path2, { dirname as dirname3, join as join2, win32 } from "path";
3384
+ import process2 from "process";
3385
+ import fsPromises from "fs/promises";
3386
+ import { fileURLToPath as fileURLToPath2 } from "url";
3234
3387
 
3235
3388
  // node_modules/.pnpm/acorn@8.14.1/node_modules/acorn/dist/acorn.mjs
3236
3389
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
@@ -8772,8 +8925,8 @@ Parser.acorn = {
8772
8925
  };
8773
8926
 
8774
8927
  // node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
8775
- import { builtinModules, createRequire } from "node:module";
8776
- import fs, { realpathSync, statSync, promises } from "node:fs";
8928
+ import { builtinModules, createRequire } from "module";
8929
+ import fs, { realpathSync, statSync, promises } from "fs";
8777
8930
 
8778
8931
  // node_modules/.pnpm/ufo@1.5.4/node_modules/ufo/dist/index.mjs
8779
8932
  var r = String.fromCharCode;
@@ -8829,12 +8982,12 @@ var isAbsolute = function(p) {
8829
8982
  };
8830
8983
 
8831
8984
  // node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
8832
- import { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL as pathToFileURL$1 } from "node:url";
8833
- import assert from "node:assert";
8834
- import process$1 from "node:process";
8835
- import path, { dirname as dirname2 } from "node:path";
8836
- import v8 from "node:v8";
8837
- import { format as format2, inspect } from "node:util";
8985
+ import { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL as pathToFileURL$1 } from "url";
8986
+ import assert from "assert";
8987
+ import process$1 from "process";
8988
+ import path, { dirname as dirname2 } from "path";
8989
+ import v8 from "v8";
8990
+ import { format as format2, inspect } from "util";
8838
8991
  var BUILTIN_MODULES = new Set(builtinModules);
8839
8992
  function normalizeSlash(path3) {
8840
8993
  return path3.replace(/\\/g, "/");
@@ -10889,11 +11042,11 @@ var Err = class {
10889
11042
  var fromThrowable = Result.fromThrowable;
10890
11043
 
10891
11044
  // src/utils.ts
10892
- import process3 from "node:process";
11045
+ import process3 from "process";
10893
11046
 
10894
11047
  // src/lager.ts
10895
11048
  import Debug from "debug";
10896
- var debug = Debug("jsse:eslint-config");
11049
+ var dbg = Debug("jsse:eslint-config");
10897
11050
  var LAGER_LEVELS = {
10898
11051
  trace: 10,
10899
11052
  debug: 20,
@@ -11038,7 +11191,7 @@ var parserPlain = {
11038
11191
  })
11039
11192
  };
11040
11193
  function turnOffRules(configs, off) {
11041
- if (off && off.length > 0) {
11194
+ if (off.length > 0) {
11042
11195
  for (const rule of off) {
11043
11196
  log.debug(`turning-off: ${rule}`);
11044
11197
  }
@@ -11118,11 +11271,12 @@ import { default as default2 } from "@eslint-community/eslint-plugin-eslint-comm
11118
11271
  import { default as default3 } from "@typescript-eslint/eslint-plugin";
11119
11272
  import * as parserTs from "@typescript-eslint/parser";
11120
11273
  import { default as default4 } from "eslint-plugin-antfu";
11274
+ import { default as default5 } from "eslint-plugin-de-morgan";
11121
11275
  import * as pluginImport from "eslint-plugin-import-x";
11122
- import { default as default5 } from "eslint-plugin-n";
11123
- import { default as default6 } from "eslint-plugin-perfectionist";
11124
- import { default as default7 } from "eslint-plugin-unicorn";
11125
- import { default as default8 } from "eslint-plugin-unused-imports";
11276
+ import { default as default6 } from "eslint-plugin-n";
11277
+ import { default as default7 } from "eslint-plugin-perfectionist";
11278
+ import { default as default8 } from "eslint-plugin-unicorn";
11279
+ import { default as default9 } from "eslint-plugin-unused-imports";
11126
11280
  async function importPluginUnicorn() {
11127
11281
  const pluginUnicorn = await interopDefault2(import("eslint-plugin-unicorn"));
11128
11282
  return {
@@ -11214,7 +11368,7 @@ async function importPluginStylistic() {
11214
11368
  async function importPluginTailwind() {
11215
11369
  const pluginTailwind = await interopDefault2(
11216
11370
  // @ts-expect-error - bad types
11217
- import("eslint-plugin-tailwindcss")
11371
+ Promise.resolve().then(() => __toESM(require_lib(), 1))
11218
11372
  );
11219
11373
  return { pluginTailwind };
11220
11374
  }
@@ -11223,11 +11377,8 @@ async function safeImportPluginTailwind() {
11223
11377
  const plugin = await importPluginTailwind();
11224
11378
  return ok(plugin);
11225
11379
  } catch (e) {
11226
- return err(
11227
- new Error(
11228
- `Failed to import \`eslint-plugin-tailwindcss\`. You might need to install it. ${e}`
11229
- )
11230
- );
11380
+ const msg = (e instanceof Error ? e.message : String(e)) || `unknown error ${String(e)}`;
11381
+ return err(new Error(msg));
11231
11382
  }
11232
11383
  }
11233
11384
 
@@ -11273,8 +11424,18 @@ var command = async () => {
11273
11424
  ];
11274
11425
  };
11275
11426
 
11276
- // src/configs/comments.ts
11277
- var comments = async () => [
11427
+ // src/configs/de-morgan.ts
11428
+ var deMorgan = async () => {
11429
+ return [
11430
+ {
11431
+ ...default5.configs.recommended,
11432
+ name: "jsse/de-morgan"
11433
+ }
11434
+ ];
11435
+ };
11436
+
11437
+ // src/configs/eslint-comments.ts
11438
+ var eslintComments = async () => [
11278
11439
  {
11279
11440
  name: "jsse/eslint-comments",
11280
11441
  plugins: {
@@ -11467,7 +11628,7 @@ var javascript = async (options) => {
11467
11628
  name: "jsse/javascript",
11468
11629
  plugins: {
11469
11630
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11470
- "unused-imports": default8
11631
+ "unused-imports": default9
11471
11632
  },
11472
11633
  rules: {
11473
11634
  ...eslintjs.configs.recommended.rules,
@@ -11808,8 +11969,15 @@ var jsonc = async (options) => {
11808
11969
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
11809
11970
 
11810
11971
  // src/configs/ts/typescript-rules.ts
11811
- function typescriptRulesTypeAware() {
11972
+ import tseslint from "typescript-eslint";
11973
+ var extractRules = (configs) => {
11974
+ const rules = configs.filter((config) => config.rules !== void 0).map((config) => config.rules ?? {});
11975
+ return Object.assign({}, ...rules);
11976
+ };
11977
+ function typescriptRulesTypeAware(props) {
11978
+ const tsRecomendedRulesTypeChecked = props?.strict ? extractRules(tseslint.configs.strictTypeChecked) : extractRules(tseslint.configs.recommendedTypeChecked);
11812
11979
  return {
11980
+ ...tsRecomendedRulesTypeChecked,
11813
11981
  "@typescript-eslint/await-thenable": "error",
11814
11982
  "@typescript-eslint/no-for-in-array": "error",
11815
11983
  "no-implied-eval": "off",
@@ -11926,8 +12094,10 @@ function typescriptRulesTypeAware() {
11926
12094
  ]
11927
12095
  };
11928
12096
  }
11929
- function typescriptRulesTypeOblivious() {
12097
+ function typescriptRulesTypeOblivious(props) {
12098
+ const tseslintBaseRules = props?.strict ? extractRules(tseslint.configs.strict) : extractRules(tseslint.configs.recommended);
11930
12099
  return {
12100
+ ...tseslintBaseRules,
11931
12101
  eqeqeq: "error",
11932
12102
  camelcase: "off",
11933
12103
  yoda: "error",
@@ -11950,61 +12120,6 @@ function typescriptRulesTypeOblivious() {
11950
12120
  }
11951
12121
  ],
11952
12122
  "@typescript-eslint/adjacent-overload-signatures": "error",
11953
- // "@typescript-eslint/ban-types": [
11954
- // "warn",
11955
- // {
11956
- // extendDefaults: false,
11957
- // types: {
11958
- // String: {
11959
- // message: 'Use "string" instead',
11960
- // fixWith: "string",
11961
- // },
11962
- // Boolean: {
11963
- // message: 'Use "boolean" instead',
11964
- // fixWith: "boolean",
11965
- // },
11966
- // Number: {
11967
- // message: 'Use "number" instead',
11968
- // fixWith: "number",
11969
- // },
11970
- // BigInt: {
11971
- // message: "Use `bigint` instead.",
11972
- // fixWith: "bigint",
11973
- // },
11974
- // Object: {
11975
- // message:
11976
- // "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848",
11977
- // fixWith: "Record<string, unknown>",
11978
- // },
11979
- // object: {
11980
- // message:
11981
- // "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848",
11982
- // fixWith: "Record<string, unknown>",
11983
- // },
11984
- // Symbol: {
11985
- // message: 'Use "symbol" instead',
11986
- // fixWith: "symbol",
11987
- // },
11988
- // Function: {
11989
- // message:
11990
- // 'The "Function" type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with "new".\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.',
11991
- // },
11992
- // // eslint-disable-next-line @typescript-eslint/naming-convention
11993
- // "{}": {
11994
- // message:
11995
- // "The `{}` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead.",
11996
- // fixWith: "Record<string, unknown>",
11997
- // },
11998
- // // eslint-disable-next-line @typescript-eslint/naming-convention
11999
- // "[]": "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.",
12000
- // // eslint-disable-next-line @typescript-eslint/naming-convention
12001
- // "[[]]":
12002
- // "Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.",
12003
- // // eslint-disable-next-line @typescript-eslint/naming-convention
12004
- // "[[[]]]": "Don't use `[[[]]]`. Use `SomeType[][][]` instead.",
12005
- // },
12006
- // },
12007
- // ],
12008
12123
  "@typescript-eslint/consistent-type-assertions": "error",
12009
12124
  "@typescript-eslint/consistent-type-definitions": ["error", "type"],
12010
12125
  "@typescript-eslint/member-ordering": [
@@ -12215,14 +12330,15 @@ function typescriptRulesTypeOblivious() {
12215
12330
  };
12216
12331
  }
12217
12332
  function typescriptRules(props) {
12218
- const { typeAware } = props ?? {};
12219
- if (typeAware === true) {
12333
+ const normalized = { typeAware: false, strict: false, ...props };
12334
+ dbg("building typescript rules: %O", normalized);
12335
+ if (normalized.typeAware) {
12220
12336
  return {
12221
- ...typescriptRulesTypeOblivious(),
12222
- ...typescriptRulesTypeAware()
12337
+ ...typescriptRulesTypeOblivious({ strict: normalized.strict }),
12338
+ ...typescriptRulesTypeAware({ strict: normalized.strict })
12223
12339
  };
12224
12340
  }
12225
- return typescriptRulesTypeOblivious();
12341
+ return typescriptRulesTypeOblivious({ strict: normalized.strict });
12226
12342
  }
12227
12343
 
12228
12344
  // src/configs/markdown.ts
@@ -12237,13 +12353,11 @@ var markdown = async (options) => {
12237
12353
  "off"
12238
12354
  ])
12239
12355
  );
12240
- const processor = mergeProcessors(
12241
- [
12242
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12243
- pluginMarkdown.processors.markdown,
12244
- processorPassThrough
12245
- ].filter((processor2) => processor2 !== void 0)
12246
- );
12356
+ const processor = mergeProcessors([
12357
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12358
+ pluginMarkdown.processors.markdown,
12359
+ processorPassThrough
12360
+ ]);
12247
12361
  return [
12248
12362
  {
12249
12363
  name: "jsse/markdown/setup",
@@ -12352,7 +12466,7 @@ var n = async () => {
12352
12466
  {
12353
12467
  name: "jsse/n",
12354
12468
  plugins: {
12355
- n: default5
12469
+ n: default6
12356
12470
  },
12357
12471
  rules: {
12358
12472
  "n/handle-callback-err": ["error", "^(err|error)$"],
@@ -12402,7 +12516,7 @@ var perfectionist = async () => {
12402
12516
  name: "jsse/perfectionist",
12403
12517
  plugins: {
12404
12518
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
12405
- perfectionist: default6
12519
+ perfectionist: default7
12406
12520
  },
12407
12521
  rules: {
12408
12522
  "perfectionist/sort-exports": [
@@ -12580,7 +12694,7 @@ var prettier = async () => {
12580
12694
  import { fixupPluginRules } from "@eslint/compat";
12581
12695
 
12582
12696
  // src/configs/ts/typescript-language-options.ts
12583
- import process4 from "node:process";
12697
+ import process4 from "process";
12584
12698
  function typescriptLanguageOptions(options) {
12585
12699
  const { componentExts = [], react: react2, tsconfig } = options || {};
12586
12700
  const tsOptions = tsconfig ? {
@@ -12917,6 +13031,7 @@ var sortPackageJson = async () => {
12917
13031
  "packageManager",
12918
13032
  "description",
12919
13033
  "author",
13034
+ "contributors",
12920
13035
  "license",
12921
13036
  "funding",
12922
13037
  "homepage",
@@ -12925,6 +13040,7 @@ var sortPackageJson = async () => {
12925
13040
  "keywords",
12926
13041
  "categories",
12927
13042
  "sideEffects",
13043
+ "imports",
12928
13044
  "exports",
12929
13045
  "main",
12930
13046
  "module",
@@ -12956,19 +13072,30 @@ var sortPackageJson = async () => {
12956
13072
  },
12957
13073
  {
12958
13074
  order: { type: "asc" },
12959
- pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$"
13075
+ pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"
12960
13076
  },
12961
13077
  {
12962
13078
  order: { type: "asc" },
12963
- pathPattern: "^resolutions$"
12964
- },
12965
- {
12966
- order: { type: "asc" },
12967
- pathPattern: "^pnpm.overrides$"
13079
+ pathPattern: "^(?:resolutions|overrides|pnpm.overrides)$"
12968
13080
  },
12969
13081
  {
12970
13082
  order: ["types", "import", "require", "default"],
12971
13083
  pathPattern: "^exports.*$"
13084
+ },
13085
+ {
13086
+ order: [
13087
+ "pre-commit",
13088
+ "prepare-commit-msg",
13089
+ "commit-msg",
13090
+ "post-commit",
13091
+ "pre-rebase",
13092
+ "post-rewrite",
13093
+ "post-checkout",
13094
+ "post-merge",
13095
+ "pre-push",
13096
+ "pre-auto-gc"
13097
+ ],
13098
+ pathPattern: "^(?:gitHooks|husky|simple-git-hooks)$"
12972
13099
  }
12973
13100
  ]
12974
13101
  }
@@ -13110,9 +13237,7 @@ var sortTsconfig = async (options) => {
13110
13237
  };
13111
13238
 
13112
13239
  // src/configs/stylistic.ts
13113
- function jsxStylistic({
13114
- indent
13115
- }) {
13240
+ function jsxStylistic({ indent }) {
13116
13241
  return {
13117
13242
  "@stylistic/jsx-curly-brace-presence": [
13118
13243
  "error",
@@ -13149,60 +13274,8 @@ var stylistic = async (options) => {
13149
13274
  ];
13150
13275
  };
13151
13276
 
13152
- // src/configs/tailwind.ts
13153
- var TAILWIND_ESLINT_SETTINGS_DEFAULT = {
13154
- // These are the default values but feel free to customize
13155
- callees: ["classnames", "clsx", "ctl", "cn", "cx", "twMerge", "twJoin"],
13156
- classRegex: "^class(Name)?$",
13157
- // can be modified to support custom attributes. E.g. "^tw$" for `twin.macro`
13158
- config: "tailwind.config.js",
13159
- // returned from `loadConfig()` utility if not provided
13160
- cssFiles: ["**/*.css", "!**/node_modules", "!**/.*", "!**/dist", "!**/build"],
13161
- cssFilesRefreshRate: 5e3,
13162
- removeDuplicates: true,
13163
- skipClassAttribute: false,
13164
- tags: [],
13165
- // can be set to e.g. ['tw'] for use in tw`bg-blue`
13166
- whitelist: []
13167
- };
13168
- function tailwindSettings(options) {
13169
- if (typeof options === "boolean") {
13170
- return TAILWIND_ESLINT_SETTINGS_DEFAULT;
13171
- }
13172
- return { ...TAILWIND_ESLINT_SETTINGS_DEFAULT, ...options };
13173
- }
13174
- var tailwind = async (options) => {
13175
- const importResult = await safeImportPluginTailwind();
13176
- return importResult.match(
13177
- ({ pluginTailwind }) => {
13178
- return [
13179
- {
13180
- files: [GLOB_SRC],
13181
- name: "jsse/tailwind/rules",
13182
- plugins: {
13183
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13184
- tailwindcss: pluginTailwind
13185
- },
13186
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13187
- rules: {
13188
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
13189
- ...pluginTailwind.configs.recommended.rules
13190
- },
13191
- settings: {
13192
- tailwindcss: tailwindSettings(options)
13193
- }
13194
- }
13195
- ];
13196
- },
13197
- (error) => {
13198
- log.error(error.message);
13199
- return [];
13200
- }
13201
- );
13202
- };
13203
-
13204
13277
  // src/configs/ts/parser.ts
13205
- import process5 from "node:process";
13278
+ import process5 from "process";
13206
13279
  function autoUseParserService(options) {
13207
13280
  if (options.useProjectService !== void 0) {
13208
13281
  return options.useProjectService;
@@ -13222,12 +13295,13 @@ function typescriptParser(options) {
13222
13295
  } = options;
13223
13296
  const typeAware = !!tsconfig;
13224
13297
  if (useProjectService) {
13225
- debug("ts parser-options using `projectService`project service");
13298
+ dbg("ts parser-options using `projectService`project service");
13226
13299
  return {
13227
13300
  files,
13228
- ...ignores2 ? { ignores: ignores2 } : {},
13301
+ ...ignores2.length > 0 ? { ignores: ignores2 } : {},
13229
13302
  languageOptions: {
13230
13303
  parser: parserTs,
13304
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13231
13305
  parserOptions: {
13232
13306
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
13233
13307
  jsxPragma: react2 ? "React" : void 0,
@@ -13246,14 +13320,15 @@ function typescriptParser(options) {
13246
13320
  name: name ?? `jsse/typescript/${typeAware ? "type-aware-parser" : "parser"}`
13247
13321
  };
13248
13322
  }
13249
- debug(
13323
+ dbg(
13250
13324
  "ts parser-options NOT using `projectService`project service - using `project`"
13251
13325
  );
13252
13326
  return {
13253
13327
  files,
13254
- ...ignores2 ? { ignores: ignores2 } : {},
13328
+ ...ignores2.length > 0 ? { ignores: ignores2 } : {},
13255
13329
  languageOptions: {
13256
13330
  parser: parserTs,
13331
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13257
13332
  parserOptions: {
13258
13333
  extraFileExtensions: componentExts.map((ext) => `.${ext}`),
13259
13334
  jsxPragma: react2 ? "React" : void 0,
@@ -13272,6 +13347,7 @@ function typescriptParser(options) {
13272
13347
 
13273
13348
  // src/configs/ts/typescript.ts
13274
13349
  var typescript = async (options) => {
13350
+ dbg("typescript-options: %O", options);
13275
13351
  const {
13276
13352
  componentExts = [],
13277
13353
  filesTypeAware = [GLOB_TS, GLOB_TSX],
@@ -13280,8 +13356,9 @@ var typescript = async (options) => {
13280
13356
  parserOptions = {},
13281
13357
  prefix,
13282
13358
  react: react2 = false,
13359
+ strict = false,
13283
13360
  tsconfig: tsconfigPath,
13284
- typeAware
13361
+ typeAware = true
13285
13362
  } = options ?? {};
13286
13363
  const parserConfigs = typeAware ? [
13287
13364
  typescriptParser({
@@ -13319,11 +13396,12 @@ var typescript = async (options) => {
13319
13396
  ...default3.configs.strict?.rules,
13320
13397
  "no-invalid-this": "off",
13321
13398
  ...typescriptRules({
13322
- typeAware: false
13399
+ strict,
13400
+ typeAware
13323
13401
  }),
13324
13402
  ...overrides
13325
13403
  };
13326
- return [
13404
+ const tsEslintConfigs = [
13327
13405
  {
13328
13406
  // Install the plugins without globs, so they can be configured separately.
13329
13407
  name: "jsse/typescript/setup",
@@ -13333,30 +13411,36 @@ var typescript = async (options) => {
13333
13411
  }
13334
13412
  },
13335
13413
  ...parserConfigs,
13414
+ // ========================================================================
13415
+ // RULES - NOT TYPE AWARE
13416
+ // ========================================================================
13336
13417
  {
13337
13418
  // only apply ts rules to ts files!
13338
13419
  files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
13339
13420
  name: "jsse/typescript/rules",
13340
13421
  // may not need to rename all rules here........
13341
- rules: renameRules(tsRules || {}, tsPrefix, tsPrefixTo)
13342
- },
13343
- ...typeAware ? [
13344
- {
13345
- files: filesTypeAware,
13346
- ignores: ignoresTypeAware,
13347
- name: "jsse/typescript/rules-type-aware",
13348
- rules: renameRules(
13349
- {
13350
- ...typescriptRules({
13351
- typeAware: true
13352
- }),
13353
- ...overrides
13354
- },
13355
- tsPrefix,
13356
- tsPrefixTo
13357
- )
13358
- }
13359
- ] : [],
13422
+ rules: renameRules(tsRules, tsPrefix, tsPrefixTo)
13423
+ }
13424
+ ];
13425
+ if (typeAware) {
13426
+ tsEslintConfigs.push({
13427
+ files: filesTypeAware,
13428
+ ignores: ignoresTypeAware,
13429
+ name: "jsse/typescript/rules-type-aware",
13430
+ rules: renameRules(
13431
+ {
13432
+ ...typescriptRules({
13433
+ strict,
13434
+ typeAware: true
13435
+ }),
13436
+ ...overrides
13437
+ },
13438
+ tsPrefix,
13439
+ tsPrefixTo
13440
+ )
13441
+ });
13442
+ }
13443
+ tsEslintConfigs.push(
13360
13444
  {
13361
13445
  files: ["**/*.d.ts"],
13362
13446
  name: "jsse/typescript:disables/dts",
@@ -13383,7 +13467,8 @@ var typescript = async (options) => {
13383
13467
  "@typescript-eslint/no-var-requires": "off"
13384
13468
  }
13385
13469
  }
13386
- ];
13470
+ );
13471
+ return tsEslintConfigs;
13387
13472
  };
13388
13473
 
13389
13474
  // src/configs/tsdoc.ts
@@ -13432,10 +13517,10 @@ var unicorn = async () => {
13432
13517
  name: "jsse/unicorn",
13433
13518
  plugins: {
13434
13519
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13435
- unicorn: default7
13520
+ unicorn: default8
13436
13521
  },
13437
13522
  rules: {
13438
- ...unicornRecommended(default7),
13523
+ ...unicornRecommended(default8),
13439
13524
  ...unicornOff(),
13440
13525
  "unicorn/better-regex": "error",
13441
13526
  "unicorn/consistent-empty-array-spread": "error",
@@ -13615,6 +13700,7 @@ var DEBUG = ["1", "true", "t", "on", "yes", "y"].includes(
13615
13700
  process6.env.DEBUG ?? ""
13616
13701
  );
13617
13702
  function defaultOptions2() {
13703
+ const typescriptExists = isPackageExists("typescript");
13618
13704
  return {
13619
13705
  command: true,
13620
13706
  componentExts: [],
@@ -13633,7 +13719,8 @@ function defaultOptions2() {
13633
13719
  stylistic: true,
13634
13720
  test: true,
13635
13721
  tsPrefix: "@typescript-eslint",
13636
- typescript: isPackageExists("typescript")
13722
+ typeAware: false,
13723
+ typescript: typescriptExists
13637
13724
  };
13638
13725
  }
13639
13726
  function normalizeOptions(options = {}) {
@@ -13643,14 +13730,19 @@ function normalizeOptions(options = {}) {
13643
13730
  ...options.fast ? [...SLOW_RULES] : []
13644
13731
  ])
13645
13732
  ].sort(
13646
- (a, b) => a.localeCompare(b, void 0, { numeric: true, sensitivity: "base" })
13733
+ (a, b) => (
13734
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
13735
+ a.localeCompare(b, void 0, { numeric: true, sensitivity: "base" })
13736
+ )
13647
13737
  );
13648
13738
  const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
13649
13739
  if (stylisticOptions && !("jsx" in stylisticOptions)) {
13650
13740
  stylisticOptions.jsx = options.jsx ?? true;
13651
13741
  }
13742
+ const defaults = defaultOptions2();
13652
13743
  return {
13653
- ...defaultOptions2(),
13744
+ ...defaults,
13745
+ typeAware: options.typeAware ?? defaults.typeAware,
13654
13746
  ...options,
13655
13747
  off,
13656
13748
  reportUnusedDisableDirectives: options.reportUnusedDisableDirectives ?? !options.fast,
@@ -13660,26 +13752,34 @@ function normalizeOptions(options = {}) {
13660
13752
  async function jsse(options = {}, ...userConfigs) {
13661
13753
  const normalizedOptions = normalizeOptions(options);
13662
13754
  const {
13755
+ command: enableCommand,
13663
13756
  componentExts,
13664
- debug: debug2,
13757
+ debug,
13665
13758
  gitignore: enableGitignore,
13666
13759
  isInEditor: isInEditor2,
13760
+ jsonc: enableJsonc,
13761
+ markdown: enableMarkdown,
13667
13762
  off,
13668
13763
  overrides = {},
13669
13764
  prettier: enablePrettier,
13670
13765
  react: enableReact,
13671
13766
  reportUnusedDisableDirectives,
13767
+ rootId,
13768
+ // default to "jsse"
13672
13769
  stylistic: stylisticOptions,
13770
+ tailwind: tailwindOptions,
13771
+ test: enableTest,
13673
13772
  tsPrefix,
13674
13773
  typeAware,
13675
- typescript: enableTypeScript
13774
+ typescript: typescriptOptions,
13775
+ yaml: enableYaml
13676
13776
  } = normalizedOptions;
13677
- if (debug2 || process6.argv.includes("--debug")) {
13777
+ if (debug || process6.argv.includes("--debug")) {
13678
13778
  log.level = "debug";
13679
13779
  }
13680
13780
  log.debug("@jsse/eslint-config debug=true");
13681
13781
  log.debug("@jsse/eslint-config isInEditor", isInEditor2);
13682
- log.debug("@jsse/eslint-config enableTypeScript", enableTypeScript);
13782
+ log.debug("@jsse/eslint-config enableTypeScript", typescriptOptions);
13683
13783
  log.debug("@jsse/eslint-config normalizedOptions", normalizedOptions);
13684
13784
  const configs = [];
13685
13785
  if (enableGitignore) {
@@ -13711,7 +13811,7 @@ async function jsse(options = {}, ...userConfigs) {
13711
13811
  overrides: overrides.javascript,
13712
13812
  reportUnusedDisableDirectives
13713
13813
  }),
13714
- comments(),
13814
+ eslintComments(),
13715
13815
  n(),
13716
13816
  jsdoc(),
13717
13817
  imports({
@@ -13719,14 +13819,15 @@ async function jsse(options = {}, ...userConfigs) {
13719
13819
  }),
13720
13820
  unicorn(),
13721
13821
  antfu(),
13722
- perfectionist()
13822
+ perfectionist(),
13823
+ deMorgan()
13723
13824
  );
13724
- if (normalizedOptions.command) {
13825
+ if (enableCommand) {
13725
13826
  configs.push(command());
13726
13827
  }
13727
- if (enableTypeScript) {
13828
+ if (typescriptOptions) {
13728
13829
  const tscfg = typescript({
13729
- ...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
13830
+ ...typeof typescriptOptions === "boolean" ? {} : typescriptOptions,
13730
13831
  componentExts,
13731
13832
  overrides: overrides.typescript,
13732
13833
  prefix: {
@@ -13738,14 +13839,14 @@ async function jsse(options = {}, ...userConfigs) {
13738
13839
  });
13739
13840
  configs.push(tscfg, tsdoc());
13740
13841
  }
13741
- if (normalizedOptions.markdown) {
13842
+ if (enableMarkdown) {
13742
13843
  configs.push(markdown());
13743
13844
  }
13744
- if (normalizedOptions.yaml) {
13845
+ if (enableYaml) {
13745
13846
  const ymlConfig = yml();
13746
13847
  configs.push(ymlConfig);
13747
13848
  }
13748
- if (normalizedOptions.react) {
13849
+ if (enableReact) {
13749
13850
  configs.push(
13750
13851
  react({
13751
13852
  // use react refresh if not explicitly disabled w/ 'false'
@@ -13759,7 +13860,7 @@ async function jsse(options = {}, ...userConfigs) {
13759
13860
  if (stylisticOptions) {
13760
13861
  configs.push(stylistic(stylisticOptions === true ? {} : stylisticOptions));
13761
13862
  }
13762
- if (normalizedOptions.test) {
13863
+ if (enableTest) {
13763
13864
  configs.push(
13764
13865
  vitest({
13765
13866
  isInEditor: isInEditor2,
@@ -13771,7 +13872,7 @@ async function jsse(options = {}, ...userConfigs) {
13771
13872
  })
13772
13873
  );
13773
13874
  }
13774
- if (normalizedOptions.jsonc ?? true) {
13875
+ if (enableJsonc ?? true) {
13775
13876
  configs.push(
13776
13877
  jsonc({
13777
13878
  overrides: overrides.jsonc,
@@ -13783,16 +13884,8 @@ async function jsse(options = {}, ...userConfigs) {
13783
13884
  })
13784
13885
  );
13785
13886
  }
13786
- if (normalizedOptions.tailwind) {
13787
- try {
13788
- configs.push(
13789
- tailwind(
13790
- normalizedOptions.tailwind === true ? {} : normalizedOptions.tailwind
13791
- )
13792
- );
13793
- } catch (e) {
13794
- log.error("Tailwind config failed", e);
13795
- }
13887
+ if (tailwindOptions) {
13888
+ console.error("Tailwind configuration is deprecate4d...");
13796
13889
  }
13797
13890
  if (normalizedOptions.prettier) {
13798
13891
  configs.push(prettier());
@@ -13810,13 +13903,10 @@ async function jsse(options = {}, ...userConfigs) {
13810
13903
  if (off && off.length > 0) {
13811
13904
  turnOffRules(combinedConfigs, off);
13812
13905
  }
13813
- if (normalizedOptions.rootId !== "jsse") {
13906
+ if (rootId !== "jsse") {
13814
13907
  for (const config of combinedConfigs) {
13815
13908
  if (config.name && config.name.startsWith("jsse/")) {
13816
- config.name = config.name.replace(
13817
- "jsse/",
13818
- `${normalizedOptions.rootId}/`
13819
- );
13909
+ config.name = config.name.replace("jsse/", `${rootId}/`);
13820
13910
  }
13821
13911
  }
13822
13912
  }
@@ -13860,9 +13950,30 @@ async function defineConfig(options = {}, ...userConfigs) {
13860
13950
  }
13861
13951
 
13862
13952
  // src/generated/version.ts
13863
- var VERSION = "0.3.6";
13953
+ var VERSION = "0.4.0";
13864
13954
 
13865
13955
  // src/presets.ts
13956
+ var makePresetFn = (cfgFunctions) => {
13957
+ return async () => {
13958
+ const results = await Promise.allSettled(cfgFunctions.map((fn) => fn()));
13959
+ const ok2 = [];
13960
+ const err2 = [];
13961
+ for (const result of results) {
13962
+ if (result.status === "fulfilled") {
13963
+ ok2.push(...result.value);
13964
+ } else {
13965
+ err2.push(result.reason);
13966
+ }
13967
+ }
13968
+ if (err2.length > 0) {
13969
+ const errorMessage = `Some preset functions failed: ${err2.map((e) => {
13970
+ return e instanceof Error ? e.message : JSON.stringify(e);
13971
+ }).join(", ")}`;
13972
+ throw new Error(errorMessage);
13973
+ }
13974
+ return ok2;
13975
+ };
13976
+ };
13866
13977
  var jsseReact = (options, ...configs) => {
13867
13978
  return jsse(
13868
13979
  {
@@ -13877,6 +13988,29 @@ var jsseReact = (options, ...configs) => {
13877
13988
  ...configs
13878
13989
  );
13879
13990
  };
13991
+ var presetJavascript = makePresetFn([
13992
+ ignores,
13993
+ javascript,
13994
+ eslintComments,
13995
+ imports,
13996
+ unicorn,
13997
+ n,
13998
+ jsdoc,
13999
+ deMorgan
14000
+ ]);
14001
+ var presetJsonc = makePresetFn([
14002
+ jsonc,
14003
+ sortPackageJson,
14004
+ sortTsconfig
14005
+ // ...sortPnpmWorkspace(),
14006
+ ]);
14007
+ var presetLangsExtensions = makePresetFn([markdown, yml, presetJsonc]);
14008
+ var presetBasic = makePresetFn([presetJavascript, typescript]);
14009
+ var presetAll = makePresetFn([
14010
+ presetBasic,
14011
+ presetLangsExtensions,
14012
+ command
14013
+ ]);
13880
14014
  export {
13881
14015
  SLOW_RULES,
13882
14016
  VERSION,
@@ -13909,13 +14043,14 @@ export {
13909
14043
  parserPlain,
13910
14044
  parserTs,
13911
14045
  default4 as pluginAntfu,
14046
+ default5 as pluginDeMorgan,
13912
14047
  default2 as pluginEslintComments,
13913
14048
  pluginImport,
13914
- default5 as pluginN,
13915
- default6 as pluginPerfectionist,
14049
+ default6 as pluginN,
14050
+ default7 as pluginPerfectionist,
13916
14051
  default3 as pluginTs,
13917
- default7 as pluginUnicorn,
13918
- default8 as pluginUnusedImports,
14052
+ default8 as pluginUnicorn,
14053
+ default9 as pluginUnusedImports,
13919
14054
  renameRules,
13920
14055
  safeImportPluginTailwind,
13921
14056
  turnOffRules,