eslint-config-setup 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +161 -155
- package/dist/index.js.map +1 -1
- package/dist/modules.d.ts +67 -39
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +1757 -2357
- package/dist/modules.js.map +1 -1
- package/dist/types-DElYtiZE.d.ts +32 -0
- package/dist/types-DElYtiZE.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/types-CAO1PbsB.d.ts +0 -34
package/dist/modules.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import 'eslint';
|
|
1
|
+
import { n as FlatConfigArray, t as ConfigOptions } from "./types-DElYtiZE.js";
|
|
3
2
|
|
|
3
|
+
//#region src/build/compose.d.ts
|
|
4
4
|
declare function composeConfig(opts: ConfigOptions): FlatConfigArray;
|
|
5
|
-
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/configs/ai.d.ts
|
|
6
7
|
declare function aiConfig(): FlatConfigArray;
|
|
7
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/configs/base.d.ts
|
|
8
10
|
/**
|
|
9
11
|
* Base ESLint config — extends `eslint.configs.recommended` with additional
|
|
10
12
|
* best-practice rules for error prevention and modern JS style.
|
|
@@ -16,9 +18,10 @@ declare function aiConfig(): FlatConfigArray;
|
|
|
16
18
|
* @see https://eslint.org/docs/latest/rules/
|
|
17
19
|
*/
|
|
18
20
|
declare function baseConfig(opts?: {
|
|
19
|
-
|
|
21
|
+
ai?: boolean;
|
|
20
22
|
}): FlatConfigArray;
|
|
21
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/configs/cspell.d.ts
|
|
22
25
|
/**
|
|
23
26
|
* CSpell config — spell checking for identifiers and comments.
|
|
24
27
|
* Catches typos in variable names, function names, and documentation.
|
|
@@ -27,7 +30,8 @@ declare function baseConfig(opts?: {
|
|
|
27
30
|
* @see https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-eslint-plugin#readme
|
|
28
31
|
*/
|
|
29
32
|
declare function cspellConfig(): FlatConfigArray;
|
|
30
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/configs/de-morgan.d.ts
|
|
31
35
|
/**
|
|
32
36
|
* De Morgan config — enforces De Morgan's laws on negated boolean expressions.
|
|
33
37
|
* Both rules are auto-fixable: !(A && B) → !A || !B and !(A || B) → !A && !B.
|
|
@@ -38,7 +42,8 @@ declare function cspellConfig(): FlatConfigArray;
|
|
|
38
42
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan
|
|
39
43
|
*/
|
|
40
44
|
declare function deMorganConfig(): FlatConfigArray;
|
|
41
|
-
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/configs/imports.d.ts
|
|
42
47
|
/**
|
|
43
48
|
* Import/export config — two plugins with clear separation of concerns:
|
|
44
49
|
* - `import-x` handles import **validation** (cycles, duplicates, etc.)
|
|
@@ -50,7 +55,8 @@ declare function deMorganConfig(): FlatConfigArray;
|
|
|
50
55
|
* @see https://github.com/sweepline/eslint-plugin-unused-imports
|
|
51
56
|
*/
|
|
52
57
|
declare function importsConfig(): FlatConfigArray;
|
|
53
|
-
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/configs/jsdoc.d.ts
|
|
54
60
|
/**
|
|
55
61
|
* JSDoc config — validates existing JSDoc annotations without requiring them.
|
|
56
62
|
*
|
|
@@ -63,9 +69,10 @@ declare function importsConfig(): FlatConfigArray;
|
|
|
63
69
|
* @see https://github.com/gajus/eslint-plugin-jsdoc#rules
|
|
64
70
|
*/
|
|
65
71
|
declare function jsdocConfig(opts?: {
|
|
66
|
-
|
|
72
|
+
ai?: boolean;
|
|
67
73
|
}): FlatConfigArray;
|
|
68
|
-
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/configs/json.d.ts
|
|
69
76
|
/**
|
|
70
77
|
* JSON/JSONC config — native JSON linting using the official `@eslint/json` plugin.
|
|
71
78
|
* Two blocks: strict JSON for most files, JSONC (with comments) for tsconfig etc.
|
|
@@ -73,7 +80,8 @@ declare function jsdocConfig(opts?: {
|
|
|
73
80
|
* @see https://github.com/eslint/json#rules
|
|
74
81
|
*/
|
|
75
82
|
declare function jsonConfig(): FlatConfigArray;
|
|
76
|
-
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/configs/markdown.d.ts
|
|
77
85
|
/**
|
|
78
86
|
* Markdown & MDX config — lints code blocks inside Markdown and MDX files
|
|
79
87
|
* using eslint-plugin-mdx. Code examples in docs get the same ESLint rules
|
|
@@ -86,7 +94,8 @@ declare function jsonConfig(): FlatConfigArray;
|
|
|
86
94
|
* @see https://github.com/DavidAnson/markdownlint-cli2 (recommended for Markdown structure linting)
|
|
87
95
|
*/
|
|
88
96
|
declare function markdownConfig(): FlatConfigArray;
|
|
89
|
-
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/configs/node.d.ts
|
|
90
99
|
/**
|
|
91
100
|
* Node.js config — rules for server-side JavaScript/TypeScript.
|
|
92
101
|
* Hand-picked subset of eslint-plugin-n. We don't use the full preset because
|
|
@@ -96,9 +105,10 @@ declare function markdownConfig(): FlatConfigArray;
|
|
|
96
105
|
* @see https://github.com/eslint-community/eslint-plugin-n#-rules
|
|
97
106
|
*/
|
|
98
107
|
declare function nodeConfig(opts?: {
|
|
99
|
-
|
|
108
|
+
ai?: boolean;
|
|
100
109
|
}): FlatConfigArray;
|
|
101
|
-
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/configs/package-json.d.ts
|
|
102
112
|
/**
|
|
103
113
|
* Package.json config — semantic validation of package.json files.
|
|
104
114
|
*
|
|
@@ -117,7 +127,8 @@ declare function packageJsonConfig(): FlatConfigArray;
|
|
|
117
127
|
* Only active in AI mode where deterministic structure is enforced.
|
|
118
128
|
*/
|
|
119
129
|
declare function packageJsonAiConfig(): FlatConfigArray;
|
|
120
|
-
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/configs/perfectionist.d.ts
|
|
121
132
|
/**
|
|
122
133
|
* Perfectionist config — deterministic sorting of code elements.
|
|
123
134
|
*
|
|
@@ -148,7 +159,8 @@ declare function perfectionistConfig(): FlatConfigArray;
|
|
|
148
159
|
* for AI-generated code where "intent" is often random.
|
|
149
160
|
*/
|
|
150
161
|
declare function perfectionistAiConfig(): FlatConfigArray;
|
|
151
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/configs/prettier.d.ts
|
|
152
164
|
/**
|
|
153
165
|
* Prettier compat config — disables all ESLint rules that conflict with Prettier.
|
|
154
166
|
* Must be the last config block (before OxLint if enabled).
|
|
@@ -157,7 +169,8 @@ declare function perfectionistAiConfig(): FlatConfigArray;
|
|
|
157
169
|
* @see https://github.com/prettier/eslint-config-prettier#readme
|
|
158
170
|
*/
|
|
159
171
|
declare function prettierCompatConfig(): FlatConfigArray;
|
|
160
|
-
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/configs/react.d.ts
|
|
161
174
|
/**
|
|
162
175
|
* React config — React 19+, Hooks, JSX accessibility, and Web API leak detection.
|
|
163
176
|
*
|
|
@@ -177,9 +190,10 @@ declare function prettierCompatConfig(): FlatConfigArray;
|
|
|
177
190
|
* @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules
|
|
178
191
|
*/
|
|
179
192
|
declare function reactConfig(opts?: {
|
|
180
|
-
|
|
193
|
+
ai?: boolean;
|
|
181
194
|
}): FlatConfigArray;
|
|
182
|
-
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/configs/react-effect.d.ts
|
|
183
197
|
/**
|
|
184
198
|
* React effect config — catches unnecessary useEffect anti-patterns.
|
|
185
199
|
* Codifies the patterns from the React docs article "You Might Not Need an Effect".
|
|
@@ -192,7 +206,8 @@ declare function reactConfig(opts?: {
|
|
|
192
206
|
* @see https://github.com/nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect
|
|
193
207
|
*/
|
|
194
208
|
declare function reactEffectConfig(): FlatConfigArray;
|
|
195
|
-
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/configs/regexp.d.ts
|
|
196
211
|
/**
|
|
197
212
|
* RegExp config — uses the full `flat/recommended` preset from eslint-plugin-regexp.
|
|
198
213
|
* Validates regular expression syntax, detects common mistakes, and suggests
|
|
@@ -203,9 +218,10 @@ declare function reactEffectConfig(): FlatConfigArray;
|
|
|
203
218
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/
|
|
204
219
|
*/
|
|
205
220
|
declare function regexpConfig(opts?: {
|
|
206
|
-
|
|
221
|
+
ai?: boolean;
|
|
207
222
|
}): FlatConfigArray;
|
|
208
|
-
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/configs/security.d.ts
|
|
209
225
|
/**
|
|
210
226
|
* Security config — Node.js security patterns from eslint-plugin-security.
|
|
211
227
|
* We manually select rules instead of using the preset because the preset
|
|
@@ -214,7 +230,8 @@ declare function regexpConfig(opts?: {
|
|
|
214
230
|
* @see https://github.com/eslint-community/eslint-plugin-security#rules
|
|
215
231
|
*/
|
|
216
232
|
declare function securityConfig(): FlatConfigArray;
|
|
217
|
-
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/configs/sonarjs.d.ts
|
|
218
235
|
/**
|
|
219
236
|
* SonarJS config — code-quality rules from SonarSource.
|
|
220
237
|
* Hand-picked subset focused on bug detection and code smells.
|
|
@@ -224,9 +241,10 @@ declare function securityConfig(): FlatConfigArray;
|
|
|
224
241
|
* @see https://github.com/SonarSource/SonarJS/tree/master/packages/jsts/src/rules#readme
|
|
225
242
|
*/
|
|
226
243
|
declare function sonarjsConfig(opts?: {
|
|
227
|
-
|
|
244
|
+
ai?: boolean;
|
|
228
245
|
}): FlatConfigArray;
|
|
229
|
-
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/configs/typescript.d.ts
|
|
230
248
|
/**
|
|
231
249
|
* TypeScript config — extends typescript-eslint strict presets with project-wide type checking.
|
|
232
250
|
*
|
|
@@ -241,10 +259,11 @@ declare function sonarjsConfig(opts?: {
|
|
|
241
259
|
* @see https://typescript-eslint.io/rules/
|
|
242
260
|
*/
|
|
243
261
|
declare function typescriptConfig(opts?: {
|
|
244
|
-
|
|
245
|
-
|
|
262
|
+
ai?: boolean;
|
|
263
|
+
react?: boolean;
|
|
246
264
|
}): FlatConfigArray;
|
|
247
|
-
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/configs/unicorn.d.ts
|
|
248
267
|
/**
|
|
249
268
|
* Unicorn config — modern JavaScript idioms and best practices.
|
|
250
269
|
* We hand-pick rules instead of using `flat/recommended` because the
|
|
@@ -254,9 +273,10 @@ declare function typescriptConfig(opts?: {
|
|
|
254
273
|
* @see https://github.com/sindresorhus/eslint-plugin-unicorn#rules
|
|
255
274
|
*/
|
|
256
275
|
declare function unicornConfig(opts?: {
|
|
257
|
-
|
|
276
|
+
ai?: boolean;
|
|
258
277
|
}): FlatConfigArray;
|
|
259
|
-
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/overrides/config-files.d.ts
|
|
260
280
|
/**
|
|
261
281
|
* Config file overrides — relaxed rules for tool configuration files.
|
|
262
282
|
* Config files (vite, vitest, next, tailwind, postcss) have their own
|
|
@@ -265,7 +285,8 @@ declare function unicornConfig(opts?: {
|
|
|
265
285
|
* File patterns: *.config.*, vite.config.*, vitest.config.*, etc.
|
|
266
286
|
*/
|
|
267
287
|
declare function configFilesOverride(): FlatConfigArray;
|
|
268
|
-
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/overrides/declarations.d.ts
|
|
269
290
|
/**
|
|
270
291
|
* Declaration file overrides — minimal rules for `.d.ts` files.
|
|
271
292
|
* Declaration files follow their own patterns (ambient declarations,
|
|
@@ -274,7 +295,8 @@ declare function configFilesOverride(): FlatConfigArray;
|
|
|
274
295
|
* File pattern: *.d.ts files
|
|
275
296
|
*/
|
|
276
297
|
declare function declarationsOverride(): FlatConfigArray;
|
|
277
|
-
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/overrides/e2e.d.ts
|
|
278
300
|
/**
|
|
279
301
|
* E2E test overrides — Playwright rules + relaxed strictness for E2E tests.
|
|
280
302
|
*
|
|
@@ -283,7 +305,8 @@ declare function declarationsOverride(): FlatConfigArray;
|
|
|
283
305
|
* @see https://github.com/playwright-community/eslint-plugin-playwright#rules
|
|
284
306
|
*/
|
|
285
307
|
declare function e2eOverride(): FlatConfigArray;
|
|
286
|
-
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/overrides/scripts.d.ts
|
|
287
310
|
/**
|
|
288
311
|
* Script file overrides — relaxed rules for build/dev scripts.
|
|
289
312
|
* Scripts are CLI tools that legitimately use console.log and process.exit.
|
|
@@ -291,7 +314,8 @@ declare function e2eOverride(): FlatConfigArray;
|
|
|
291
314
|
* File pattern: scripts dir (*.ts, *.mts, *.js, *.mjs)
|
|
292
315
|
*/
|
|
293
316
|
declare function scriptsOverride(): FlatConfigArray;
|
|
294
|
-
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/overrides/stories.d.ts
|
|
295
319
|
/**
|
|
296
320
|
* Storybook overrides — Storybook best-practice rules for story files.
|
|
297
321
|
*
|
|
@@ -300,7 +324,8 @@ declare function scriptsOverride(): FlatConfigArray;
|
|
|
300
324
|
* @see https://github.com/storybookjs/eslint-plugin-storybook#supported-rules
|
|
301
325
|
*/
|
|
302
326
|
declare function storiesOverride(): FlatConfigArray;
|
|
303
|
-
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/overrides/tests.d.ts
|
|
304
329
|
/**
|
|
305
330
|
* Test file overrides — Vitest rules + Testing Library + relaxed strictness.
|
|
306
331
|
*
|
|
@@ -310,7 +335,8 @@ declare function storiesOverride(): FlatConfigArray;
|
|
|
310
335
|
* @see https://github.com/testing-library/eslint-plugin-testing-library#supported-rules
|
|
311
336
|
*/
|
|
312
337
|
declare function testsOverride(): FlatConfigArray;
|
|
313
|
-
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/oxlint/integration.d.ts
|
|
314
340
|
/**
|
|
315
341
|
* Appends eslint-plugin-oxlint configs that disable all ESLint rules
|
|
316
342
|
* already covered by OxLint. Must be the LAST config in the array.
|
|
@@ -319,12 +345,14 @@ declare function testsOverride(): FlatConfigArray;
|
|
|
319
345
|
* checks and ESLint only runs type-aware and specialty rules.
|
|
320
346
|
*/
|
|
321
347
|
declare function oxlintIntegration(opts: ConfigOptions): FlatConfigArray;
|
|
322
|
-
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/presets/standard.d.ts
|
|
323
350
|
/**
|
|
324
351
|
* Complexity preset — limits for production code that encourage small,
|
|
325
352
|
* focused functions and aggressive extraction of helper functions.
|
|
326
353
|
* @see https://eslint.org/docs/latest/rules/#suggestions (complexity rules)
|
|
327
354
|
*/
|
|
328
355
|
declare function standardComplexity(): FlatConfigArray;
|
|
329
|
-
|
|
356
|
+
//#endregion
|
|
330
357
|
export { aiConfig as ai, baseConfig as base, composeConfig, configFilesOverride as configFiles, cspellConfig as cspell, deMorganConfig as deMorgan, declarationsOverride as declarations, e2eOverride as e2e, importsConfig as imports, jsdocConfig as jsdoc, jsonConfig as json, markdownConfig as markdown, nodeConfig as node, oxlintIntegration as oxlint, packageJsonConfig as packageJson, packageJsonAiConfig as packageJsonAi, perfectionistConfig as perfectionist, perfectionistAiConfig as perfectionistAi, prettierCompatConfig as prettier, reactConfig as react, reactEffectConfig as reactEffect, regexpConfig as regexp, scriptsOverride as scripts, securityConfig as security, sonarjsConfig as sonarjs, standardComplexity, storiesOverride as stories, testsOverride as tests, typescriptConfig as typescript, unicornConfig as unicorn };
|
|
358
|
+
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.d.ts","names":[],"sources":["../src/build/compose.ts","../src/configs/ai.ts","../src/configs/base.ts","../src/configs/cspell.ts","../src/configs/de-morgan.ts","../src/configs/imports.ts","../src/configs/jsdoc.ts","../src/configs/json.ts","../src/configs/markdown.ts","../src/configs/node.ts","../src/configs/package-json.ts","../src/configs/perfectionist.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/react-effect.ts","../src/configs/regexp.ts","../src/configs/security.ts","../src/configs/sonarjs.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/overrides/config-files.ts","../src/overrides/declarations.ts","../src/overrides/e2e.ts","../src/overrides/scripts.ts","../src/overrides/stories.ts","../src/overrides/tests.ts","../src/oxlint/integration.ts","../src/presets/standard.ts"],"mappings":";;;iBAiGgB,aAAA,CAAc,IAAA,EAAM,aAAA,GAAgB,eAAe;;;iBCPnD,QAAA,IAAY,eAAe;;;;;ADO3C;;;;;;;;iBEuCgB,UAAA,CAAW,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;AFvCpE;;;;;iBGtFgB,YAAA,IAAgB,eAAe;;;;;AHsF/C;;;;;;;iBIpFgB,cAAA,IAAkB,eAAe;;;;;AJoFjD;;;;;;;;iBKlFgB,aAAA,IAAiB,eAAe;;;;;ALkFhD;;;;;;;;AAAmE;iBMhFnD,WAAA,CAAY,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;ANgFrE;;;;iBOlFgB,UAAA,IAAc,eAAe;;;;;APkF7C;;;;;;;;AAAmE;iBQlFnD,cAAA,IAAkB,eAAe;;;;;ARkFjD;;;;;;iBSlFgB,UAAA,CAAW,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;ATkFpE;;;;;;;;AAAmE;;iBUjFnD,iBAAA,IAAqB,eAAe;;AT0EpD;;;iBS3DgB,mBAAA,IAAuB,eAAe;;;;;AVkEtD;;;;;;;;AAAmE;;;;ACPnE;;;;AAA2C;;;iBUhE3B,mBAAA,IAAuB,eAAe;AT8GtD;;;;;;;AAAA,iBSrDgB,qBAAA,IAAyB,eAAe;;;;;AXcxD;;;;;iBYpFgB,oBAAA,IAAwB,eAAe;;;;;;AX6EvD;;;;AAA2C;;;;AC8C3C;;;;;;;iBW+EgB,WAAA,CAAY,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;AbtHrE;;;;;;;;AAAmE;iBclFnD,iBAAA,IAAqB,eAAe;;;;;AdkFpD;;;;;;;iBelFgB,YAAA,CAAa,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;AfkFtE;;;;;iBgBhFgB,cAAA,IAAkB,eAAe;;;;;AhBgFjD;;;;;;iBiBnFgB,aAAA,CAAc,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;AjBmFvE;;;;;;;;AAAmE;;;iBkB5EnD,gBAAA,CAAiB,IAAA;EAAS,EAAA;EAAc,KAAA;AAAA,IAAoB,eAAe;;;;;AlB4E3F;;;;;;iBmBlFgB,aAAA,CAAc,IAAA;EAAS,EAAA;AAAA,IAAiB,eAAe;;;;;AnBkFvE;;;;;iBoBxFgB,mBAAA,IAAuB,eAAe;;;;;ApBwFtD;;;;;iBqBxFgB,oBAAA,IAAwB,eAAe;;;;;ArBwFvD;;;;;iBsBtFgB,WAAA,IAAe,eAAe;;;;;AtBsF9C;;;;iBuBzFgB,eAAA,IAAmB,eAAe;;;;;AvByFlD;;;;;iBwBtFgB,eAAA,IAAmB,eAAe;;;;;AxBsFlD;;;;;;iByBsEgB,aAAA,IAAiB,eAAe;;;;;AzBtEhD;;;;;iB0BpDgB,iBAAA,CAAkB,IAAA,EAAM,aAAA,GAAgB,eAAe;;;;;A1BoDvE;;;iB2B1FgB,kBAAA,IAAsB,eAAe"}
|