-
-
Notifications
You must be signed in to change notification settings - Fork 346
/
Copy patheslint.config.js
66 lines (65 loc) · 1.42 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import javascript from '@eslint/js';
import typescript from 'typescript-eslint';
import astro from 'eslint-plugin-astro';
import svelte from 'eslint-plugin-svelte';
import react from 'eslint-plugin-react';
import globals from 'globals';
import prettier from 'eslint-plugin-prettier/recommended';
/**
* @see https://eslint.org/docs/latest/use/configure/
* @type {import('eslint').Linter.Config}
*/
export default typescript.config(
/**
* Ignore
*/
{
ignores: ['**/node_modules/', '**/dist/', '**/build/', '**/pagefind/', '**/.svelte-kit/', '**/.astro/', '**/.next/', '**/.vercel/']
},
/**
* Prettier
*/
prettier,
/**
* Javascript
*/
javascript.configs.recommended,
/**
* Typescript
*/
typescript.configs.recommended,
/**
* Astro
*/
astro.configs.recommended,
/**
* Svelte
*/
svelte.configs['flat/recommended'],
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
extraFileExtensions: ['.svelte'],
parser: typescript.parser
},
globals: {
...globals.browser,
...globals.node
}
},
// Disabled temporarily while we communiticate this issue upstream to Zag.
// Zag does not not readily provide keys for for Svelte as they do React.
rules: {
'svelte/require-each-key': 'off'
}
},
/**
* React
*/
{
files: ['**/*.tsx', '**/*.jsx'],
...react.configs.flat.recommended,
...react.configs.flat['jsx-runtime']
}
);