/
.eslintrc.js
83 lines (83 loc) · 2.51 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = {
root: true,
env: {
node: true,
browser: true,
},
extends: [
'plugin:@next/next/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
],
plugins: ['@typescript-eslint', '@emotion', 'testing-library', 'import', 'react-hooks'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
project: ['tsconfig.json'],
},
ignorePatterns: ['**/*.test.ts'],
rules: {
indent: 'off',
'brace-style': 'off',
'arrow-parens': 'off',
'no-console': 'off',
'max-len': 'off',
'sort-imports': 'off',
'no-restricted-exports': 'off',
'object-curly-newline': 'off',
'max-params': ['error', 3],
'jsx-quotes': 'off',
'no-confusing-arrow': 'off',
'no-nested-ternary': 'off',
'comma-spacing': 'off',
'function-paren-newline': 'off',
'implicit-arrow-linebreak': 'off',
'operator-linebreak': 'off',
'no-underscore-dangle': 'off',
'no-useless-constructor': 'off',
'no-use-before-define': 'off',
'no-param-reassign': 'off',
'no-return-await': 'off',
'prefer-regex-literals': 'off',
'lines-between-class-members': 'off',
// typescript
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
// next
'@next/next/no-html-link-for-pages': 'off',
'@next/next/no-server-import-in-page': 'off',
// react
'react/react-in-jsx-scope': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-filename-extension': 0,
'react/function-component-definition': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-indent': 'off',
'react/no-danger': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-key': 'warn',
//
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: 'tsconfig.json',
},
},
},
};