forked from Zettlr/Zettlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
95 lines (93 loc) · 3.42 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
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"plugins": [
"@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", ".mjs" ]
},
"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",
"@typescript-eslint/dot-notation": ["warn"],
"@typescript-eslint/no-confusing-void-expression": "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"
],
// 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": 3
}],
// We allow the use of v-html directives, because we sanitize any user
// provided HTML to only contain safe tags. The only stuff we currently
// put in there is translation strings, which we sanitise in the trans()
// function. NOTE to keep this on my mind!
"vue/no-v-html": "off",
// This is a rule for Vue2, as per the documentation we should turn it
// off. See: https://eslint.vuejs.org/rules/no-v-for-template-key.html
"vue/no-v-for-template-key": "off",
// 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" ],
// Only warn if there's no array comparison given
"@typescript-eslint/require-array-sort-compare": [ "warn" ],
// If we activate this rule, we have about 500 errors that there are no
// spaces around | operators. Hasn't been a problem until now, won't be
// one in the future.
"@typescript-eslint/space-infix-ops": "off",
"@typescript-eslint/no-base-to-string": ["error", {
"ignoredTypeNames": ["Text"]
}]
}
}