-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
39 lines (39 loc) · 1005 Bytes
/
.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
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
'./.eslintrc-auto-import.json'
],
rules: {
'react/jsx-no-undef': 'off',
'no-console': [
process.env.NODE_ENV === 'production' ? 'error' : 'off',
{ allow: ['warn', 'error'] }
],
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'prettier/prettier': 'off' // turn off prettier rules due to conflict, and should be handled by prettier itself
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'no-undef': 'off', // should be off for typescript
'@typescript-eslint/no-unused-vars': 'warn'
}
}
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
}
}
}