This repository was archived by the owner on Mar 18, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
59 lines (52 loc) · 1.86 KB
/
eslint.config.mjs
File metadata and controls
59 lines (52 loc) · 1.86 KB
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
// @ts-check
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslint from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import prettierConfig from 'eslint-config-prettier';
const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});
export default tseslint.config(
{ ignores: ['node_modules/', '.next/', 'backup/'] },
eslint.configs.recommended,
...tseslint.configs.recommended,
...compat.extends(
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'next/core-web-vitals',
),
{
files: ['src/**/*.{js,jsx,ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'off',
'react/no-unescaped-entities': 'warn',
'jsx-a11y/no-noninteractive-tabindex': 'warn',
'jsx-a11y/label-has-associated-control': 'warn',
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/no-static-element-interactions': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'jsx-a11y/mouse-events-have-key-events': 'warn',
'jsx-a11y/no-autofocus': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
//TODO 아래 두개 추가했는데, 문제 없는지 확인.
'react-hooks/exhaustive-deps': 'warn',
'no-useless-escape': 'warn',
},
},
prettierConfig,
);