forked from Tencent/cherry-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
46 lines (46 loc) · 1.13 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
module.exports = {
env: {
browser: true,
es6: true,
'jest/globals': true,
},
extends: ['eslint-config-tencent', 'plugin:prettier/recommended'],
globals: {
BUILD_ENV: 'readonly',
process: 'readonly',
},
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['prettier', 'jest'],
rules: {
'prettier/prettier': 'error',
// curly: 'error',
// 'brace-style': ['error', '1tbs'],
// 不允许修改函数参数, 但允许修改函数参数中的属性
'no-param-reassign': ['error', { props: false }],
// indent: ['error', 4],
// // 'max-len': ['error', { code: 100 }],
// 'linebreak-style': ['error', 'unix'],
// quotes: ['error', 'single'],
// semi: ['error', 'always'],
'no-unused-vars': [
'warn',
{
args: 'none',
},
],
// 'comma-dangle': [
// 'warn',
// {
// arrays: 'only-multiline',
// objects: 'only-multiline',
// imports: 'never',
// exports: 'never',
// functions: 'never',
// },
// ],
},
};