-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (41 loc) · 1.15 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
extends: [
'next/core-web-vitals',
'eslint-config-airbnb',
'prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended'
],
parser: '@typescript-eslint/parser', // Vue项目作为可选
plugins: ['import', 'prettier', 'react', 'react-hooks'], // Vue项目作为可选
rules: {
'no-console': 'off',
'linebreak-style': ['error', 'unix'],
'no-cond-assign': ['error', 'except-parens'],
'no-unused-expressions': [
'error',
{
allowTernary: true,
allowShortCircuit: true,
allowTaggedTemplates: true
}
],
'import/order': 'off',
'arrow-parens': ['error', 'as-needed'],
'prettier/prettier': 'off',
'spaced-comment': ['error', 'always', { markers: ['/'] }],
'no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'react/function-component-definition': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
'react/jsx-props-no-spreading': 'off'
}
}