-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathxo.config.mjs
More file actions
91 lines (90 loc) · 2.38 KB
/
Copy pathxo.config.mjs
File metadata and controls
91 lines (90 loc) · 2.38 KB
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
/** @type {import('xo').FlatXoConfig} */
const xoConfig = [
{
ignores: ['**/*.user.js'],
},
{
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs}'],
space: 2,
prettier: 'compat',
languageOptions: {
globals: {
document: 'readonly',
},
},
rules: {
'no-alert': 0,
'import-x/extensions': 0,
'n/file-extension-in-import': 0,
'n/prefer-global/process': 0,
'import-x/order': 0,
// 'import/no-mutable-exports': 0,
// 'import-x/no-mutable-exports': 0,
'@typescript-eslint/unified-signatures': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/prefer-optional-chain': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'objectLiteralProperty',
format: null,
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
'new-cap': 0,
'logical-assignment-operators': 0,
'prefer-destructuring': 0,
'unicorn/prefer-spread': 0,
'prefer-object-spread': 0,
'unicorn/prefer-at': 0,
'unicorn/prevent-abbreviations': 0,
'unicorn/prefer-string-raw': 0,
'capitalized-comments': 0,
'@stylistic/indent': 0,
'@stylistic/indent-binary-ops': 0,
'prefer-object-has-own': 0,
'unicorn/prefer-top-level-await': 0,
'no-await-in-loop': 0,
// temp
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/restrict-plus-operands': 0,
},
},
{
files: ['postcss.config.js', 'postcss.config.cjs'],
rules: {
'unicorn/prefer-module': 0,
'@stylistic/indent-binary-ops': 0,
},
},
{
files: ['src/**/*.ts'],
rules: {
'@stylistic/indent': 0,
'@stylistic/indent-binary-ops': 0,
},
},
{
files: ['scripts/**/*.mjs'],
rules: {
'@stylistic/indent': 0,
'@stylistic/indent-binary-ops': 0,
'unicorn/no-process-exit': 0,
},
},
]
export default xoConfig