-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.oxlintrc.json
More file actions
235 lines (235 loc) · 8.84 KB
/
.oxlintrc.json
File metadata and controls
235 lines (235 loc) · 8.84 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
{
"plugins": ["import", "promise", "unicorn"],
"categories": {
"correctness": "error",
"pedantic": "warn",
"perf": "warn",
"restriction": "error",
"style": "warn",
"suspicious": "warn"
},
"rules": {
"import/no-cycle": "error",
"import/no-duplicates": "error",
"import/no-self-import": "error",
"import/prefer-default-export": "off", // Conflicts with no-default-export
"import/max-dependencies": [
"warn",
{
"max": 10,
"ignoreTypeImports": true
}
],
"id-length": "off",
"max-lines-per-function": [
"warn",
{
"max": 100,
"skipBlankLines": true,
"skipComments": true
}
],
"max-lines": [
"warn",
{
"max": 350,
"skipBlankLines": true,
"skipComments": true
}
],
"no-magic-numbers": [
"warn",
{
"ignore": [-1, 0, 1, 2], // Universal programming constants
"ignoreArrayIndexes": true, // array[0] is self-documenting
"ignoreEnums": true // Enum values are often self-documenting sequences
}
],
"sort-keys": "off",
"sort-imports": "off",
"no-ternary": "off",
"func-style": "off",
"unicorn/no-null": "off", // Vue.js ecosystem uses null extensively - keep both null and undefined for semantic clarity
"no-eq-null": "off", // Vue.js community standard - != null is widely accepted for null/undefined checks
"no-undefined": "off", // Vue.js apps commonly check for undefined explicitly (props, refs, route params)
"unicorn/filename-case": [
"warn",
{
"cases": {
"kebabCase": true
}
}
],
"unicorn/catch-error-name": [
"warn",
{
"ignore": ["^(err|error)$"]
}
],
"import/no-relative-parent-imports": "off", // Standard practice in Vue/TS - stores, services, composables all import from parent dirs
"no-use-before-define": [
"error",
{
"functions": false,
"classes": false
}
], // Function/class hoisting is fine in JS/TS
"no-inline-comments": "off", // Inline comments are more readable next to the code they explain
"max-statements": "off", // Redundant with max-lines-per-function (100 lines)
"unicorn/numeric-separators-style": "off", // Our numeric literals are IDs and term codes (YYYYMM), not quantities
"capitalized-comments": [
"warn",
"always",
{
"line": {
"ignoreConsecutiveComments": true
}
}
]
},
"overrides": [
{
"files": ["scripts/**/*"],
"plugins": ["node"],
"rules": {
"no-console": "off",
"no-void": "off",
"import/no-commonjs": "off",
"import/no-nodejs-modules": "off",
"import/unambiguous": "off",
"import/no-default-export": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/no-process-exit": "off",
"max-lines": "off",
"max-params": "off",
"promise/avoid-new": "off",
"promise/prefer-await-to-callbacks": "off"
}
},
{
"files": ["**/__tests__/**/*"],
"plugins": ["vitest"],
"rules": {
"no-console": "off",
"no-magic-numbers": "off",
"import/max-dependencies": "off",
"import/unambiguous": "off", // Vitest always runs test files as modules
"max-lines-per-function": [
"warn",
{
"max": 200
}
],
"max-lines": [
"warn",
{
"max": 500
}
],
"vitest/prefer-called-times": "off", // Conflicts with prefer-called-once; toHaveBeenCalledOnce() is more readable
"vitest/prefer-import-in-mock": "off", // import() form in vi.mock causes TS errors with partial class mocks
"vitest/prefer-strict-boolean-matchers": "off", // Conflicts with prefer-to-be-truthy; we use .toBeTruthy()/.toBeFalsy()
"vitest/require-test-timeout": "off" // Disabled intentionally; test files are not required to declare per-test timeouts
}
},
{
"files": ["VueApp/src/**/*"],
"rules": {
"no-console": "error"
}
},
{
"files": ["VueApp/**/*.config.*", "VueApp/vite-watch.js"],
"rules": {
"import/no-default-export": "off", // Config files often require default exports
"no-console": "off",
"import/max-dependencies": "off", // Build scripts may need multiple dependencies
"max-lines-per-function": "off", // Build scripts may have longer functions
"promise/prefer-await-to-callbacks": "off", // Callback pattern needed for tree-kill integration
"import/unambiguous": "off", // Node.js scripts don't need module indicators
"import/no-nodejs-modules": "off" // Config files run in Node, not the browser
}
},
{
"files": ["VueApp/**/*"],
"rules": {
"no-duplicate-imports": "off", // Allow separate type-only imports for better tree-shaking in Vue 3 TypeScript projects
"import/no-named-export": "off" // Vue ecosystem uses named exports for composables, stores, and utilities
}
},
{
"files": [
"VueApp/src/main.ts",
"VueApp/src/**/computing.ts",
"VueApp/src/**/students.ts",
"VueApp/src/**/cms.ts",
"VueApp/src/**/cts.ts",
"VueApp/src/**/effort.ts",
"VueApp/src/**/clinicalscheduler.ts",
"VueApp/src/**/cahfs.ts"
],
"rules": {
"import/no-unassigned-import": "off" // CSS imports are side-effect only (they apply styles without exports)
}
},
{
"files": ["**/stores/**/*", "**/store/**/*"],
"rules": {
"import/max-dependencies": "off" // Store files naturally coordinate between many modules and services
}
},
{
"files": ["**/*.d.ts"],
"rules": {
"import/unambiguous": "off" // TypeScript declaration files are ambient, not modules
}
},
{
"files": [
"VueApp/src/**/composables/use-schedule-operations.ts",
"VueApp/src/**/composables/use-schedule-crud.ts",
"VueApp/src/**/composables/use-schedule-dialogs.ts",
"VueApp/src/**/utils/confirmation-dialog.ts",
"VueApp/src/composables/use-unsaved-changes.ts"
],
"rules": {
"promise/avoid-new": "off" // Quasar dialogs require Promise wrapper for async/await
}
},
{
"files": [
"VueApp/src/composables/ViperFetch.ts",
"VueApp/src/composables/RequireLogin.ts",
"VueApp/src/composables/QuasarConfig.ts",
"VueApp/src/composables/QuasarTableUtilities.ts",
"VueApp/src/composables/ErrorHandler.ts",
"VueApp/src/composables/DateFunctions.ts",
"VueApp/src/composables/CheckPagePermission.ts",
"VueApp/src/store/ErrorStore.ts",
"VueApp/src/store/UserStore.ts"
],
"rules": {
"unicorn/filename-case": "off" // Legacy core files - keep PascalCase naming for backwards compatibility
}
},
{
"files": ["web/wwwroot/js/**"],
"rules": {
"no-unused-vars": "off", // Functions are called from Razor views via <script> tags
"import/unambiguous": "off" // These are <script> tag files, not ES modules
}
}
],
"ignorePatterns": [
"node_modules/**",
"bin/**",
"obj/**",
"dist/**",
"web/wwwroot/vue/**",
"web/wwwroot/lib/**",
"*.min.js",
"*.bundle.js",
"**/*.vue"
]
}