-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbiome.jsonc
More file actions
227 lines (213 loc) · 14.6 KB
/
biome.jsonc
File metadata and controls
227 lines (213 loc) · 14.6 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
{
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ VCS INTEGRATION
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true // Respect .gitignore patterns
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ FILE HANDLING
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"files": {
"ignoreUnknown": true // Don't error on unknown file types
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ FORMATTER CONFIGURATION
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4, // Bliss's preference: 4 spaces
"lineWidth": 120 // Bliss's preference: 120 characters
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ JAVASCRIPT/TYPESCRIPT FORMATTING
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"javascript": {
"formatter": {
"quoteStyle": "single", // JS: 'single quotes'
"jsxQuoteStyle": "double", // JSX: "double quotes"
"trailingCommas": "all", // Add trailing commas everywhere
"semicolons": "asNeeded", // Only when required
"arrowParentheses": "always" // (param) => {}
}
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ LINTER CONFIGURATION
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"linter": {
"enabled": true,
"rules": {
"recommended": true,
// ────────────────────────────────────────────────────────────────────
// → Accessibility Rules (React/JSX)
// ────────────────────────────────────────────────────────────────────
"a11y": {
"noAccessKey": "error",
"noAriaUnsupportedElements": "error",
"noAutofocus": "warn",
"noDistractingElements": "error",
"noHeaderScope": "error",
"noInteractiveElementToNoninteractiveRole": "error",
"noNoninteractiveElementToInteractiveRole": "error",
"noNoninteractiveTabindex": "error",
"noPositiveTabindex": "error",
"noRedundantAlt": "error",
"noRedundantRoles": "error",
"noStaticElementInteractions": "warn",
"useFocusableInteractive": "error",
"useSemanticElements": "off",
"useKeyWithClickEvents": "error",
"useKeyWithMouseEvents": "error",
"useValidAnchor": "error"
},
// ────────────────────────────────────────────────────────────────────
// → Complexity Rules
// ────────────────────────────────────────────────────────────────────
"complexity": {
"useLiteralKeys": "off", // Allow computed object keys
"noStaticOnlyClass": "off" // Allow static-only classes for namespace pattern
},
// ────────────────────────────────────────────────────────────────────
// → Correctness Rules
// ────────────────────────────────────────────────────────────────────
"correctness": {
"noChildrenProp": "error",
"noRenderReturnValue": "error",
"noVoidElementsWithChildren": "error",
"useHookAtTopLevel": "error",
"useJsxKeyInIterable": "error",
"noUnusedVariables": "warn", // Warn for flexibility
"useExhaustiveDependencies": "warn" // Warn for React hooks
},
// ────────────────────────────────────────────────────────────────────
// → Performance Rules
// ────────────────────────────────────────────────────────────────────
"performance": {
"noImgElement": "off" // Next.js Image component handles optimization
},
// ────────────────────────────────────────────────────────────────────
// → Security Rules
// ────────────────────────────────────────────────────────────────────
"security": {
"noDangerouslySetInnerHtml": "off" // Allow for trusted content
},
// ────────────────────────────────────────────────────────────────────
// → Style Rules
// ────────────────────────────────────────────────────────────────────
"style": {
"noInferrableTypes": "error",
"noNonNullAssertion": "warn",
"noParameterAssign": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"useAsConstAssertion": "error",
"useConst": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useImportType": "off", // Allow value imports
"useNumberNamespace": "error",
"useSelfClosingElements": "error",
"useShorthandFunctionType": "error",
"useSingleVarDeclarator": "error",
"noImplicitBoolean": "error",
"useTemplate": "error"
},
// ────────────────────────────────────────────────────────────────────
// → Suspicious Code Patterns
// ────────────────────────────────────────────────────────────────────
"suspicious": {
"noArrayIndexKey": "off", // Allow array indices as React keys
"noCommentText": "error",
"noDuplicateJsxProps": "error",
"noExplicitAny": "off", // Allow 'any' type for flexibility
"noConsole": "off", // Allow console.log for debugging
"noVar": "error" // Enforce const/let over var
}
}
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ CODE ASSIST FEATURES
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"assist": {
"enabled": true,
"actions": {
"source": {
"useSortedAttributes": "on", // Auto-sort JSX attributes
"useSortedKeys": "on" // Auto-sort object keys
}
}
},
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// ◆ FILE-SPECIFIC OVERRIDES
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"overrides": [
{
// Prefer Prettier for content files; disable Biome format/lint
"includes": ["**/*.md", "**/*.mdx", "**/*.markdown", "**/*.yml", "**/*.yaml", "**/*.json"],
"formatter": { "enabled": false },
"linter": { "enabled": false },
"assist": { "enabled": false }
},
{
// ────────────────────────────────────────────────────────────────
// → JSON Configuration Files
// ────────────────────────────────────────────────────────────────
"includes": ["**/.vscode/*.json", "**/tsconfig*.json"],
"json": {
"parser": {
"allowComments": true, // Allow // comments in JSON
"allowTrailingCommas": true // Allow trailing commas
}
}
},
{
// ────────────────────────────────────────────────────────────────
// → Next.js App Directory & Pages
// ────────────────────────────────────────────────────────────────
"includes": ["src/app/**/*.tsx", "src/app/**/*.ts", "src/pages/**/*.tsx"],
"linter": {
"rules": {
"style": {
"noDefaultExport": "off" // Next.js requires default exports
}
}
}
},
{
// ────────────────────────────────────────────────────────────────
// → Configuration Files
// ────────────────────────────────────────────────────────────────
"includes": ["**/next.config.*", "**/middleware.*", "**/tailwind.config.*", "**/postcss.config.*"],
"linter": {
"rules": {
"correctness": {
"noNodejsModules": "off" // Allow Node.js modules
},
"style": {
"noDefaultExport": "off" // Config files use default export
},
"suspicious": {
"noExplicitAny": "off" // Allow 'any' in config files
}
}
}
},
{
// ────────────────────────────────────────────────────────────────
// → Package.json Files & Biome Config (preserve manual organization)
// ────────────────────────────────────────────────────────────────
"includes": ["**/package.json", "**/biome.jsonc"],
"assist": {
"actions": {
"source": {
"useSortedKeys": "off" // Preserve manual key ordering
}
}
}
}
]
}