forked from avajs/ava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xo.config.js
75 lines (75 loc) · 2.05 KB
/
xo.config.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
module.exports = {
ignores: [
'media/**',
'test/config/fixtures/config-errors/test.js',
'test/config/fixtures/mjs-with-tests/**',
'test-tap/fixture/ava-paths/target/test.js',
'test-tap/fixture/{source-map-initial,syntax-error}.js',
'test-tap/fixture/snapshots/test-sourcemaps/build/**',
'test-tap/fixture/power-assert.js',
'test-tap/fixture/report/edgecases/ast-syntax-error.js'
],
rules: {
'import/no-anonymous-default-export': 'off',
'import/no-unresolved': ['error', {commonjs: true}],
'no-use-extend-native/no-use-extend-native': 'off',
'@typescript-eslint/no-var-requires': 'off'
},
overrides: [
{
files: 'index.d.ts',
rules: {
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/method-signature-style': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'@typescript-eslint/prefer-function-type': 'off',
'@typescript-eslint/unified-signatures': 'off'
}
},
{
files: [
'eslint-plugin-helper.js',
'lib/plugin-support/shared-worker-loader.js',
'lib/plugin-support/shared-workers.js'
],
// TODO [engine:node@>=12]: Enable when targeting Node.js 12.
rules: {
'import/no-unresolved': 'off',
'node/no-unsupported-features/node-builtins': 'off'
}
},
{
files: 'test-{d,tap}/**/*.ts',
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
'no-unused-vars': 'off'
}
},
{
files: 'test-tap/**/*.js',
rules: {
'promise/prefer-await-to-then': 'off'
}
},
{
files: ['test-tap/fixture/**', 'test/**/fixtures/**'],
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off'
}
}
],
settings: {
'import/resolver': {
node: {
extensions: ['.js']
}
}
}
};