forked from db-ui/mono
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xo-config.cjs
62 lines (61 loc) · 1.96 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
module.exports = {
prettier: true,
overrides: [
{
files: ['./showcases/angular-showcase/**'],
rules: {
'import/no-extraneous-dependencies': 0,
'@typescript-eslint/consistent-type-imports': 0
}
},
{
files: ['./**/angular-**/**'],
rules: {
'unicorn/prefer-top-level-await': 0 // we don't need it for angular, some files are generated this way
}
},
{
files: [
'./**/angular-**/**',
'./showcases/vanilla-showcase/**',
'./showcases/svelte-showcase/**'
],
rules: {
'new-cap': 0, // fixes issue with @Component annotation
'import/no-unassigned-import': 0, // fixes issue with including zone.js or db-components
'no-undef': 0 // fixes issue with document & window
}
},
{
files: ['./showcases/**'],
rules: {
// In TS we don't need extension
'import/extensions': 0,
'n/file-extension-in-import': 0,
'@typescript-eslint/no-unsafe-assignment': 0, // We don't need this tsc will handle it anyway
'@typescript-eslint/no-unsafe-call': 0, // We don't need this tsc will handle it anyway
'@typescript-eslint/naming-convention': 0, // Too much trouble for different frameworks in a monorepo
'@typescript-eslint/restrict-template-expressions': 0, // Legit in react
'@typescript-eslint/no-redundant-type-constituents': 0, // only happens in cicd
'@typescript-eslint/no-unsafe-argument': 0, // valid for app
'@typescript-eslint/no-unsafe-return': 0, // valid for app
'import/no-extraneous-dependencies': 0 // foundation and component.css are inside this repo
}
}
],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'unicorn/prefer-module': 0, // TODO: we need to change every package to "type":"module"
'n/prefer-global/process': 0, // We use process.env in config files so don't use require("process")
'unicorn/filename-case': [
'error',
{
cases: {
kebabCase: true,
pascalCase: true
}
}
],
'unicorn/prevent-abbreviations': 0
}
};