forked from vitelabs/vite-web-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
148 lines (148 loc) · 4.86 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
module.exports = {
"parser": "vue-eslint-parser",
"plugins": [
'typescript',
],
"extends": [
"eslint:recommended",
'plugin:vue/essential'
],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"globals": {
"TradingView": true,
"window": true,
"_hmt": true,
"viteWalletStorage": true,
"viteWalletI18n": true,
"DESKTOP": true,
"ipcRenderer": true,
"touchID": true,
"VITE_NODE_API": true
},
"rules": {
"eqeqeq": "error",
"no-else-return": "error",
"no-labels": "error",
"no-return-assign": "error",
"no-multi-spaces": "error",
"no-param-reassign": "warn",
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-console": "off",
"no-useless-escape": "off",
"vue/html-indent": ["error", 4],
"no-debugger": "warn",
"array-bracket-spacing": ["error", "always", {
"singleValue": false,
"arraysInArrays": false
}],
"brace-style": "error",
"comma-dangle": ["error", "never"],
"comma-spacing": ["error", {
"before": false,
"after": true
}],
"comma-style": ["error", "last"],
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"function-paren-newline": ["error", "never"],
"key-spacing" : ["error", {
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}],
"keyword-spacing": ["error", {
"before": true,
"after": true
}],
"lines-between-class-members": ["error", "always", {
"exceptAfterSingleLine": true
}],
"max-depth": ["error", 4],
"max-nested-callbacks": ["error", 3],
"max-statements-per-line": ["error", {
"max": 1
}],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }],
"no-lonely-if": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": "error",
"no-negated-condition": "error",
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": ["error", "beside"],
"object-curly-newline": ["error", {
"multiline": true
}],
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", {
"allowAllPropertiesOnSameLine": true
}],
"operator-linebreak": ["error", "before"],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": ["error",
{ "blankLine": "always", "prev": "block", "next": "*" },
{ "blankLine": "always", "prev": "directive", "next": "*" }
],
"semi-style": ["error", "last"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always"],
"switch-colon-spacing": "error",
"template-tag-spacing": "error",
"arrow-body-style": ["error", "as-needed", {
"requireReturnForObjectLiteral": true
}],
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": "error",
"constructor-super": "error",
"generator-star-spacing": ["error", {
"before": true,
"after": false
}],
"no-confusing-arrow": "warn",
"no-duplicate-imports": "error",
"no-useless-computed-key": "warn",
"no-useless-constructor": "warn",
"no-var": "error",
"no-useless-rename": "error",
"prefer-const": "warn",
"prefer-template": "error",
"rest-spread-spacing": ["error", "never"],
"yield-star-spacing": ["error", "before"],
"template-curly-spacing": ["error", "always"],
"@typescript-eslint/no-unused-vars": false,
"no-unused-vars": [1]
// "require-jsdoc": ["error", {
// "require": {
// "FunctionDeclaration": true,
// "MethodDefinition": true,
// "ClassDeclaration": true
// }
// }]
// "new-cap": ["error", { "capIsNew": true }]
}
};