forked from refined-github/refined-github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xo-config.js
62 lines (61 loc) · 1.34 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
module.exports = {
quiet: true,
envs: [
'browser'
],
extends: 'xo-react',
globals: [
'browser',
'__featuresOptionDefaults__',
'__featuresMeta__',
'__filebasename'
],
rules: {
'import/no-unassigned-import': 'off',
'no-alert': 'off',
'no-void': 'off',
'react/jsx-key': 'off',
'unicorn/no-fn-reference-in-iterator': 'off',
// Test files are pre-compiled and bundled by rollup
'ava/no-ignored-test-files': 'off',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/consistent-type-definitions':'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
allowConciseArrowFunctionExpressionsStartingWithVoid: false
}
],
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-commonjs': 'error',
'import/order': [
'error',
{
groups: [
[
'builtin',
'external'
]
],
'newlines-between': 'always-and-inside-groups'
}
],
'import/prefer-default-export': 'error',
'react/function-component-definition': [
'error',
{
namedComponents: 'function-declaration'
}
]
},
// We don't use React, so it can't be automatically detected by the linter
settings: {
react: {
version: '16.13'
}
}
};