forked from Zettlr/Zettlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
117 lines (115 loc) · 3.51 KB
/
.eslintrc.json
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
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"plugins": [
"jquery",
"@typescript-eslint"
],
"extends": [
"standard-with-typescript",
"plugin:vue/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2018,
"project": "./tsconfig.json",
"extraFileExtensions": [".vue"]
},
"rules": {
"space-before-function-paren": [
2,
"always"
],
// The following rule-changes to JSStandard Coding Style are tradition,
// as they were included with the default configuration of Atom's ESLint
// plugin, so we'll keep them here for the time being.
"prefer-const": "off",
"quote-props": "off",
"no-prototype-builtins": "off",
"dot-notation": "off",
"array-bracket-spacing": [
2,
"always",
{
"objectsInArrays": false,
"singleValue": false
}
],
// Here follow vue-styles. While the short form is recommended
// I tend to value verbose code. At least for now, discussion is
// well received.
"vue/v-bind-style": [
"error",
"longform"
],
"vue/v-on-style": [
"error",
"longform"
],
"vue/component-tags-order": [
"error",
{
"order": [
"template",
"script",
"style"
]
}
],
// Let the implementation decide if self-closing is wanted or not.
"vue/html-self-closing": [ "warn", {
"html": {
"void": "any",
"normal": "any",
"component": "any"
},
"svg": "any",
"math": "any"
}],
// Allow up to three attributes per line so that the contributor can
// decide if the attributes are too long for the 80 character column
"vue/max-attributes-per-line": [ "error", {
"singleline": 3,
"multiline": {
"max": 3,
"allowFirstLine": true
}
}],
// Disallow jquery
"jquery/no-ajax": 2,
"jquery/no-ajax-events": 2,
"jquery/no-animate": 2,
"jquery/no-bind": 2,
"jquery/no-fade": 2,
"jquery/no-load": 2,
"jquery/no-param": 2,
"jquery/no-serialize": 2,
"jquery/no-size": 2,
"jquery/no-sizzle": 2,
"jquery/no-slide": 2,
"jquery/no-submit": 2,
"jquery/no-text": 2,
"jquery/no-toggle": 2,
"jquery/no-trigger": 2,
"jquery/no-trim": 2,
"jquery/no-val": 2,
"jquery/no-when": 2,
"jquery/no-wrap": 2,
// Disable a few typescript rules as we are not yet there to easily implement them
"@typescript-eslint/no-floating-promises": [ "warn" ],
"@typescript-eslint/no-misused-promises": [ "warn" ],
"@typescript-eslint/strict-boolean-expressions": [ "warn" ],
// This rule is necessary for the FSAL Cache (featuring safe deletion of keys)
"@typescript-eslint/no-dynamic-delete": [ "warn" ],
// Only warn if there's no array comparison given
"@typescript-eslint/require-array-sort-compare": [ "warn" ]
}
}