-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
70 lines (68 loc) · 1.9 KB
/
.eslintrc.cjs
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
// Config taken from https://github.com/owncloud/web/blob/master/packages/eslint-config/index.js
// We can remove this and extend it using '@ownclouders/eslint-config' once the updated version is published
// Also, we can remove the unnecessary dependencies
// .eslintrc.json
// {
// "extends": [
// "@ownclouders"
// ]
// }
module.exports = {
env: {
browser: true,
es6: true,
amd: true
},
extends: ['plugin:vue/vue3-recommended', 'plugin:prettier-vue/recommended'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
js: '@babel/eslint-parser',
ts: '@typescript-eslint/parser'
},
requireConfigFile: false,
sourceType: 'module'
},
rules: {
/**
* TODO: fix project import issues and then enable it
* 'sort-imports': 'warn',
*/
'require-await': 'warn',
'no-new': 'off',
'node/no-callback-literal': 'off',
'unused-imports/no-unused-imports': 'error',
'nonblock-statement-body-position': ['error', 'below'],
curly: 'error',
// Vue 3 rules: (need to be fixed, but can be done incrementally)
'vue/no-deprecated-events-api': 'warn'
},
globals: {
require: false,
requirejs: false
},
plugins: ['unused-imports'],
overrides: [
{
files: ['**/*.vue'],
extends: ['plugin:vue/recommended', 'plugin:prettier-vue/recommended'],
rules: {
'vue/multi-word-component-names': 'warn',
'vue/no-multiple-template-root': 'off',
'vue/no-v-model-argument': 'off',
'vue/no-v-text-v-html-on-component': 'warn'
}
},
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'prefer-const': 'warn'
}
}
]
}