-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
54 lines (53 loc) · 1.45 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
const prettierConfig = require('./prettier.config')
module.exports = {
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier'],
extends: ['next/core-web-vitals', 'prettier'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx'] }],
'prettier/prettier': ['error', prettierConfig],
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'prefer-destructuring': [
'error',
{
array: false,
object: true,
},
],
'prefer-const': 'error',
'prefer-template': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-unused-vars': 'off', // replaced by @typescript-eslint/no-unused-vars
},
env: {
browser: true,
node: true,
es6: true,
},
}