-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (54 loc) · 1.42 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
module.exports = {
env: {
node: true,
es6: true,
browser: true
},
parser: '@babel/eslint-parser',
extends: ['next/core-web-vitals', 'prettier'],
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
project: './jsconfig.json',
ecmaFeatures: {
jsx: true,
modules: true,
experimentalObjectRestSpread: true
}
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/display-name': 'off',
'@next/next/no-img-element': 'off',
'react/no-unescaped-entities': 'off',
'import/no-anonymous-default-export': 'off',
// add new line above comment
'lines-around-comment': [
'error',
{
beforeLineComment: true,
beforeBlockComment: true,
allowBlockStart: true,
allowClassStart: true,
allowObjectStart: true,
allowArrayStart: true
}
],
// add new line above return
'newline-before-return': 'error',
// add new line below import
'import/newline-after-import': [
'error',
{
count: 1
}
],
// add new line after each var, const, let declaration
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['export'], next: ['*'] },
{ blankLine: 'always', prev: ['*'], next: ['multiline-const', 'multiline-let', 'multiline-var', 'export'] }
]
}
}