-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xo-config.cjs
93 lines (92 loc) · 2 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// XO's AVA plugin will use the checked out code to resolve AVA configuration,
// which causes all kinds of confusion when it finds our own ava.config.cjs file
// or other ava.config.* fixtures.
// Use the internal test flag to make XO behave like our own tests.
require('node:process').env.AVA_FAKE_SCM_ROOT = '.fake-root';
module.exports = {
ignores: [
'media/**',
'test/config/fixtures/config-errors/test.js',
'test/line-numbers/fixtures/line-numbers.js',
'test-tap/fixture/snapshots/test-sourcemaps/build/**',
'test-tap/fixture/report/edgecases/ast-syntax-error.cjs',
'examples/typescript-*/**/*.ts',
],
rules: {
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
'newlines-between': 'always',
},
],
'import/newline-after-import': 'error',
'unicorn/require-post-message-target-origin': 'off',
},
overrides: [
{
files: '**/*.d.*(c|m)ts',
rules: {
'import/extensions': 'off',
},
},
{
files: 'examples/**',
rules: {
'ava/no-ignored-test-files': 'off',
'ava/no-only-test': 'off',
'unicorn/prefer-module': 'off',
},
},
{
files: [
'test/**/fixtures/**',
'test-tap/**fixture/**',
],
rules: {
'unicorn/no-empty-file': 'off',
},
},
{
files: 'test-types/**',
rules: {
'ava/assertion-arguments': 'off',
'ava/no-ignored-test-files': 'off',
'ava/no-skip-assert': 'off',
'ava/use-t': 'off',
},
},
{
// TODO: Update tests.
files: 'test/**',
rules: {
'import/no-anonymous-default-export': 'off',
'n/prefer-global/process': 'off',
},
},
{
files: 'test/**/fixtures/**',
rules: {
'n/file-extension-in-import': 'off',
},
},
{
// TODO: Update tests.
files: 'test/snapshot-*/fixtures/**',
rules: {
'unicorn/prefer-module': 'off',
},
},
{
// TODO: Update tests.
files: 'test-tap/**',
rules: {
'import/no-anonymous-default-export': 'off',
'n/prefer-global/process': 'off',
'unicorn/error-message': 'off',
},
},
],
};