-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.xo-config.cjs
79 lines (77 loc) · 2.67 KB
/
.xo-config.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
71
72
73
74
75
76
77
78
79
// eslint-config-xo is used in xo-lass
const xoConfigRules = require('eslint-config-xo').rules;
module.exports = {
prettier: true,
space: true,
extends: [
'plugin:vue/vue3-strongly-recommended',
'@vue/eslint-config-prettier',
'xo-lass'
],
envs: ['vue/setup-compiler-macros'],
extensions: ['js', 'cjs', 'mjs', 'vue'],
ignores: ['dist*/**'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest'
},
rules: {
'n/file-extension-in-import': 'off',
// xo extensions
'vue/array-bracket-newline': xoConfigRules['array-bracket-newline'],
'vue/array-bracket-spacing': xoConfigRules['array-bracket-spacing'],
'vue/arrow-spacing': xoConfigRules['arrow-spacing'],
'vue/brace-style': xoConfigRules['brace-style'],
'vue/camelcase': xoConfigRules.camelcase,
'vue/comma-dangle': xoConfigRules['comma-dangle'],
'vue/comma-spacing': xoConfigRules['comma-spacing'],
'vue/comma-style': xoConfigRules['comma-style'],
'vue/dot-location': xoConfigRules['dot-location'],
'vue/dot-notation': xoConfigRules['dot-notation'],
'vue/eqeqeq': xoConfigRules.eqeqeq,
'vue/func-call-spacing': xoConfigRules['func-call-spacing'],
'vue/key-spacing': xoConfigRules['key-spacing'],
'vue/keyword-spacing': xoConfigRules['keyword-spacing'],
'vue/no-constant-condition': xoConfigRules['no-constant-condition'],
'vue/no-empty-pattern': xoConfigRules['no-empty-pattern'],
'vue/no-irregular-whitespace': xoConfigRules['no-irregular-whitespace'],
'vue/no-loss-of-precision': xoConfigRules['no-loss-of-precision'],
'vue/no-sparse-arrays': xoConfigRules['no-sparse-arrays'],
'vue/no-useless-concat': xoConfigRules['no-useless-concat'],
'vue/object-curly-spacing': xoConfigRules['object-curly-spacing'],
'vue/object-shorthand': xoConfigRules['object-shorthand'],
'vue/operator-linebreak': xoConfigRules['operator-linebreak'],
'vue/quote-props': xoConfigRules['quote-props'],
'vue/space-in-parens': xoConfigRules['space-in-parens'],
'vue/space-infix-ops': xoConfigRules['space-infix-ops'],
'vue/space-unary-ops': xoConfigRules['space-unary-ops'],
'vue/template-curly-spacing': xoConfigRules['template-curly-spacing']
},
overrides: [
{
files: '**/*.vue',
rules: {
'no-unused-vars': 'off'
}
},
{
files: 'src-node/jobs/**/*.js',
rules: {
'unicorn/no-process-exit': 'off'
}
},
{
files: 'test/**/*.js',
extends: ['eslint-config-vitest-globals'],
rules: {
'max-nested-callbacks': 'off'
}
},
{
files: 'test/**/jobs/**/*.js',
rules: {
'unicorn/no-process-exit': 'off'
}
}
]
};