zirka 0.0.25

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.
@@ -0,0 +1,1296 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
+ };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+
17
+ // prettier/index.ts
18
+ function getPrettierConfig(options) {
19
+ if (options === true) {
20
+ return basePrettierConfig;
21
+ }
22
+ return {
23
+ ...basePrettierConfig,
24
+ plugins: [...basePrettierConfig.plugins ?? [], ...options.tailwind ? ["prettier-plugin-tailwindcss"] : []]
25
+ };
26
+ }
27
+ var basePrettierConfig;
28
+ var init_prettier = __esm({
29
+ "prettier/index.ts"() {
30
+ "use strict";
31
+ basePrettierConfig = {
32
+ endOfLine: "lf",
33
+ tabWidth: 2,
34
+ printWidth: 120,
35
+ useTabs: false,
36
+ singleQuote: false,
37
+ trailingComma: "all",
38
+ plugins: ["prettier-plugin-packagejson"]
39
+ };
40
+ }
41
+ });
42
+
43
+ // eslint/utils/transform-severity.ts
44
+ var transform_severity_exports = {};
45
+ __export(transform_severity_exports, {
46
+ transformSeverity: () => transformSeverity
47
+ });
48
+ function transformSeverity(configsToProcess, targetSeverity) {
49
+ const transformedConfigs = [];
50
+ for (const singleConfig of configsToProcess) {
51
+ const newConfig = { ...singleConfig };
52
+ if (newConfig.rules) {
53
+ const newRules = {};
54
+ for (const ruleId in newConfig.rules) {
55
+ const ruleConfig = newConfig.rules[ruleId];
56
+ if (!ruleConfig) {
57
+ continue;
58
+ }
59
+ const [currentSeverity, ruleOptions, isOriginalRuleArray] = Array.isArray(ruleConfig) ? (
60
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- ESLint's 'RuleEntry' is typed with any[]
61
+ [ruleConfig[0], ruleConfig.slice(1), true]
62
+ ) : [ruleConfig, [], false];
63
+ let newRuleEntry = ruleConfig;
64
+ if (targetSeverity === "warn" /* Warn */) {
65
+ if (currentSeverity === "error" /* Error */ || currentSeverity === 2 /* Error */) {
66
+ newRuleEntry = isOriginalRuleArray ? ["warn" /* Warn */, ...ruleOptions] : "warn" /* Warn */;
67
+ }
68
+ }
69
+ if (targetSeverity === "error" /* Error */) {
70
+ if (currentSeverity === "warn" /* Warn */ || currentSeverity === 1 /* Warn */) {
71
+ newRuleEntry = isOriginalRuleArray ? ["error" /* Error */, ...ruleOptions] : "error" /* Error */;
72
+ }
73
+ }
74
+ newRules[ruleId] = newRuleEntry;
75
+ }
76
+ newConfig.rules = newRules;
77
+ }
78
+ transformedConfigs.push(newConfig);
79
+ }
80
+ return transformedConfigs;
81
+ }
82
+ var init_transform_severity = __esm({
83
+ "eslint/utils/transform-severity.ts"() {
84
+ "use strict";
85
+ init_styleguide();
86
+ }
87
+ });
88
+
89
+ // eslint/utils/constants.ts
90
+ var ECMA_VERSION, JAVASCRIPT_FILES, TYPESCRIPT_FILES;
91
+ var init_constants = __esm({
92
+ "eslint/utils/constants.ts"() {
93
+ "use strict";
94
+ ECMA_VERSION = "latest";
95
+ JAVASCRIPT_FILES = ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.jsx"];
96
+ TYPESCRIPT_FILES = ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"];
97
+ }
98
+ });
99
+
100
+ // eslint/rules/best-practice.ts
101
+ var bestPracticeRules;
102
+ var init_best_practice = __esm({
103
+ "eslint/rules/best-practice.ts"() {
104
+ "use strict";
105
+ bestPracticeRules = {
106
+ /**
107
+ * Require return statements in array methods callbacks.
108
+ * 🚫 Not fixable - https://eslint.org/docs/rules/array-callback-return
109
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
110
+ */
111
+ "array-callback-return": ["error", { allowImplicit: true }],
112
+ /**
113
+ * Treat `var` statements as if they were block scoped.
114
+ * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
115
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
116
+ */
117
+ "block-scoped-var": "error",
118
+ /**
119
+ * Require curly braces for multiline blocks.
120
+ * 🔧 Fixable - https://eslint.org/docs/rules/curly
121
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
122
+ */
123
+ curly: ["warn", "multi-line"],
124
+ /**
125
+ * Require default clauses in switch statements to be last (if used).
126
+ * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
127
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
128
+ */
129
+ "default-case-last": "error",
130
+ /**
131
+ * Require triple equals (`===` and `!==`).
132
+ * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
133
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
134
+ */
135
+ eqeqeq: "error",
136
+ /**
137
+ * Require grouped accessor pairs in object literals and classes.
138
+ * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
139
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
140
+ */
141
+ "grouped-accessor-pairs": "error",
142
+ /**
143
+ * Disallow use of `alert()`.
144
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
145
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
146
+ */
147
+ "no-alert": "error",
148
+ /**
149
+ * Disallow use of `caller`/`callee`.
150
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
151
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
152
+ */
153
+ "no-caller": "error",
154
+ /**
155
+ * Disallow returning value in constructor.
156
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
157
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
158
+ */
159
+ "no-constructor-return": "error",
160
+ /**
161
+ * Disallow using an `else` if the `if` block contains a return.
162
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
163
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
164
+ */
165
+ "no-else-return": "warn",
166
+ /**
167
+ * Disallow `eval()`.
168
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
169
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
170
+ */
171
+ "no-eval": "error",
172
+ /**
173
+ * Disallow extending native objects.
174
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
175
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
176
+ */
177
+ "no-extend-native": "error",
178
+ /**
179
+ * Disallow unnecessary function binding.
180
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
181
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
182
+ */
183
+ "no-extra-bind": "error",
184
+ /**
185
+ * Disallow unnecessary labels.
186
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
187
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
188
+ */
189
+ "no-extra-label": "error",
190
+ /**
191
+ * Disallow floating decimals.
192
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
193
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
194
+ */
195
+ "no-floating-decimal": "error",
196
+ /**
197
+ * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
198
+ * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
199
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
200
+ */
201
+ "no-implicit-coercion": "error",
202
+ /**
203
+ * Disallow use of `eval()`-like methods.
204
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-implied-eval
205
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
206
+ */
207
+ "no-implied-eval": "error",
208
+ /**
209
+ * Disallow usage of `__iterator__` property.
210
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
211
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
212
+ */
213
+ "no-iterator": "error",
214
+ /**
215
+ * Disallow use of labels for anything other than loops and switches.
216
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
217
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
218
+ */
219
+ "no-labels": ["error"],
220
+ /**
221
+ * Disallow unnecessary nested blocks.
222
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
223
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
224
+ */
225
+ "no-lone-blocks": "error",
226
+ /**
227
+ * Disallow `new` for side effects.
228
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
229
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
230
+ */
231
+ "no-new": "error",
232
+ /**
233
+ * Disallow function constructors.
234
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
235
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
236
+ */
237
+ "no-new-func": "error",
238
+ /**
239
+ * Disallow primitive wrapper instances, such as `new String('foo')`.
240
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
241
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
242
+ */
243
+ "no-new-wrappers": "error",
244
+ /**
245
+ * Disallow use of octal escape sequences in string literals.
246
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
247
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
248
+ */
249
+ "no-octal-escape": "error",
250
+ /**
251
+ * Disallow reassignment of function parameters.
252
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
253
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
254
+ */
255
+ "no-param-reassign": "error",
256
+ /**
257
+ * Disallow usage of the deprecated `__proto__` property.
258
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
259
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
260
+ */
261
+ "no-proto": "error",
262
+ /**
263
+ * Disallow assignment in `return` statement.
264
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
265
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
266
+ */
267
+ "no-return-assign": "error",
268
+ /**
269
+ * Disallow use of `javascript:` urls.
270
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
271
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
272
+ */
273
+ "no-script-url": "error",
274
+ /**
275
+ * Disallow comparisons where both sides are exactly the same.
276
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
277
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
278
+ */
279
+ "no-self-compare": "error",
280
+ /**
281
+ * Disallow use of comma operator.
282
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
283
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
284
+ */
285
+ "no-sequences": "error",
286
+ /**
287
+ * Disallow unnecessary `.call()` and `.apply()`.
288
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
289
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
290
+ */
291
+ "no-useless-call": "error",
292
+ /**
293
+ * Disallow unnecessary concatenation of strings.
294
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
295
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
296
+ */
297
+ "no-useless-concat": "error",
298
+ /**
299
+ * Disallow redundant return statements.
300
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
301
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
302
+ */
303
+ "no-useless-return": "warn",
304
+ /**
305
+ * Require using named capture groups in regular expressions.
306
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
307
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
308
+ */
309
+ "prefer-named-capture-group": "error",
310
+ /**
311
+ * Require using Error objects as Promise rejection reasons.
312
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
313
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
314
+ */
315
+ "prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
316
+ /**
317
+ * Disallow use of the RegExp constructor in favor of regular expression literals.
318
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
319
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
320
+ */
321
+ "prefer-regex-literals": "error",
322
+ /**
323
+ * Disallow "Yoda conditions", ensuring the comparison.
324
+ * 🔧 Fixable - https://eslint.org/docs/rules/yoda
325
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
326
+ */
327
+ yoda: "warn"
328
+ };
329
+ }
330
+ });
331
+
332
+ // eslint/rules/es6.ts
333
+ var es6Rules;
334
+ var init_es6 = __esm({
335
+ "eslint/rules/es6.ts"() {
336
+ "use strict";
337
+ es6Rules = {
338
+ /**
339
+ * Disallow useless computed property keys.
340
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-computed-key
341
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
342
+ */
343
+ "no-useless-computed-key": "warn",
344
+ /**
345
+ * Disallow renaming import, export, and destructured assignments to the same name.
346
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-rename
347
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
348
+ */
349
+ "no-useless-rename": "warn",
350
+ /**
351
+ * Require `let` or `const` instead of `var`.
352
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-var
353
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
354
+ */
355
+ "no-var": "error",
356
+ /**
357
+ * Require object literal shorthand syntax.
358
+ * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand
359
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
360
+ */
361
+ "object-shorthand": "warn",
362
+ /**
363
+ * Require default to `const` instead of `let`.
364
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const
365
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
366
+ */
367
+ "prefer-const": "warn",
368
+ /**
369
+ * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.
370
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals
371
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
372
+ */
373
+ "prefer-numeric-literals": "error",
374
+ /**
375
+ * Require using rest parameters instead of `arguments`.
376
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params
377
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
378
+ */
379
+ "prefer-rest-params": "error",
380
+ /**
381
+ * Require using spread syntax instead of `.apply()`.
382
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread
383
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
384
+ */
385
+ "prefer-spread": "error",
386
+ /**
387
+ * Require using template literals instead of string concatenation.
388
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template
389
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
390
+ */
391
+ "prefer-template": "warn",
392
+ /**
393
+ * Require a `Symbol` description.
394
+ * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description
395
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
396
+ */
397
+ "symbol-description": "error"
398
+ };
399
+ }
400
+ });
401
+
402
+ // eslint/rules/import.ts
403
+ var importRules, importOverrides;
404
+ var init_import = __esm({
405
+ "eslint/rules/import.ts"() {
406
+ "use strict";
407
+ importRules = {
408
+ /**
409
+ * Disallow non-import statements appearing before import statements.
410
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
411
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
412
+ */
413
+ "import/first": "error",
414
+ /**
415
+ * Require a newline after the last import/require.
416
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
417
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
418
+ */
419
+ "import/newline-after-import": "warn",
420
+ /**
421
+ * Disallow import of modules using absolute paths.
422
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
423
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
424
+ */
425
+ "import/no-absolute-path": "error",
426
+ /**
427
+ * Disallow cyclical dependencies between modules.
428
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
429
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
430
+ */
431
+ "import/no-cycle": "error",
432
+ /**
433
+ * Disallow duplicate imports from the same module.
434
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md
435
+ * Source: Added by bredansky → https://github.com/bredansky
436
+ */
437
+ "import/no-duplicates": ["error", { "prefer-inline": true }],
438
+ /**
439
+ * Disallow default exports.
440
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
441
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
442
+ */
443
+ "import/no-default-export": "error",
444
+ /**
445
+ * Disallow the use of extraneous packages.
446
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
447
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
448
+ */
449
+ "import/no-extraneous-dependencies": ["error", { includeTypes: true }],
450
+ /**
451
+ * Disallow mutable exports.
452
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
453
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
454
+ */
455
+ "import/no-mutable-exports": "error",
456
+ /**
457
+ * Disallow importing packages through relative paths.
458
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
459
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
460
+ */
461
+ "import/no-relative-packages": "warn",
462
+ /**
463
+ * Disallow a module from importing itself.
464
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
465
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
466
+ */
467
+ "import/no-self-import": "error",
468
+ /**
469
+ * Ensures that there are no useless path segments.
470
+ * 🚫 Not fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
471
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
472
+ */
473
+ "import/no-useless-path-segments": ["error"],
474
+ /**
475
+ * Enforce a module import order convention.
476
+ * 🔧 Fixable - https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
477
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
478
+ */
479
+ "import/order": [
480
+ "warn",
481
+ {
482
+ groups: [
483
+ "builtin",
484
+ // Node.js built-in modules
485
+ "external",
486
+ // Packages
487
+ "internal",
488
+ // Aliased modules
489
+ "parent",
490
+ // Relative parent
491
+ "sibling",
492
+ // Relative sibling
493
+ "index"
494
+ // Relative index
495
+ ],
496
+ "newlines-between": "never"
497
+ }
498
+ ]
499
+ };
500
+ importOverrides = {
501
+ files: ["**/*.config.{js,ts}"],
502
+ rules: {
503
+ "import/no-default-export": "off"
504
+ }
505
+ };
506
+ }
507
+ });
508
+
509
+ // eslint/rules/possible-errors.ts
510
+ var possibleErrorsRules;
511
+ var init_possible_errors = __esm({
512
+ "eslint/rules/possible-errors.ts"() {
513
+ "use strict";
514
+ possibleErrorsRules = {
515
+ /**
516
+ * Disallow the use of console.
517
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-console
518
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
519
+ */
520
+ "no-console": "error",
521
+ /**
522
+ * Disallow expressions where the operation doesn't affect the value.
523
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constant-binary-expression
524
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
525
+ */
526
+ "no-constant-binary-expression": "error",
527
+ /**
528
+ * Disallow returning values from Promise executor functions.
529
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return
530
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
531
+ */
532
+ "no-promise-executor-return": "error",
533
+ /**
534
+ * Disallow template literal placeholder syntax in regular strings, as
535
+ * these are likely errors.
536
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string
537
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
538
+ */
539
+ "no-template-curly-in-string": "error",
540
+ /**
541
+ * Disallow loops with a body that allows only one iteration.
542
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop
543
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
544
+ */
545
+ "no-unreachable-loop": "error"
546
+ };
547
+ }
548
+ });
549
+
550
+ // eslint/rules/stylistic.ts
551
+ var stylisticRules;
552
+ var init_stylistic = __esm({
553
+ "eslint/rules/stylistic.ts"() {
554
+ "use strict";
555
+ stylisticRules = {
556
+ /**
557
+ * Require camel case names.
558
+ * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase
559
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
560
+ */
561
+ camelcase: [
562
+ "error",
563
+ {
564
+ allow: ["^UNSAFE_"],
565
+ ignoreDestructuring: false,
566
+ properties: "never"
567
+ }
568
+ ],
569
+ /**
570
+ * Require function expressions to have a name.
571
+ * 🚫 Not fixable - https://eslint.org/docs/rules/func-names
572
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
573
+ */
574
+ "func-names": ["error", "as-needed"],
575
+ /**
576
+ * Require a capital letter for constructors.
577
+ * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap
578
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
579
+ */
580
+ "new-cap": ["error", { capIsNew: false }],
581
+ /**
582
+ * Disallow the omission of parentheses when invoking a constructor with
583
+ * no arguments.
584
+ * 🔧 Fixable - https://eslint.org/docs/rules/new-parens
585
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
586
+ */
587
+ "new-parens": "warn",
588
+ /**
589
+ * Disallow use of the Array constructor.
590
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-array-constructor
591
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
592
+ */
593
+ "no-array-constructor": "error",
594
+ /**
595
+ * Disallow use of bitwise operators.
596
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise
597
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
598
+ */
599
+ "no-bitwise": "error",
600
+ /**
601
+ * Disallow if as the only statement in an else block.
602
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if
603
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
604
+ */
605
+ "no-lonely-if": "warn",
606
+ /**
607
+ * Disallow use of chained assignment expressions.
608
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign
609
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
610
+ */
611
+ "no-multi-assign": ["error"],
612
+ /**
613
+ * Disallow nested ternary expressions.
614
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-nested-ternary
615
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
616
+ */
617
+ "no-nested-ternary": "error",
618
+ /**
619
+ * Disallow ternary operators when simpler alternatives exist.
620
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary
621
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
622
+ */
623
+ "no-unneeded-ternary": "error",
624
+ /**
625
+ * Require use of an object spread over Object.assign.
626
+ * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread
627
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
628
+ */
629
+ "prefer-object-spread": "warn"
630
+ };
631
+ }
632
+ });
633
+
634
+ // eslint/rules/comments.ts
635
+ import { defineConfig } from "eslint/config";
636
+ import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
637
+ var commentsConfig;
638
+ var init_comments = __esm({
639
+ "eslint/rules/comments.ts"() {
640
+ "use strict";
641
+ commentsConfig = defineConfig([
642
+ comments.recommended,
643
+ {
644
+ rules: {
645
+ /**
646
+ * Require comments on ESlint disable directives.
647
+ * 🚫 Not fixable - https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html
648
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
649
+ */
650
+ "@eslint-community/eslint-comments/require-description": "error"
651
+ }
652
+ }
653
+ ]);
654
+ }
655
+ });
656
+
657
+ // eslint/rules/unicorn.ts
658
+ import { defineConfig as defineConfig2 } from "eslint/config";
659
+ import eslintPluginUnicorn from "eslint-plugin-unicorn";
660
+ import globals from "globals";
661
+ var unicornConfig;
662
+ var init_unicorn = __esm({
663
+ "eslint/rules/unicorn.ts"() {
664
+ "use strict";
665
+ unicornConfig = defineConfig2({
666
+ languageOptions: {
667
+ globals: globals.builtin
668
+ },
669
+ plugins: {
670
+ unicorn: eslintPluginUnicorn
671
+ },
672
+ rules: {
673
+ /**
674
+ * Require consistent filename case for all linted files.
675
+ * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
676
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
677
+ */
678
+ "unicorn/filename-case": [
679
+ "error",
680
+ {
681
+ case: "kebabCase"
682
+ }
683
+ ],
684
+ /**
685
+ * Require using the `node:` protocol when importing Node.js built-in modules.
686
+ * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
687
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
688
+ */
689
+ "unicorn/prefer-node-protocol": "warn"
690
+ }
691
+ });
692
+ }
693
+ });
694
+
695
+ // eslint/rules/variables.ts
696
+ var noUnusedVarsConfig, variablesRules;
697
+ var init_variables = __esm({
698
+ "eslint/rules/variables.ts"() {
699
+ "use strict";
700
+ noUnusedVarsConfig = [
701
+ "error",
702
+ {
703
+ args: "after-used",
704
+ argsIgnorePattern: "^_",
705
+ ignoreRestSiblings: false,
706
+ vars: "all",
707
+ varsIgnorePattern: "^_"
708
+ }
709
+ ];
710
+ variablesRules = {
711
+ /**
712
+ * Disallow labels that share a name with a variable.
713
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
714
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
715
+ */
716
+ "no-label-var": "error",
717
+ /**
718
+ * Disallow initializing variables to `undefined`.
719
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init
720
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
721
+ */
722
+ "no-undef-init": "warn",
723
+ /**
724
+ * Disallow unused variables.
725
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-unused-vars
726
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
727
+ */
728
+ "no-unused-vars": noUnusedVarsConfig
729
+ };
730
+ }
731
+ });
732
+
733
+ // eslint/_base.ts
734
+ import eslintJavascriptPlugin from "@eslint/js";
735
+ import * as importPlugin from "eslint-plugin-import";
736
+ import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
737
+ import babelParser from "@babel/eslint-parser";
738
+ import { defineConfig as defineConfig3 } from "eslint/config";
739
+ var baseConfig;
740
+ var init_base = __esm({
741
+ "eslint/_base.ts"() {
742
+ "use strict";
743
+ init_constants();
744
+ init_best_practice();
745
+ init_es6();
746
+ init_import();
747
+ init_possible_errors();
748
+ init_stylistic();
749
+ init_comments();
750
+ init_unicorn();
751
+ init_variables();
752
+ baseConfig = defineConfig3([
753
+ // Core recommended ESLint rules
754
+ eslintJavascriptPlugin.configs.recommended,
755
+ // Import plugin recommendations
756
+ importPlugin.flatConfigs.recommended,
757
+ // Prettier formatting integration
758
+ eslintPluginPrettierRecommended,
759
+ // Custom and recommended rules for comments
760
+ commentsConfig,
761
+ // Custom and recommended rules for unicorn plugin
762
+ unicornConfig,
763
+ // Custom ESLint configuration for all files
764
+ {
765
+ rules: {
766
+ ...bestPracticeRules,
767
+ ...es6Rules,
768
+ ...importRules,
769
+ ...possibleErrorsRules,
770
+ ...stylisticRules,
771
+ ...variablesRules
772
+ }
773
+ },
774
+ {
775
+ languageOptions: {
776
+ // Enable modern JS syntax
777
+ ecmaVersion: ECMA_VERSION,
778
+ // Use ES modules rather than CommonJS
779
+ sourceType: "module"
780
+ },
781
+ // Import-related configuration
782
+ settings: {
783
+ "import/resolver": {
784
+ node: true
785
+ }
786
+ },
787
+ linterOptions: {
788
+ // Warn if there are unnecessary `eslint-disable` comments
789
+ reportUnusedDisableDirectives: true
790
+ },
791
+ // This un-ignores dotfiles like `.eslintrc.js`, which are usually ignored by default
792
+ ignores: ["!.*.js", "!.*"]
793
+ },
794
+ // Override for JavaScript files (optional but useful)
795
+ // Applies the Babel parser for parsing newer JS syntax (e.g., decorators, top-level await)
796
+ {
797
+ files: JAVASCRIPT_FILES,
798
+ languageOptions: {
799
+ parser: babelParser,
800
+ // Use Babel parser instead of ESLint's default to support modern JS features
801
+ parserOptions: {
802
+ // Don't require a Babel config file like `.babelrc`
803
+ requireConfigFile: false,
804
+ // Inline Babel options for this parser instance
805
+ babelOptions: {
806
+ presets: ["@babel/preset-env"]
807
+ // Transpile to ES5 based on target environments
808
+ }
809
+ }
810
+ }
811
+ },
812
+ // Override for config files that commonly require default exports
813
+ importOverrides
814
+ ]);
815
+ }
816
+ });
817
+
818
+ // eslint/browser.ts
819
+ var browser_exports = {};
820
+ __export(browser_exports, {
821
+ browserConfig: () => browserConfig
822
+ });
823
+ import { defineConfig as defineConfig4 } from "eslint/config";
824
+ import globals2 from "globals";
825
+ var browserConfig;
826
+ var init_browser = __esm({
827
+ "eslint/browser.ts"() {
828
+ "use strict";
829
+ init_base();
830
+ browserConfig = defineConfig4(
831
+ baseConfig.map((config) => {
832
+ if (!config.languageOptions) return config;
833
+ return {
834
+ ...config,
835
+ // Override the `languageOptions` field
836
+ languageOptions: {
837
+ ...config.languageOptions,
838
+ // Merge in the browser globals (e.g., `window`, `document`, etc.)
839
+ globals: {
840
+ ...config.languageOptions.globals ?? {},
841
+ ...globals2.browser
842
+ }
843
+ }
844
+ };
845
+ })
846
+ );
847
+ }
848
+ });
849
+
850
+ // eslint/node.ts
851
+ var node_exports = {};
852
+ __export(node_exports, {
853
+ nodeConfig: () => nodeConfig
854
+ });
855
+ import { defineConfig as defineConfig5 } from "eslint/config";
856
+ import globals3 from "globals";
857
+ var nodeConfig;
858
+ var init_node = __esm({
859
+ "eslint/node.ts"() {
860
+ "use strict";
861
+ init_base();
862
+ nodeConfig = defineConfig5(
863
+ baseConfig.map((config) => {
864
+ if (!config.languageOptions) return config;
865
+ return {
866
+ ...config,
867
+ // Override the `languageOptions` field
868
+ languageOptions: {
869
+ ...config.languageOptions,
870
+ // Merge in the Node globals
871
+ globals: {
872
+ ...config.languageOptions.globals ?? {},
873
+ ...globals3.node
874
+ }
875
+ }
876
+ };
877
+ })
878
+ );
879
+ }
880
+ });
881
+
882
+ // eslint/rules/typescript/import.ts
883
+ var typescriptImportRules;
884
+ var init_import2 = __esm({
885
+ "eslint/rules/typescript/import.ts"() {
886
+ "use strict";
887
+ typescriptImportRules = {
888
+ "import/default": ["off"],
889
+ "import/export": ["off"],
890
+ "import/namespace": ["off"],
891
+ "import/no-unresolved": ["off"]
892
+ };
893
+ }
894
+ });
895
+
896
+ // eslint/rules/typescript/index.ts
897
+ var typescriptRules;
898
+ var init_typescript = __esm({
899
+ "eslint/rules/typescript/index.ts"() {
900
+ "use strict";
901
+ init_variables();
902
+ typescriptRules = {
903
+ /**
904
+ * Require consistent usage of type exports.
905
+ * 🔧 Fixable - https://typescript-eslint.io/rules/consistent-type-exports/
906
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
907
+ */
908
+ "@typescript-eslint/consistent-type-exports": ["warn", { fixMixedExportsWithInlineTypeSpecifier: true }],
909
+ /**
910
+ * Require consistent usage of type imports.
911
+ * 🔧 Fixable - https://typescript-eslint.io/rules/consistent-type-imports/
912
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
913
+ */
914
+ "@typescript-eslint/consistent-type-imports": [
915
+ "warn",
916
+ {
917
+ disallowTypeAnnotations: true,
918
+ fixStyle: "inline-type-imports",
919
+ prefer: "type-imports"
920
+ }
921
+ ],
922
+ /**
923
+ * Require explicit return types on functions and class methods.
924
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/explicit-function-return-type/
925
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
926
+ */
927
+ "@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
928
+ /**
929
+ * Require using function property types in method signatures.
930
+ * 🔧 Fixable - https://typescript-eslint.io/rules/method-signature-style/
931
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
932
+ */
933
+ "@typescript-eslint/method-signature-style": "warn",
934
+ /**
935
+ * Require consistent naming conventions.
936
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/naming-convention/
937
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
938
+ */
939
+ "@typescript-eslint/naming-convention": [
940
+ "error",
941
+ {
942
+ format: ["PascalCase"],
943
+ selector: ["typeLike", "enumMember"]
944
+ },
945
+ {
946
+ custom: {
947
+ match: false,
948
+ regex: "^I[A-Z]|^(Interface|Props|State)$"
949
+ },
950
+ format: ["PascalCase"],
951
+ selector: "interface"
952
+ }
953
+ ],
954
+ /**
955
+ * Disallow members of unions and intersections that do nothing or override type information.
956
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/no-redundant-type-constituents/
957
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
958
+ */
959
+ "@typescript-eslint/no-redundant-type-constituents": "warn",
960
+ /**
961
+ * Disallow unnecessary namespace qualifiers.
962
+ * 🔧 Fixable - https://typescript-eslint.io/rules/no-unnecessary-qualifier/
963
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
964
+ */
965
+ "@typescript-eslint/no-unnecessary-qualifier": "warn",
966
+ /**
967
+ * Require using `RegExp.exec()` over `String.match()` for consistency.
968
+ * 🔧 Fixable - https://typescript-eslint.io/rules/prefer-regexp-exec/
969
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
970
+ */
971
+ "@typescript-eslint/prefer-regexp-exec": "warn",
972
+ /**
973
+ * Require Array#sort calls to provide a compare function.
974
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/require-array-sort-compare/
975
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
976
+ */
977
+ "@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }],
978
+ /**
979
+ * Require exhaustive checks when using union types in switch statements.
980
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/switch-exhaustiveness-check/
981
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
982
+ */
983
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
984
+ /**
985
+ * Require default parameters to be last.
986
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/default-param-last/
987
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
988
+ */
989
+ "@typescript-eslint/default-param-last": "error",
990
+ /**
991
+ * Disallow creation of functions within loops.
992
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/no-loop-func/
993
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
994
+ */
995
+ "@typescript-eslint/no-loop-func": "error",
996
+ /**
997
+ * Disallow variable declarations from shadowing variables in outer scope.
998
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/no-shadow/
999
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
1000
+ */
1001
+ "@typescript-eslint/no-shadow": "error",
1002
+ /**
1003
+ * Disallow unused variables.
1004
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/no-unused-vars/
1005
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
1006
+ */
1007
+ "@typescript-eslint/no-unused-vars": noUnusedVarsConfig,
1008
+ /**
1009
+ * Disallow unnecessary constructors.
1010
+ * 🚫 Not fixable - https://typescript-eslint.io/rules/no-useless-constructor/
1011
+ * Source: Vercel Style Guide → https://github.com/vercel/style-guide
1012
+ */
1013
+ "@typescript-eslint/no-useless-constructor": "error",
1014
+ /**
1015
+ * Enforce consistent usage of type assertions.
1016
+ * 🔧 Fixable - https://typescript-eslint.io/rules/consistent-type-assertions/
1017
+ * Source: Added by bredansky → https://github.com/bredansky
1018
+ */
1019
+ "@typescript-eslint/consistent-type-assertions": [
1020
+ "error",
1021
+ {
1022
+ assertionStyle: "never"
1023
+ }
1024
+ ]
1025
+ };
1026
+ }
1027
+ });
1028
+
1029
+ // eslint/typescript.ts
1030
+ var typescript_exports = {};
1031
+ __export(typescript_exports, {
1032
+ typescriptConfig: () => typescriptConfig
1033
+ });
1034
+ import tseslint from "typescript-eslint";
1035
+ var typescriptConfig;
1036
+ var init_typescript2 = __esm({
1037
+ "eslint/typescript.ts"() {
1038
+ "use strict";
1039
+ init_import2();
1040
+ init_typescript();
1041
+ init_constants();
1042
+ typescriptConfig = tseslint.config([
1043
+ // These rules enforce strong type safety and identify potential type-related issues.
1044
+ tseslint.configs.strictTypeChecked,
1045
+ // These rules focus on code style and readability specifically for TypeScript.
1046
+ tseslint.configs.stylisticTypeChecked,
1047
+ {
1048
+ // TypeScript resolver works better for both '.js' and '.ts' files
1049
+ settings: {
1050
+ "import/resolver": {
1051
+ typescript: true
1052
+ }
1053
+ }
1054
+ },
1055
+ {
1056
+ // This configuration applies specifically to TypeScript files.
1057
+ files: TYPESCRIPT_FILES,
1058
+ languageOptions: {
1059
+ // Set the parser to tseslint.parser, which is the TypeScript parser for ESLint.
1060
+ parser: tseslint.parser,
1061
+ parserOptions: {
1062
+ // This allows ESLint to leverage TypeScript's language service for better understanding of the project.
1063
+ projectService: true
1064
+ }
1065
+ },
1066
+ // Register the TypeScript ESLint plugin for use in this configuration scope.
1067
+ plugins: {
1068
+ "@typescript-eslint": tseslint.plugin
1069
+ },
1070
+ // Apply custom TypeScript rules.
1071
+ rules: {
1072
+ ...typescriptRules,
1073
+ ...typescriptImportRules
1074
+ }
1075
+ },
1076
+ {
1077
+ // This effectively disables all type-checking rules for JavaScript files,
1078
+ // as type-checking is only relevant for TypeScript.
1079
+ files: JAVASCRIPT_FILES,
1080
+ extends: [tseslint.configs.disableTypeChecked]
1081
+ }
1082
+ ]);
1083
+ }
1084
+ });
1085
+
1086
+ // eslint/react.ts
1087
+ var react_exports = {};
1088
+ __export(react_exports, {
1089
+ reactConfig: () => reactConfig
1090
+ });
1091
+ import { defineConfig as defineConfig6 } from "eslint/config";
1092
+ import react from "@eslint-react/eslint-plugin";
1093
+ import jsxA11y from "eslint-plugin-jsx-a11y";
1094
+ import reactHooks from "eslint-plugin-react-hooks";
1095
+ var reactConfig;
1096
+ var init_react = __esm({
1097
+ "eslint/react.ts"() {
1098
+ "use strict";
1099
+ init_constants();
1100
+ reactConfig = defineConfig6([
1101
+ {
1102
+ // Apply React recommended rules for JavaScript files
1103
+ files: JAVASCRIPT_FILES,
1104
+ extends: [react.configs.recommended]
1105
+ },
1106
+ {
1107
+ // Apply React + TypeScript recommended rules (with type-checking enabled)
1108
+ files: TYPESCRIPT_FILES,
1109
+ extends: [react.configs["recommended-type-checked"]]
1110
+ },
1111
+ {
1112
+ // Extend strict accessibility rules and latest React Hooks best practices
1113
+ extends: [
1114
+ jsxA11y.flatConfigs.strict,
1115
+ // Enforces strong accessibility standards
1116
+ reactHooks.configs["recommended-latest"]
1117
+ // Ensures proper usage of React Hooks
1118
+ ]
1119
+ }
1120
+ ]);
1121
+ }
1122
+ });
1123
+
1124
+ // eslint/rules/next/imports.ts
1125
+ var NEXT_JS_FILES, nextImportRules;
1126
+ var init_imports = __esm({
1127
+ "eslint/rules/next/imports.ts"() {
1128
+ "use strict";
1129
+ NEXT_JS_FILES = [
1130
+ // Pages Router
1131
+ "**/pages/**/*.{js,jsx,ts,tsx}",
1132
+ "**/src/pages/**/*.{js,jsx,ts,tsx}",
1133
+ // App Router
1134
+ "**/app/**/page.{js,jsx,ts,tsx}",
1135
+ "**/app/**/layout.{js,jsx,ts,tsx}",
1136
+ "**/app/**/loading.{js,jsx,ts,tsx}",
1137
+ "**/app/**/error.{js,jsx,ts,tsx}",
1138
+ "**/app/**/not-found.{js,jsx,ts,tsx}",
1139
+ "**/app/**/global-error.{js,jsx,ts,tsx}",
1140
+ "**/app/**/route.{js,ts}",
1141
+ "**/src/app/**/page.{js,jsx,ts,tsx}",
1142
+ "**/src/app/**/layout.{js,jsx,ts,tsx}",
1143
+ "**/src/app/**/loading.{js,jsx,ts,tsx}",
1144
+ "**/src/app/**/error.{js,jsx,ts,tsx}",
1145
+ "**/src/app/**/not-found.{js,jsx,ts,tsx}",
1146
+ "**/src/app/**/global-error.{js,jsx,ts,tsx}",
1147
+ "**/src/app/**/route.{js,ts}"
1148
+ ];
1149
+ nextImportRules = {
1150
+ files: NEXT_JS_FILES,
1151
+ rules: {
1152
+ "import/no-default-export": "off"
1153
+ }
1154
+ };
1155
+ }
1156
+ });
1157
+
1158
+ // eslint/next.ts
1159
+ var next_exports = {};
1160
+ __export(next_exports, {
1161
+ nextConfig: () => nextConfig
1162
+ });
1163
+ import { defineConfig as defineConfig7 } from "eslint/config";
1164
+ import nextPlugin from "@next/eslint-plugin-next";
1165
+ var babelOptions, nextConfig;
1166
+ var init_next = __esm({
1167
+ "eslint/next.ts"() {
1168
+ "use strict";
1169
+ init_constants();
1170
+ init_imports();
1171
+ babelOptions = {
1172
+ presets: (() => {
1173
+ try {
1174
+ __require.resolve("next/babel");
1175
+ return ["next/babel"];
1176
+ } catch {
1177
+ return [];
1178
+ }
1179
+ })()
1180
+ };
1181
+ nextConfig = defineConfig7([
1182
+ // Applies Next.js specific rules globally.
1183
+ {
1184
+ plugins: {
1185
+ "@next/next": nextPlugin
1186
+ },
1187
+ // Apply recommended and core-web-vitals rules from the Next.js plugin.
1188
+ rules: {
1189
+ ...nextPlugin.configs.recommended.rules,
1190
+ ...nextPlugin.configs["core-web-vitals"].rules
1191
+ }
1192
+ },
1193
+ {
1194
+ // Target only files matching the JAVASCRIPT_FILES pattern.
1195
+ // This ensures that Babel parsing is applied only where relevant.
1196
+ files: JAVASCRIPT_FILES,
1197
+ languageOptions: {
1198
+ parserOptions: {
1199
+ // Spread the dynamically determined Babel options (presets).
1200
+ ...babelOptions,
1201
+ // Disable requireConfigFile to prevent ESLint from looking for a separate Babel configuration file.
1202
+ // This makes the configuration self-contained and relies on the presets defined above.
1203
+ requireConfigFile: false
1204
+ }
1205
+ }
1206
+ },
1207
+ nextImportRules
1208
+ ]);
1209
+ }
1210
+ });
1211
+
1212
+ // eslint/playwright.ts
1213
+ var playwright_exports = {};
1214
+ __export(playwright_exports, {
1215
+ playwrightConfig: () => playwrightConfig
1216
+ });
1217
+ import { defineConfig as defineConfig8 } from "eslint/config";
1218
+ import playwrightPlugin from "eslint-plugin-playwright";
1219
+ var playwrightConfig;
1220
+ var init_playwright = __esm({
1221
+ "eslint/playwright.ts"() {
1222
+ "use strict";
1223
+ playwrightConfig = defineConfig8([
1224
+ {
1225
+ ...playwrightPlugin.configs["flat/recommended"],
1226
+ files: ["**/*.spec.{js,ts}", "**/*.test.{js,ts}", "**/tests/**/*.{js,ts}", "**/e2e/**/*.{js,ts}"],
1227
+ rules: {
1228
+ ...playwrightPlugin.configs["flat/recommended"].rules
1229
+ }
1230
+ }
1231
+ ]);
1232
+ }
1233
+ });
1234
+
1235
+ // styleguide.ts
1236
+ function styleguide(options) {
1237
+ const { browser, node, typescript, react: react2, next, playwright, prettier } = options;
1238
+ const hasEslintOptions = browser ?? node ?? typescript ?? react2 ?? next ?? playwright;
1239
+ const prettierConfig = prettier ? getPrettierConfig(prettier) : void 0;
1240
+ if (!hasEslintOptions) {
1241
+ return { prettierConfig };
1242
+ }
1243
+ const eslintConfig = loadEslintConfigs(options);
1244
+ return {
1245
+ eslintConfig,
1246
+ prettierConfig
1247
+ };
1248
+ }
1249
+ var RuleSeverity, applySeverity, loadEslintConfigs;
1250
+ var init_styleguide = __esm({
1251
+ "styleguide.ts"() {
1252
+ init_prettier();
1253
+ RuleSeverity = /* @__PURE__ */ ((RuleSeverity2) => {
1254
+ RuleSeverity2["Off"] = "off";
1255
+ RuleSeverity2["Warn"] = "warn";
1256
+ RuleSeverity2["Error"] = "error";
1257
+ RuleSeverity2["Default"] = "default";
1258
+ return RuleSeverity2;
1259
+ })(RuleSeverity || {});
1260
+ applySeverity = async (config, severity) => {
1261
+ if (!severity || severity === "off" /* Off */) return [];
1262
+ if (severity === "default" /* Default */) return config;
1263
+ const { transformSeverity: transformSeverity2 } = await Promise.resolve().then(() => (init_transform_severity(), transform_severity_exports));
1264
+ return transformSeverity2(config, severity);
1265
+ };
1266
+ loadEslintConfigs = async (options) => {
1267
+ const { browser, node, typescript, react: react2, next, playwright, ignores, additionalConfigs = [] } = options;
1268
+ const configLoaders = [
1269
+ { loader: () => Promise.resolve().then(() => (init_browser(), browser_exports)).then((m) => m.browserConfig), severity: browser },
1270
+ { loader: () => Promise.resolve().then(() => (init_node(), node_exports)).then((m) => m.nodeConfig), severity: node },
1271
+ { loader: () => Promise.resolve().then(() => (init_typescript2(), typescript_exports)).then((m) => m.typescriptConfig), severity: typescript },
1272
+ { loader: () => Promise.resolve().then(() => (init_react(), react_exports)).then((m) => m.reactConfig), severity: react2 },
1273
+ { loader: () => Promise.resolve().then(() => (init_next(), next_exports)).then((m) => m.nextConfig), severity: next },
1274
+ { loader: () => Promise.resolve().then(() => (init_playwright(), playwright_exports)).then((m) => m.playwrightConfig), severity: playwright }
1275
+ ];
1276
+ const eslintConfigs = [];
1277
+ for (const { loader, severity } of configLoaders) {
1278
+ if (severity && severity !== "off" /* Off */) {
1279
+ const config = await loader();
1280
+ const processedConfig = await applySeverity(config, severity);
1281
+ eslintConfigs.push(...processedConfig);
1282
+ }
1283
+ }
1284
+ if (ignores && ignores.length > 0) {
1285
+ eslintConfigs.push({ ignores });
1286
+ }
1287
+ eslintConfigs.push(...additionalConfigs);
1288
+ return eslintConfigs;
1289
+ };
1290
+ }
1291
+ });
1292
+ init_styleguide();
1293
+ export {
1294
+ RuleSeverity,
1295
+ styleguide
1296
+ };