-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
57 lines (56 loc) · 1.43 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
50
51
52
53
54
55
56
57
import antfu from '@antfu/eslint-config'
import nextPlugin from '@next/eslint-plugin-next'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import tailwindcss from 'eslint-plugin-tailwindcss'
export default antfu({
ignores: [
'.github/',
'.mergify.yml',
'.pnpm-store/',
'.vscode',
'next-env.d.ts',
'out/',
'package.json',
'src/dotenv.ts',
'src/pages/index.tsx',
'tsconfig.json',
],
plugins: {
react,
'react-hooks': reactHooks,
'next': nextPlugin,
tailwindcss,
},
extends: ['next/core-web-vitals'],
languageOptions: {
ecmaVersion: 'latest',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'next/no-img-element': 'error',
'next/no-page-custom-font': 'error',
'next/no-sync-scripts': 'error',
'next/google-font-display': 'error',
'next/no-css-tags': 'error',
'next/no-document-import-in-page': 'error',
'next/next-script-for-ga': 'error',
'next/no-html-link-for-pages': 'error',
'next/no-assign-module-variable': 'error',
'next/no-before-interactive-script-outside-document': 'error',
'tailwindcss/classnames-order': 'error',
},
settings: {
react: {
version: 'detect',
},
},
})