|
1 | 1 | import { defineConfig } from "eslint-define-config"; |
2 | 2 | import reactPlugin from "eslint-plugin-react"; |
| 3 | +import reactHooksPlugin from "eslint-plugin-react-hooks"; |
3 | 4 | import typescriptPlugin from "@typescript-eslint/eslint-plugin"; |
4 | | -import typescriptParser from "@typescript-eslint/parser"; |
| 5 | +import prettierPlugin from "eslint-plugin-prettier"; |
| 6 | +import jsxA11yPlugin from "eslint-plugin-jsx-a11y"; |
| 7 | +import nextPlugin from "eslint-plugin-next"; |
5 | 8 |
|
6 | 9 | export default defineConfig([ |
7 | 10 | { |
8 | 11 | files: ["apps/web/**/*.{ts,tsx}"], |
9 | 12 | languageOptions: { |
10 | | - parser: typescriptParser, |
| 13 | + parser: typescriptPlugin, |
11 | 14 | parserOptions: { |
12 | 15 | ecmaFeatures: { jsx: true }, |
13 | 16 | ecmaVersion: 2021, |
14 | 17 | sourceType: "module", |
15 | 18 | }, |
16 | 19 | }, |
17 | | - plugins: [ |
18 | | - "react", |
19 | | - "react-hooks", |
20 | | - "@typescript-eslint", |
21 | | - "prettier", |
22 | | - "jsx-a11y", |
23 | | - "next", |
24 | | - ], |
25 | | - extends: [ |
26 | | - "eslint:recommended", |
27 | | - "plugin:@typescript-eslint/recommended", |
28 | | - "plugin:react/recommended", |
29 | | - "plugin:react-hooks/recommended", |
30 | | - "plugin:jsx-a11y/recommended", |
31 | | - "plugin:prettier/recommended", |
32 | | - "plugin:next/core-web-vitals", // ✅ 요거 중요함 Next.js용 |
33 | | - ], |
34 | | - rules: { |
35 | | - "prettier/prettier": "error", |
| 20 | + plugins: { |
| 21 | + react: reactPlugin, |
| 22 | + "react-hooks": reactHooksPlugin, |
| 23 | + "@typescript-eslint": typescriptPlugin, |
| 24 | + prettier: prettierPlugin, |
| 25 | + "jsx-a11y": jsxA11yPlugin, |
| 26 | + next: nextPlugin, |
36 | 27 | }, |
37 | | - }, |
38 | | - { |
39 | | - files: ["apps/webview/**/*.{ts,tsx}"], |
40 | | - languageOptions: { |
41 | | - parser: typescriptParser, |
42 | | - parserOptions: { |
43 | | - ecmaFeatures: { jsx: true }, |
44 | | - ecmaVersion: 2021, |
45 | | - sourceType: "module", |
| 28 | + settings: { |
| 29 | + react: { |
| 30 | + version: "detect", |
46 | 31 | }, |
47 | 32 | }, |
48 | | - plugins: [ |
49 | | - "react", |
50 | | - "react-hooks", |
51 | | - "@typescript-eslint", |
52 | | - "prettier", |
53 | | - "jsx-a11y", |
54 | | - ], |
55 | 33 | extends: [ |
56 | 34 | "eslint:recommended", |
57 | | - "plugin:@typescript-eslint/recommended", |
58 | 35 | "plugin:react/recommended", |
59 | 36 | "plugin:react-hooks/recommended", |
| 37 | + "plugin:@typescript-eslint/recommended", |
60 | 38 | "plugin:jsx-a11y/recommended", |
61 | 39 | "plugin:prettier/recommended", |
| 40 | + "plugin:next/core-web-vitals", |
62 | 41 | ], |
63 | 42 | rules: { |
64 | 43 | "prettier/prettier": "error", |
|
0 commit comments