|
| 1 | +import antfu from '@antfu/eslint-config' |
| 2 | +import nextPlugin from '@next/eslint-plugin-next' |
| 3 | +import react from 'eslint-plugin-react' |
| 4 | +import reactHooks from 'eslint-plugin-react-hooks' |
| 5 | +import tailwindcss from 'eslint-plugin-tailwindcss' |
| 6 | + |
| 7 | +export default antfu({ |
| 8 | + ignores: [ |
| 9 | + '.github/', |
| 10 | + '.mergify.yml', |
| 11 | + '.pnpm-store/', |
| 12 | + '.vscode', |
| 13 | + 'next-env.d.ts', |
| 14 | + 'out/', |
| 15 | + 'package.json', |
| 16 | + 'src/dotenv.ts', |
| 17 | + 'src/pages/index.tsx', |
| 18 | + 'tsconfig.json', |
| 19 | + ], |
| 20 | + plugins: { |
| 21 | + react, |
| 22 | + 'react-hooks': reactHooks, |
| 23 | + 'next': nextPlugin, |
| 24 | + tailwindcss, |
| 25 | + }, |
| 26 | + extends: ['next/core-web-vitals'], |
| 27 | + languageOptions: { |
| 28 | + ecmaVersion: 'latest', |
| 29 | + parserOptions: { |
| 30 | + ecmaFeatures: { |
| 31 | + jsx: true, |
| 32 | + }, |
| 33 | + }, |
| 34 | + }, |
| 35 | + rules: { |
| 36 | + 'react/jsx-uses-react': 'off', |
| 37 | + 'react/react-in-jsx-scope': 'off', |
| 38 | + 'react-hooks/rules-of-hooks': 'error', |
| 39 | + 'react-hooks/exhaustive-deps': 'error', |
| 40 | + 'next/no-img-element': 'error', |
| 41 | + 'next/no-page-custom-font': 'error', |
| 42 | + 'next/no-sync-scripts': 'error', |
| 43 | + 'next/google-font-display': 'error', |
| 44 | + 'next/no-css-tags': 'error', |
| 45 | + 'next/no-document-import-in-page': 'error', |
| 46 | + 'next/next-script-for-ga': 'error', |
| 47 | + 'next/no-html-link-for-pages': 'error', |
| 48 | + 'next/no-assign-module-variable': 'error', |
| 49 | + 'next/no-before-interactive-script-outside-document': 'error', |
| 50 | + 'tailwindcss/classnames-order': 'error', |
| 51 | + }, |
| 52 | + settings: { |
| 53 | + react: { |
| 54 | + version: 'detect', |
| 55 | + }, |
| 56 | + }, |
| 57 | +}) |
0 commit comments