-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.plugins.json
More file actions
91 lines (91 loc) · 3.16 KB
/
Copy pathtsconfig.plugins.json
File metadata and controls
91 lines (91 loc) · 3.16 KB
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
{
"compilerOptions": {
"plugins": [
{
"name": "ts-plugin-prefer-namespace-import",
// Opt-in namespace-import quickfix (e.g. unresolved `Effect` -> `import * as Effect from "effect-app/Effect"`).
// Disabled for now; flip to `true` to enable.
"enableNamespaceImport": false,
"mappings": {
"Effect": "effect-app/Effect"
},
"preferOver": [
{
"prefer": ["effect-app", "@effect-app/"],
"hide": ["effect", "@effect/"]
}
],
"sortImports": {
"enabled": true,
"moveUpPatterns": [
"^\\./",
"^\\../",
"^(?:\\.\\./)+",
"^#",
"^@/",
"effect-app",
"^@effect-app/",
"effect",
"^@effect/"
],
"moveDownPatterns": [
"^node_modules/"
],
"overrides": {
"effect-app": [
"Array",
"Option",
"Either"
]
}
},
// Rule 7: flag `const { x } = NS` where NS is a namespace import.
"destructureNamespace": {
"enabled": true,
"ignoreNames": []
},
// Rules 1 & 2: flag `export *` barrels in company / workflow roots and
// self re-exports of same-named submodules. Populate with project-specific
// workflow-root filenames (e.g. ["EasyLife.ts", "Mako.ts"]).
"forbiddenBarrels": {
"enabled": true,
"forbiddenBarrelBasenames": []
},
// Rules 3, 4, 9: refactor cross-workflow named imports into the
// workflow-prefixed namespace form. Only triggers when the import
// crosses a workflow boundary; same-workflow sibling imports stay
// unchanged. Workflow boundary is detected via `workflowMarker`.
"crossWorkflowNamespace": {
"enabled": true,
"workflowMarker": "services/DBContext.ts",
"modules": [
{
"specifierPattern": "/services/[A-Z]\\w*Repo(\\.(?:js|ts))?$",
"targetBasename": "DBContext.ts",
"aliasSuffix": "DB"
},
{ "specifierPattern": "/services/DBContext(\\.(?:js|ts))?$", "aliasSuffix": "DB" },
{ "specifierPattern": "/models(\\.(?:js|ts))?$", "aliasSuffix": "Models" },
{ "specifierPattern": "/events(\\.(?:js|ts))?$", "aliasSuffix": "Events" },
{ "specifierPattern": "/core(\\.(?:js|ts))?$", "aliasSuffix": "Core" }
]
}
},
{
"name": "@effect/language-service",
"ignoreEffectWarningsInTscExitCode": true,
"namespaceImportPackages": ["effect", "@effect/*", "effect-app", "@effect-app/*"],
"topLevelNamedReexports": "follow",
"diagnosticSeverity": {
"missingEffectServiceDependency": "error",
"effectFnOpportunity": "warning",
"globalErrorInEffectFailure": "warning",
"preferSchemaOverJson": "off",
"unnecessaryEffectGen": "warning",
"effectSucceedWithVoid": "off",
"importFromBarrel": "warning"
}
}
]
}
}