@zayne-labs/eslint-config 0.10.9 → 0.11.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.
- package/README.md +268 -162
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +938 -50
- package/dist/index.js +325 -155
- package/dist/index.js.map +1 -1
- package/dist/{src-CqhpNkRz.js → src-MgbFTVE-.js} +96 -76
- package/dist/src-MgbFTVE-.js.map +1 -0
- package/package.json +32 -20
- package/dist/src-CqhpNkRz.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
# @zayne-labs/eslint-config
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
3
|
+
Opinionated ESLint config with sensible defaults and zero-config setup.
|
|
4
|
+
|
|
5
|
+
- One-line setup with reasonable defaults and best practices
|
|
6
|
+
- Works out-of-the-box with TypeScript, JSX, Vue, JSON, YAML, TOML, Markdown, and more
|
|
7
|
+
- [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) for easy composition
|
|
8
|
+
- Optional framework support: [Vue](#vue), [React](#react), [Svelte](#svelte), [Astro](#astro), [Solid](#solid)
|
|
8
9
|
- Respects `.gitignore` by default
|
|
9
|
-
-
|
|
10
|
-
-
|
|
10
|
+
- Highly [customizable](#customization) when you need it
|
|
11
|
+
- Requires ESLint v9.5.0+ and Node.js v20+
|
|
12
|
+
- Interactive CLI for easy setup
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
Inspired by [antfu/eslint-config](https://github.com/antfu/eslint-config)
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## Usage
|
|
15
17
|
|
|
16
|
-
###
|
|
18
|
+
### Quick Setup (Recommended)
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Use the interactive CLI to set up your config:
|
|
19
21
|
|
|
20
22
|
```bash
|
|
21
|
-
|
|
23
|
+
pnpx @zayne-labs/eslint-config@latest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The CLI will guide you through:
|
|
27
|
+
|
|
28
|
+
- Framework selection (React, Vue, Svelte, Astro)
|
|
29
|
+
- Additional integrations (TailwindCSS, etc.)
|
|
30
|
+
- Automatic dependency installation
|
|
22
31
|
|
|
23
|
-
|
|
24
|
-
npm install -D eslint @zayne-labs/eslint-config
|
|
32
|
+
### Manual Installation
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
```bash
|
|
35
|
+
pnpm add -D eslint @zayne-labs/eslint-config
|
|
28
36
|
```
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
Create `eslint.config.js` in your project root:
|
|
31
39
|
|
|
32
40
|
```js
|
|
33
|
-
// eslint.config.js
|
|
34
41
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
35
42
|
|
|
36
43
|
export default zayne()
|
|
37
44
|
```
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
Done! Check out [customization](#customization) for more options.
|
|
40
47
|
|
|
41
48
|
<details>
|
|
42
|
-
<summary>
|
|
49
|
+
<summary>Combining with legacy config</summary>
|
|
43
50
|
|
|
44
|
-
If you
|
|
51
|
+
If you have existing eslintrc configs, use [`@eslint/eslintrc`](https://www.npmjs.com/package/@eslint/eslintrc) to convert them:
|
|
45
52
|
|
|
46
53
|
```js
|
|
47
|
-
// eslint.config.mjs
|
|
48
54
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
49
55
|
import { FlatCompat } from '@eslint/eslintrc'
|
|
50
56
|
|
|
@@ -54,26 +60,23 @@ export default zayne(
|
|
|
54
60
|
{
|
|
55
61
|
ignores: [],
|
|
56
62
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
extends
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
// Other flat configs...
|
|
63
|
+
...compat.config({
|
|
64
|
+
extends: [
|
|
65
|
+
'eslint:recommended',
|
|
66
|
+
// Other extends...
|
|
67
|
+
],
|
|
68
|
+
}),
|
|
69
|
+
// Other flat configs...
|
|
67
70
|
)
|
|
68
71
|
```
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
Note: `.eslintignore` no longer works in flat config. Use the `ignores` option instead (see [customization](#customization)).
|
|
71
74
|
|
|
72
75
|
</details>
|
|
73
76
|
|
|
74
|
-
###
|
|
77
|
+
### Package Scripts
|
|
75
78
|
|
|
76
|
-
Add these
|
|
79
|
+
Add these scripts to your `package.json`:
|
|
77
80
|
|
|
78
81
|
```json
|
|
79
82
|
{
|
|
@@ -84,18 +87,14 @@ Add these handy scripts to your `package.json`:
|
|
|
84
87
|
}
|
|
85
88
|
```
|
|
86
89
|
|
|
87
|
-
## IDE Support
|
|
90
|
+
## IDE Support
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
Configure your editor to auto-fix ESLint issues on save:
|
|
90
93
|
|
|
91
94
|
<details>
|
|
92
|
-
<summary
|
|
95
|
+
<summary>VS Code</summary>
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
97
|
-
|
|
98
|
-
Add the following settings to your `.vscode/settings.json`:
|
|
97
|
+
Install the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and add to `.vscode/settings.json`:
|
|
99
98
|
|
|
100
99
|
```jsonc
|
|
101
100
|
{
|
|
@@ -135,11 +134,9 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
135
134
|
</details>
|
|
136
135
|
|
|
137
136
|
<details>
|
|
138
|
-
<summary
|
|
139
|
-
|
|
140
|
-
<br>
|
|
137
|
+
<summary>Neovim</summary>
|
|
141
138
|
|
|
142
|
-
Update your configuration
|
|
139
|
+
Update your configuration:
|
|
143
140
|
|
|
144
141
|
```lua
|
|
145
142
|
local lspconfig = require('lspconfig')
|
|
@@ -175,147 +172,175 @@ lspconfig.eslint.setup(
|
|
|
175
172
|
)
|
|
176
173
|
```
|
|
177
174
|
|
|
178
|
-
|
|
175
|
+
**Format on save options:**
|
|
179
176
|
|
|
180
|
-
|
|
177
|
+
- Use the built-in `EslintFixAll` command with an autocmd:
|
|
181
178
|
|
|
182
|
-
|
|
179
|
+
```lua
|
|
180
|
+
lspconfig.eslint.setup({
|
|
181
|
+
on_attach = function(client, bufnr)
|
|
182
|
+
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
183
|
+
buffer = bufnr,
|
|
184
|
+
command = "EslintFixAll",
|
|
185
|
+
})
|
|
186
|
+
end,
|
|
187
|
+
})
|
|
188
|
+
```
|
|
183
189
|
|
|
184
|
-
|
|
185
|
-
lspconfig.eslint.setup({
|
|
186
|
-
--- ...
|
|
187
|
-
on_attach = function(client, bufnr)
|
|
188
|
-
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
189
|
-
buffer = bufnr,
|
|
190
|
-
command = "EslintFixAll",
|
|
191
|
-
})
|
|
192
|
-
end,
|
|
193
|
-
})
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
- Use [conform.nvim](https://github.com/stevearc/conform.nvim)
|
|
197
|
-
- Use [none-ls](https://github.com/nvimtools/none-ls.nvim)
|
|
198
|
-
- Use [nvim-lint](https://github.com/mfussenegger/nvim-lint)
|
|
190
|
+
- Or use [conform.nvim](https://github.com/stevearc/conform.nvim), [none-ls](https://github.com/nvimtools/none-ls.nvim), or [nvim-lint](https://github.com/mfussenegger/nvim-lint)
|
|
199
191
|
|
|
200
192
|
</details>
|
|
201
193
|
|
|
202
194
|
## Customization
|
|
203
195
|
|
|
204
|
-
|
|
196
|
+
This config works out of the box with zero configuration. Customize it when needed:
|
|
205
197
|
|
|
206
198
|
```js
|
|
207
|
-
// eslint.config.js
|
|
208
199
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
209
200
|
|
|
210
201
|
export default zayne({
|
|
202
|
+
// Project type: 'app' (default) or 'lib'
|
|
203
|
+
type: 'app',
|
|
204
|
+
|
|
205
|
+
// Disable all optional configs at once (keeps only essentials)
|
|
206
|
+
withDefaults: false,
|
|
207
|
+
|
|
211
208
|
// Enable stylistic formatting rules
|
|
212
209
|
stylistic: true,
|
|
213
210
|
|
|
214
|
-
// TypeScript and React are auto-detected, but
|
|
211
|
+
// TypeScript and React are auto-detected, but can be explicit
|
|
215
212
|
typescript: true,
|
|
216
213
|
react: true,
|
|
217
214
|
|
|
218
|
-
//
|
|
215
|
+
// Disable specific language support
|
|
219
216
|
jsonc: false,
|
|
220
217
|
yaml: false,
|
|
221
218
|
|
|
222
|
-
//
|
|
219
|
+
// Custom ignores (replaces .eslintignore)
|
|
223
220
|
ignores: [
|
|
224
221
|
'build/**',
|
|
225
|
-
|
|
222
|
+
'dist/**',
|
|
226
223
|
]
|
|
227
224
|
})
|
|
228
225
|
```
|
|
229
226
|
|
|
230
|
-
|
|
227
|
+
### Custom Rules
|
|
228
|
+
|
|
229
|
+
Pass additional configs as extra arguments:
|
|
231
230
|
|
|
232
231
|
```js
|
|
233
|
-
// eslint.config.js
|
|
234
232
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
235
233
|
|
|
236
234
|
export default zayne(
|
|
237
235
|
{
|
|
238
|
-
//
|
|
236
|
+
// Base config
|
|
239
237
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
246
|
-
},
|
|
238
|
+
// Custom overrides
|
|
239
|
+
{
|
|
240
|
+
files: ['**/*.ts'],
|
|
241
|
+
rules: {
|
|
242
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
247
243
|
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
rules: {
|
|
247
|
+
'no-console': 'warn',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
253
250
|
)
|
|
254
251
|
```
|
|
255
252
|
|
|
256
|
-
|
|
253
|
+
### Advanced Composition
|
|
254
|
+
|
|
255
|
+
Import and compose fine-grained configs directly:
|
|
257
256
|
|
|
258
257
|
<details>
|
|
259
|
-
<summary>
|
|
258
|
+
<summary>Show example</summary>
|
|
260
259
|
|
|
261
|
-
|
|
260
|
+
**Note**: This low-level approach is for advanced use cases only. The `zayne()` factory handles option coordination automatically, so use this only if you need granular control over config composition. Not necessarily recommended
|
|
262
261
|
|
|
263
262
|
```js
|
|
264
|
-
// eslint.config.js
|
|
265
263
|
import {
|
|
266
|
-
|
|
264
|
+
astro,
|
|
267
265
|
comments,
|
|
266
|
+
depend,
|
|
267
|
+
expo,
|
|
268
268
|
ignores,
|
|
269
269
|
imports,
|
|
270
270
|
javascript,
|
|
271
271
|
jsdoc,
|
|
272
272
|
jsonc,
|
|
273
|
+
jsx,
|
|
273
274
|
markdown,
|
|
274
275
|
node,
|
|
276
|
+
perfectionist,
|
|
277
|
+
pnpm,
|
|
278
|
+
react,
|
|
279
|
+
solid,
|
|
275
280
|
sortPackageJson,
|
|
276
281
|
sortTsconfig,
|
|
277
282
|
stylistic,
|
|
283
|
+
tailwindcssBetter,
|
|
284
|
+
tanstack,
|
|
278
285
|
toml,
|
|
279
286
|
typescript,
|
|
280
287
|
unicorn,
|
|
281
288
|
vue,
|
|
282
289
|
yaml,
|
|
283
290
|
} from '@zayne-labs/eslint-config'
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
)
|
|
291
|
+
import { FlatConfigComposer } from 'eslint-flat-config-utils'
|
|
292
|
+
|
|
293
|
+
export default new FlatConfigComposer()
|
|
294
|
+
.append(
|
|
295
|
+
ignores(),
|
|
296
|
+
javascript(),
|
|
297
|
+
typescript(),
|
|
298
|
+
jsx(),
|
|
299
|
+
comments(),
|
|
300
|
+
node(),
|
|
301
|
+
jsdoc(),
|
|
302
|
+
imports(),
|
|
303
|
+
unicorn(),
|
|
304
|
+
perfectionist(),
|
|
305
|
+
stylistic(),
|
|
306
|
+
react(),
|
|
307
|
+
vue(),
|
|
308
|
+
jsonc(),
|
|
309
|
+
yaml(),
|
|
310
|
+
toml(),
|
|
311
|
+
markdown(),
|
|
312
|
+
)
|
|
301
313
|
```
|
|
302
314
|
|
|
303
315
|
</details>
|
|
304
316
|
|
|
305
|
-
|
|
317
|
+
See [configs](https://github.com/zayne-labs/eslint-config/blob/main/src/configs) and [factory](https://github.com/zayne-labs/eslint-config/blob/main/src/factory.ts) for implementation details.
|
|
318
|
+
|
|
319
|
+
## Framework & Integration Support
|
|
320
|
+
|
|
321
|
+
Enable framework-specific linting rules and integrations:
|
|
322
|
+
|
|
323
|
+
### Vue
|
|
324
|
+
|
|
325
|
+
```js
|
|
326
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
306
327
|
|
|
307
|
-
|
|
328
|
+
export default zayne({
|
|
329
|
+
vue: true,
|
|
330
|
+
})
|
|
331
|
+
```
|
|
308
332
|
|
|
309
|
-
|
|
333
|
+
Install peer dependencies:
|
|
310
334
|
|
|
311
|
-
|
|
335
|
+
```bash
|
|
336
|
+
pnpm i -D eslint-plugin-vue vue-eslint-parser
|
|
337
|
+
```
|
|
312
338
|
|
|
313
|
-
|
|
339
|
+
### React
|
|
314
340
|
|
|
315
|
-
|
|
341
|
+
Auto-detected in most cases, or enable explicitly:
|
|
316
342
|
|
|
317
343
|
```js
|
|
318
|
-
// eslint.config.js
|
|
319
344
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
320
345
|
|
|
321
346
|
export default zayne({
|
|
@@ -323,18 +348,15 @@ export default zayne({
|
|
|
323
348
|
})
|
|
324
349
|
```
|
|
325
350
|
|
|
326
|
-
|
|
351
|
+
Install peer dependencies (prompted automatically when running ESLint):
|
|
327
352
|
|
|
328
353
|
```bash
|
|
329
354
|
pnpm i -D @eslint-react/eslint-plugin eslint-plugin-react-hooks eslint-plugin-react-refresh
|
|
330
355
|
```
|
|
331
356
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
To enable svelte support, you need to explicitly turn it on:
|
|
357
|
+
### Svelte
|
|
335
358
|
|
|
336
359
|
```js
|
|
337
|
-
// eslint.config.js
|
|
338
360
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
339
361
|
|
|
340
362
|
export default zayne({
|
|
@@ -342,18 +364,15 @@ export default zayne({
|
|
|
342
364
|
})
|
|
343
365
|
```
|
|
344
366
|
|
|
345
|
-
|
|
367
|
+
Install peer dependencies:
|
|
346
368
|
|
|
347
369
|
```bash
|
|
348
370
|
pnpm i -D eslint-plugin-svelte
|
|
349
371
|
```
|
|
350
372
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
To enable astro support, you need to explicitly turn it on:
|
|
373
|
+
### Astro
|
|
354
374
|
|
|
355
375
|
```js
|
|
356
|
-
// eslint.config.js
|
|
357
376
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
358
377
|
|
|
359
378
|
export default zayne({
|
|
@@ -361,18 +380,15 @@ export default zayne({
|
|
|
361
380
|
})
|
|
362
381
|
```
|
|
363
382
|
|
|
364
|
-
|
|
383
|
+
Install peer dependencies:
|
|
365
384
|
|
|
366
385
|
```bash
|
|
367
386
|
pnpm i -D eslint-plugin-astro
|
|
368
387
|
```
|
|
369
388
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
To enable Solid support, you need to explicitly turn it on:
|
|
389
|
+
### Solid
|
|
373
390
|
|
|
374
391
|
```js
|
|
375
|
-
// eslint.config.js
|
|
376
392
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
377
393
|
|
|
378
394
|
export default zayne({
|
|
@@ -380,85 +396,175 @@ export default zayne({
|
|
|
380
396
|
})
|
|
381
397
|
```
|
|
382
398
|
|
|
383
|
-
|
|
399
|
+
Install peer dependencies:
|
|
384
400
|
|
|
385
401
|
```bash
|
|
386
402
|
pnpm i -D eslint-plugin-solid
|
|
387
403
|
```
|
|
388
404
|
|
|
389
|
-
|
|
405
|
+
### TailwindCSS
|
|
390
406
|
|
|
391
|
-
|
|
407
|
+
Uses the enhanced `eslint-plugin-better-tailwindcss` for improved class sorting and validation:
|
|
392
408
|
|
|
393
409
|
```js
|
|
394
|
-
// eslint.config.js
|
|
395
410
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
396
411
|
|
|
397
412
|
export default zayne({
|
|
398
|
-
|
|
413
|
+
tailwindcssBetter: true,
|
|
399
414
|
})
|
|
400
415
|
```
|
|
401
416
|
|
|
402
|
-
|
|
417
|
+
Install peer dependencies:
|
|
403
418
|
|
|
404
419
|
```bash
|
|
405
|
-
pnpm i -D eslint-plugin-tailwindcss
|
|
420
|
+
pnpm i -D eslint-plugin-better-tailwindcss
|
|
406
421
|
```
|
|
407
422
|
|
|
408
|
-
###
|
|
423
|
+
### Expo (React Native)
|
|
424
|
+
|
|
425
|
+
```js
|
|
426
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
427
|
+
|
|
428
|
+
export default zayne({
|
|
429
|
+
expo: true,
|
|
430
|
+
})
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Install peer dependencies:
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
pnpm i -D eslint-config-expo
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### TanStack
|
|
440
|
+
|
|
441
|
+
Support for TanStack Query and Router:
|
|
442
|
+
|
|
443
|
+
```js
|
|
444
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
445
|
+
|
|
446
|
+
export default zayne({
|
|
447
|
+
tanstack: {
|
|
448
|
+
query: true,
|
|
449
|
+
router: true,
|
|
450
|
+
},
|
|
451
|
+
})
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Install peer dependencies:
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
pnpm i -D @tanstack/eslint-plugin-query @tanstack/eslint-plugin-router
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### PNPM Catalogs
|
|
461
|
+
|
|
462
|
+
Lint PNPM catalog protocol usage:
|
|
463
|
+
|
|
464
|
+
```js
|
|
465
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
466
|
+
|
|
467
|
+
export default zayne({
|
|
468
|
+
pnpm: true,
|
|
469
|
+
})
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Install peer dependencies:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
pnpm i -D eslint-plugin-pnpm
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Dependency Management
|
|
479
|
+
|
|
480
|
+
Enforce dependency rules with `eslint-plugin-depend`:
|
|
481
|
+
|
|
482
|
+
```js
|
|
483
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
484
|
+
|
|
485
|
+
export default zayne({
|
|
486
|
+
depend: true,
|
|
487
|
+
})
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Install peer dependencies:
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
pnpm i -D eslint-plugin-depend
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
## Type-Aware Rules
|
|
497
|
+
|
|
498
|
+
Type-aware linting is automatically enabled when TypeScript is detected. It uses the nearest `tsconfig.json` by default.
|
|
499
|
+
|
|
500
|
+
Only specify `tsconfigPath` when you need to:
|
|
501
|
+
|
|
502
|
+
- Point to a tsconfig in a different location
|
|
503
|
+
- Use multiple tsconfigs
|
|
504
|
+
|
|
505
|
+
Single custom tsconfig location:
|
|
506
|
+
|
|
507
|
+
```js
|
|
508
|
+
import { zayne } from '@zayne-labs/eslint-config'
|
|
509
|
+
|
|
510
|
+
export default zayne({
|
|
511
|
+
typescript: {
|
|
512
|
+
tsconfigPath: './config/tsconfig.json',
|
|
513
|
+
},
|
|
514
|
+
})
|
|
515
|
+
```
|
|
409
516
|
|
|
410
|
-
|
|
517
|
+
Multiple tsconfigs:
|
|
411
518
|
|
|
412
519
|
```js
|
|
413
|
-
// eslint.config.js
|
|
414
520
|
import { zayne } from '@zayne-labs/eslint-config'
|
|
415
521
|
|
|
416
522
|
export default zayne({
|
|
417
523
|
typescript: {
|
|
418
|
-
tsconfigPath: 'tsconfig.json',
|
|
524
|
+
tsconfigPath: ['./tsconfig.json', './tsconfig.node.json'],
|
|
419
525
|
},
|
|
420
526
|
})
|
|
421
527
|
```
|
|
422
528
|
|
|
423
|
-
##
|
|
529
|
+
## Inspecting Config
|
|
424
530
|
|
|
425
|
-
|
|
531
|
+
View active rules using the [ESLint Config Inspector](https://github.com/eslint/config-inspector):
|
|
426
532
|
|
|
427
533
|
```bash
|
|
428
|
-
|
|
534
|
+
npx @eslint/config-inspector@latest
|
|
429
535
|
```
|
|
430
536
|
|
|
431
|
-
## Versioning
|
|
537
|
+
## Versioning
|
|
432
538
|
|
|
433
|
-
|
|
539
|
+
Follows [Semantic Versioning](https://semver.org/) with config-specific considerations:
|
|
434
540
|
|
|
435
|
-
|
|
541
|
+
**Breaking changes:**
|
|
436
542
|
|
|
437
|
-
- Node.js version
|
|
438
|
-
- Major refactors
|
|
439
|
-
-
|
|
543
|
+
- Node.js version requirements
|
|
544
|
+
- Major refactors affecting setup
|
|
545
|
+
- Plugin updates with significant behavior changes
|
|
440
546
|
- Changes affecting most codebases
|
|
441
547
|
|
|
442
|
-
|
|
548
|
+
**Non-breaking changes:**
|
|
443
549
|
|
|
444
|
-
-
|
|
445
|
-
-
|
|
446
|
-
-
|
|
550
|
+
- Rule additions, removals, or option changes
|
|
551
|
+
- Dependency updates
|
|
552
|
+
- Stricter linting (considered improvements)
|
|
447
553
|
|
|
448
554
|
## FAQ
|
|
449
555
|
|
|
450
|
-
###
|
|
556
|
+
### I prefer different rules
|
|
451
557
|
|
|
452
|
-
|
|
558
|
+
Override any rules locally using the [customization](#customization) options. For extensive changes, consider forking the repo.
|
|
453
559
|
|
|
454
|
-
##
|
|
560
|
+
## Contributing
|
|
455
561
|
|
|
456
|
-
|
|
562
|
+
Contributions welcome! See our [contribution guidelines](https://github.com/zayne-labs/contribute) for details.
|
|
457
563
|
|
|
458
|
-
##
|
|
564
|
+
## License
|
|
459
565
|
|
|
460
|
-
MIT ©
|
|
566
|
+
MIT © Ryan Zayne
|
|
461
567
|
|
|
462
|
-
##
|
|
568
|
+
## Credits
|
|
463
569
|
|
|
464
|
-
Inspired by
|
|
570
|
+
Inspired by [antfu/eslint-config](https://github.com/antfu/eslint-config)
|