-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
49 lines (44 loc) Β· 1.22 KB
/
eslint.config.mjs
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
import antfu from '@antfu/eslint-config';
// @ts-ignore
import nextPlugin from '@next/eslint-plugin-next';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import tailwind from 'eslint-plugin-tailwindcss';
export default antfu(
{
react: true,
typescript: true,
lessOpinionated: true,
isInEditor: false,
stylistic: {
semi: true,
},
formatters: {
css: true,
},
ignores: [
'**/node_modules',
'.next',
'next-env.d.ts',
],
},
...tailwind.configs['flat/recommended'],
jsxA11y.flatConfigs.recommended,
{
plugins: {
'@next/next': nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
},
},
{
rules: {
'antfu/no-top-level-await': 'off', // Allow top-level await
'style/brace-style': ['error', '1tbs'], // Use the default brace style
'ts/consistent-type-definitions': ['error', 'type'], // Use `type` instead of `interface`
'react/prefer-destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
'node/prefer-global/process': 'off', // Allow using `process.env`
},
},
);