-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
54 lines (53 loc) · 1.71 KB
/
eslint.config.js
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
import eslint from '@eslint/js';
import nextPlugin from '@next/eslint-plugin-next';
import prettierConfig from 'eslint-config-prettier';
import eslintPluginReact from 'eslint-plugin-react';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module',
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: { jsx: true },
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
react: eslintPluginReact,
'@next/next': nextPlugin,
'simple-import-sort': simpleImportSort,
},
settings: {
react: { version: 'detect' },
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/no-unescaped-entities': 'off',
'@next/next/no-page-custom-font': 'off',
'react/self-closing-comp': ['error', { component: true, html: true }],
'react/jsx-first-prop-new-line': 'error',
indent: ['error', 2, { SwitchCase: 1 }],
'eol-last': 'error',
'no-multiple-empty-lines': ['error', { max: 1 }],
semi: ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': true, // daum: any 로 지정
'comma-spacing': ['error', { before: false, after: true }],
},
},
prettierConfig,
{
ignores: ['node_modules', 'dist'],
},
);