-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.oxlintrc.json
More file actions
90 lines (69 loc) · 2.8 KB
/
.oxlintrc.json
File metadata and controls
90 lines (69 loc) · 2.8 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
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "unicorn", "oxc"],
"jsPlugins": ["./src/lint/plugin.js"],
"categories": {
"correctness": "error"
},
"rules": {
// Enforce object shorthand
"object-shorthand": "error",
// Import rules (matching Effect's import plugin usage)
"import/first": "error",
"import/no-duplicates": "error",
// TypeScript rules (matching Effect's @typescript-eslint config)
"typescript/array-type": "off",
"typescript/consistent-type-imports": "off",
// -- Disabled rules that conflict with this project's style --
// The project uses ASI (no semicolons)
"no-extra-semi": "off",
// Don't flag unused vars (project has noUnusedLocals: false)
"typescript/no-unused-vars": "off",
// Allow non-null assertions (Effect-TS style allows this)
"typescript/no-non-null-assertion": "off",
// Allow explicit any (project has noImplicitAny: false)
"typescript/no-explicit-any": "off",
// Allow namespace declarations (Effect uses these)
"typescript/no-namespace": "off",
// Allow empty interfaces/types used for structural typing
"typescript/no-empty-interface": "off",
// Allow require imports in specific contexts
"typescript/no-require-imports": "off",
// Disable rules that conflict with the project patterns
"no-control-regex": "off",
"no-prototype-builtins": "off",
"no-case-declarations": "off",
"no-empty": "off",
"unicorn/no-nested-ternary": "off",
// Allow bitwise operators (used in some Effect patterns)
"no-bitwise": "off",
// Allow empty pattern
"no-empty-pattern": "off",
"unicorn/no-new-array": "off",
// Effect uses generator functions for effectful computation (yield is implicit)
"require-yield": "off",
// False positives with Effect's re-export module structure
"import/namespace": "off",
// Effect patterns use unused expressions for type-level assertions
"no-unused-expressions": "off",
// Enforce namespace imports with matching aliases for capitalized modules
"effect-start/namespace-import": "error",
// Enforce blank lines around test calls
"effect-start/test-space-around": "warn",
// Disallow destructuring objects in function parameters
"effect-start/no-destructured-params": "warn",
// Disallow await Effect.runPromise in test callbacks
"effect-start/test-effects": "warn",
// Prefer typeof User.Type over Schema.Schema.Type<typeof User>
"effect-start/schema-type-helpers": "warn"
},
"overrides": [
{
"files": ["src/datastar/**"],
"rules": {
"effect-start/no-destructured-params": "off"
}
}
],
"ignorePatterns": ["dist/", "node_modules/", "*.todo.ts"]
}