forked from nextcloud/spreed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
85 lines (85 loc) · 2.21 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
extends: [
'@nextcloud',
],
globals: {
// @nextcloud/webpack-vue-config globals
appName: 'readonly',
appVersion: 'readonly',
// Desktop build globals
IS_DESKTOP: 'readonly',
},
rules: {
'import/newline-after-import': 'warn',
'import/no-named-as-default-member': 'off',
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index'], 'unknown'],
pathGroups: [
{
// group all style imports at the end
pattern: '{*.css,*.scss}',
patternOptions: { matchBase: true },
group: 'unknown',
position: 'after',
},
{
// group material design icons
pattern: 'vue-material-design-icons/**',
group: 'external',
position: 'after',
},
{
// group @nextcloud imports
pattern: '@nextcloud/{!(vue),!(vue)/**}',
group: 'external',
position: 'after',
},
{
// group @nextcloud/vue imports
pattern: '{@nextcloud/vue,@nextcloud/vue/**}',
group: 'external',
position: 'after',
},
{
// group project components
pattern: '*.vue',
patternOptions: { matchBase: true },
group: 'external',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['@nextcloud', 'vue-material-design-icons'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
warnOnUnassignedImports: true,
},
],
// Prepare for Vue 3 Migration
'vue/no-deprecated-data-object-declaration': 'warn',
'vue/no-deprecated-events-api': 'warn',
'vue/no-deprecated-filter': 'warn',
'vue/no-deprecated-functional-template': 'warn',
'vue/no-deprecated-html-element-is': 'warn',
'vue/no-deprecated-props-default-this': 'warn',
'vue/no-deprecated-router-link-tag-prop': 'warn',
'vue/no-deprecated-scope-attribute': 'warn',
'vue/no-deprecated-slot-attribute': 'warn',
'vue/no-deprecated-slot-scope-attribute': 'warn',
'vue/no-deprecated-v-is': 'warn',
'vue/no-deprecated-v-on-number-modifiers': 'warn',
'vue/require-explicit-emits': 'warn',
},
overrides: [
{
files: ['**/*.spec.js'],
rules: {
'node/no-unpublished-import': 'off',
},
},
],
}