-
Notifications
You must be signed in to change notification settings - Fork 1
/
.es.import.eslintrc.json
123 lines (123 loc) · 3.21 KB
/
.es.import.eslintrc.json
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"plugins": ["import"],
"settings": {
"import/internal-regex": "^(?:@nx-starter/)",
"import/resolver": { "node": { "paths": ["."] } }
},
"extends": [
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"rules": {
"import/first": "error",
"import/no-cycle": "error",
"import/namespace": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "error",
"import/no-self-import": "error",
"import/no-default-export": "error",
"import/no-unused-modules": "error",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/newline-after-import": "error",
"import/no-useless-path-segments": "error",
"import/order": [
"error",
{
"groups": [
["builtin", "external"],
"internal",
["parent", "sibling", "index"],
"type"
],
"pathGroups": [
{
"pattern": "@nx-starter/ui",
"group": "internal",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["builtin", "external"],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": false },
"warnOnUnassignedImports": false
}
],
"import/no-unassigned-import": ["error", { "allow": ["**/*.css"] }],
"import/max-dependencies": [
"error",
{ "max": 10, "ignoreTypeImports": true }
],
"import/no-anonymous-default-export": [
"error",
{
"allowArray": false,
"allowArrowFunction": false,
"allowAnonymousClass": false,
"allowAnonymousFunction": false,
"allowCallExpression": false,
"allowLiteral": false,
"allowObject": false
}
],
"import/named": "warn",
"import/export": "warn",
"import/extensions": "off",
"import/group-exports": "off",
"import/no-relative-parent-imports": "off",
"no-restricted-imports": "off" // nx module boundaries will handle it
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"extends": ["plugin:import/typescript"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": ["apps/*/tsconfig.json", "libs/*/tsconfig.json"]
}
}
}
},
{
"files": ["src/index.ts"],
"rules": {
"import/max-dependencies": [
"off",
{ "max": 100, "ignoreTypeImports": true }
]
}
},
{
"files": ["*.d.ts"],
"rules": {
"import/no-unassigned-import": "off"
}
},
{
"files": ["tools/jest/setups/*.ts", "./jest.config.ts"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"import/no-default-export": "off",
"import/no-unassigned-import": "off"
}
},
{
"files": ["*.stories.tsx"],
"rules": {
"import/no-default-export": "off"
}
},
{
"files": ["./commitlint.config.ts", "./changelog.config.ts"],
"rules": {
"import/no-default-export": "off"
}
}
]
}