-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (53 loc) · 1.53 KB
/
.eslintrc.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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2017,
sourceType: 'module'
},
env: {
browser: true,
commonjs: true,
es6: true
},
extends: ['airbnb', 'eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'plugin:storybook/recommended'],
plugins: ['react', 'jsx-a11y', '@typescript-eslint'],
rules: {
/** 함수의 명시적 타입 리턴을 명시적으로 써주지 않아도 되도록 하는 옵션. */
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-var-requires': 0,
// prettier
'prettier/prettier': ['error', {
endOfLine: 'auto'
}],
'no-use-before-define': 'off',
'import/no-unresolved': 'off',
'react/jsx-filename-extension': [2, {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}],
// label
'jsx-a11y/label-has-associated-control': 'off',
// import
'import/extensions': 'off',
// 단항 연산자 가능하게
'no-plusplus': 'off',
// single quote 가능하게
'dot-notation': [2, {
allowKeywords: false
}]
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json']
}
},
'import/extensions': ['.js', '.ts', '.mjs', '.jsx', '.tsx']
}
};