-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxo.config.mjs
More file actions
140 lines (139 loc) · 4.23 KB
/
xo.config.mjs
File metadata and controls
140 lines (139 loc) · 4.23 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/** @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,
'@typescript-eslint/non-nullable-type-assertion-style': 0,
'@typescript-eslint/prefer-readonly': 0,
'import-x/no-unassigned-import': 0,
'unicorn/switch-case-braces': 0,
'unicorn/prefer-number-properties': 0,
'unicorn/prefer-dom-node-dataset': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/no-confusing-void-expression': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/promise-function-async': 0,
'promise/prefer-await-to-then': 0,
'@typescript-eslint/array-type': 0,
'unicorn/prefer-string-replace-all': 0,
'@typescript-eslint/consistent-type-definitions': 0,
'no-else-return': 0,
'unicorn/prefer-add-event-listener': 0,
'@typescript-eslint/prefer-promise-reject-errors': 0,
'array-callback-return': 0,
'unicorn/catch-error-name': 0,
'unicorn/prefer-ternary': 0,
'@typescript-eslint/no-restricted-types': 0,
'@typescript-eslint/no-redeclare': 0,
'one-var': 0,
'no-new': 0,
'unicorn/prefer-modern-math-apis': 0,
'unicorn/no-zero-fractions': 0,
'unicorn/escape-case': 0,
'no-implicit-coercion': 0,
'no-negated-condition': 0,
'unicorn/no-negated-condition': 0,
'@typescript-eslint/no-dynamic-delete': 0,
'@typescript-eslint/switch-exhaustiveness-check': 0,
'@typescript-eslint/use-unknown-in-catch-callback-variable': 0,
'@typescript-eslint/member-ordering': 0,
'@typescript-eslint/no-unnecessary-type-assertion': 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,
},
},
{
files: ['build.js'],
rules: {
'@stylistic/indent': 0,
'@stylistic/indent-binary-ops': 0,
'unicorn/no-process-exit': 0,
'unicorn/prefer-node-protocol': 0,
'unicorn/prefer-module': 0,
'dot-notation': 0,
'unicorn/prefer-string-slice': 0,
},
},
{
files: ['src/sw.js'],
rules: {
'@stylistic/indent': 0,
'@stylistic/indent-binary-ops': 0,
'no-undef': 0,
'unicorn/prefer-global-this': 0,
},
},
]
export default xoConfig