-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
54 lines (53 loc) · 1.53 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
/* eslint-disable */
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'@vue/airbnb', // TODO: #5 Add the airbnb-eslint config itself (@vue/airbnb is not really optimized for vite)
'@vue/typescript/recommended',
],
parserOptions: {
ecmaVersion: 2020,
},
settings: {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
alias: {
map: [
['@', './src'],
],
extensions: [".js", ".jsx", ".ts", ".tsx", ".vue"]
}
},
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-multiple-empty-lines': ['error', { max: 4, maxEOF: 1 }],
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'no-trailing-spaces': ['error', { skipBlankLines: true }],
'indent': ['error', 2, { ignoreComments: true, SwitchCase: 1 }],
// TODO (unimportant): find a better solution than disable it completely
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
// TODO Unimportant: find a way to set variables to false, but allow variable funcitons in vue script
"no-use-before-define": ["error", { "functions": false, "classes": true, "variables": false }],
"no-else-return": ["error", {"allowElseIf": true}],
},
overrides: [
//
],
};