-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathxo.config.ts
76 lines (73 loc) · 1.96 KB
/
xo.config.ts
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
/**
* @file XO Flat config file.
*/
import importPlugin from 'eslint-plugin-import';
import jsdoc from 'eslint-plugin-jsdoc';
import tseslint from 'typescript-eslint';
const xoConfig = [
{
prettier: true,
},
jsdoc.configs['flat/recommended'],
tseslint.configs.recommended,
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
plugins: {jsdoc, import: importPlugin},
rules: {
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
allowSeparatedGroups: false,
},
],
'n/no-extraneous-import': 'off',
'import-x/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
// eslint-disable-next-line @typescript-eslint/naming-convention
'import/extensions': 'off',
// eslint-disable-next-line @typescript-eslint/naming-convention
'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
warnOnUnassignedImports: true,
'newlines-between': 'never',
},
],
'no-console': ['error', {allow: ['warn', 'error']}],
'no-warning-comments': [
'warn',
{
terms: ['fixme', 'xxx'],
},
],
'jsdoc/require-file-overview': 'error',
'jsdoc/require-description': 'error',
'jsdoc/no-bad-blocks': 'error',
'jsdoc/no-blank-blocks': 'error',
'jsdoc/no-blank-block-descriptions': 'error',
'jsdoc/check-syntax': 'error',
'jsdoc/require-asterisk-prefix': 'error',
'jsdoc/require-description-complete-sentence': 'error',
'jsdoc/require-hyphen-before-param-description': ['error', 'never'],
},
},
{
files: ['{libs,components}/*/src/**/*.js'],
rules: {
camelcase: 'off',
'jsdoc/require-file-overview': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-jsdoc': 'off',
},
},
];
export default xoConfig;