-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.14 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
module.exports = {
'extends': [
'plugin:@typescript-eslint/recommended',
'plugin:vue/recommended',
],
'parser': 'vue-eslint-parser',
'parserOptions': {
'extraFileExtensions': ['.vue'],
'parser': '@typescript-eslint/parser',
'sourceType': 'module',
},
'plugins': [
'eslint-plugin-import',
'eslint-plugin-jsdoc',
'eslint-plugin-prefer-arrow',
'@typescript-eslint',
],
'rules': {
// Order vue attributes alphabetically
'vue/attributes-order': ['warn', {
'alphabetical': true,
}],
// Ensure 2 indent is used
'vue/html-indent': ['warn', 2, {
'attribute': 2,
}],
// Never place the closing `>` on a newline
'vue/html-closing-bracket-newline': ['error', {
'singleline': 'never',
'multiline': 'never',
}],
// Force `<Component/>` without space(s) before `/>`
'vue/html-closing-bracket-spacing': ['warn', {
'selfClosingTag': 'never',
}],
// Configure custom modifiers
'vue/valid-v-on': ['error', {
'modifiers': ['at', 'hash'],
}],
// Required to not mark bootstrap-vue table slot syntax as invalid
'vue/valid-v-slot': ['error', {
'allowModifiers': true,
}],
'max-len': ['warn', {
'code': 140,
'ignoreTrailingComments': true,
}],
// Mark as warning to not block during dev work, and allow with description
'@typescript-eslint/ban-ts-comment': ['warn', {
'ts-ignore': 'allow-with-description',
}],
// There are to many issues with the ident plugin: https://github.com/typescript-eslint/typescript-eslint/issues/1824
'@typescript-eslint/indent': 'off',
// Only allow single quotes
'@typescript-eslint/quotes': [
'warn',
'single',
],
// Ensure a return type is set on all functions
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': ['warn', {
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
allowDirectConstAssertionInArrowFunctions: true,
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
}],
},
};