forked from Tencent/tmagic-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.cjs
76 lines (75 loc) · 2.16 KB
/
prettier.cjs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
plugins: ['prettier'],
rules: {
'wrap-iife': 'off',
'template-curly-spacing': 'off',
'space-infix-ops': 'off',
'space-in-parens': 'off',
'space-before-blocks': 'off',
'quote-props': 'off',
'padded-blocks': 'off',
'operator-linebreak': 'off',
'object-curly-spacing': 'off',
'nonblock-statement-body-position': 'off',
'no-whitespace-before-property': 'off',
'no-trailing-spaces': 'off',
'no-multiple-empty-lines': 'off',
'no-mixed-operators': 'off',
'no-confusing-arrow': 'off',
'newline-per-chained-call': 'off',
'max-len': 'off',
'linebreak-style': 'off',
'key-spacing': 'off',
'implicit-arrow-linebreak': 'off',
'generator-star-spacing': 'off',
'function-paren-newline': 'off',
'eol-last': 'off',
'computed-property-spacing': 'off',
'comma-style': 'off',
'comma-dangle': 'off',
'block-spacing': 'off',
'arrow-spacing': 'off',
'arrow-parens': 'off',
'array-bracket-spacing': 'off',
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/semi': 'off',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/keyword-spacing': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/func-call-spacing': 'off',
'@typescript-eslint/comma-spacing': 'off',
'@typescript-eslint/brace-style': 'off',
/**
* prettier 格式错误
*/
'prettier/prettier': [
'warn',
{
printWidth: 120,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
rangeStart: 0,
rangeEnd: null,
requirePragma: false,
insertPragma: false,
proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'css',
vueIndentScriptAndStyle: false,
endOfLine: 'lf',
embeddedLanguageFormatting: 'auto',
},
{
usePrettierrc: false,
},
],
},
};