-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbiome.jsonc
More file actions
164 lines (164 loc) Β· 5.02 KB
/
biome.jsonc
File metadata and controls
164 lines (164 loc) Β· 5.02 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
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"assist": {
"actions": {
"source": {
"recommended": true
}
}
},
"files": {
"ignoreUnknown": false,
"includes": ["**", "!**/.next"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 120
},
"css": {
"parser": {
"tailwindDirectives": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5"
}
},
"linter": {
"enabled": true,
"domains": {
"next": "recommended",
"project": "recommended",
"react": "recommended"
},
"rules": {
"recommended": true,
"a11y": {
"useKeyWithClickEvents": "warn"
},
"complexity": {
"noUselessEscapeInRegex": "error",
"noUselessStringConcat": "error",
"noUselessUndefinedInitialization": "error",
"useDateNow": "error",
"useSimplifiedLogicExpression": "error",
"useWhile": "error"
},
"correctness": {
"noUnusedVariables": {
"level": "warn",
"fix": "none"
},
"noConstantMathMinMaxClamp": "error",
"noUndeclaredVariables": "error",
"noUnusedFunctionParameters": "error",
"noUnusedImports": "error",
"noUnusedPrivateClassMembers": "error",
"useHookAtTopLevel": "error"
},
"nursery": {
"useSortedClasses": {
"level": "warn",
"fix": "safe",
"options": {
"functions": ["clsx", "cva", "cn"]
}
},
"useConsistentArrowReturn": "error",
"noUselessCatchBinding": "error",
"noShadow": "error" // should help you catch useless code/accidental drift
},
"performance": {
"noDelete": "error", // it's a dangerous operator, use undefined instead
"noDynamicNamespaceImportAccess": "error",
"noReExportAll": "error",
"useTopLevelRegex": "error"
},
"security": {
"noDangerouslySetInnerHtmlWithChildren": "error" // forces you to explain why you have no alternative to using this property, and think about potential sanitization issues
},
"style": {
"useNamingConvention": {
"level": "error",
"options": {
"strictCase": false,
"conventions": [
{
"selector": {
"kind": "objectLiteralProperty"
},
"formats": ["CONSTANT_CASE", "camelCase"]
}
]
}
},
"useFilenamingConvention": {
"level": "error",
"options": {
"filenameCases": ["export", "kebab-case"] // personal preference
}
},
"noDefaultExport": "error",
"noEnum": "error",
"noInferrableTypes": "error",
"noNonNullAssertion": "off",
"noParameterAssign": "error",
"noShoutyConstants": "error",
"noSubstr": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noYodaExpression": "error",
"useArrayLiterals": "error",
"useAsConstAssertion": "error",
"useAtIndex": "error",
"useCollapsedIf": "error",
"useConsistentArrayType": "error",
"useConsistentBuiltinInstantiation": "error",
"useDefaultParameterLast": "error",
"useDefaultSwitchClause": "error",
"useDeprecatedReason": "error",
"useEnumInitializers": "error",
"useExplicitLengthCheck": "error",
"useFragmentSyntax": "error",
"useNumberNamespace": "error",
"useSelfClosingElements": "error",
"useShorthandAssign": "error",
"useSingleVarDeclarator": "error",
"useThrowNewError": "error",
"useThrowOnlyError": "error",
"useTrimStartEnd": "error"
},
"suspicious": {
"noExplicitAny": "error",
"useIterableCallbackReturn": "off",
"noAlert": "error",
// "noConsole": {
// "level": "error", // helps you not forget to remove console logs. useful for debug, but dangerous for prod
// "options": {
// "allow": ["assert", "error", "info", "warn"] // alternatively, this forces you to be more intentional about your logging
// }
// },
"noDocumentCookie": "error",
"noDocumentImportInPage": "error",
"noDuplicateCustomProperties": "error",
"noDuplicateElseIf": "error",
"noDuplicateProperties": "error",
"noEvolvingTypes": "error",
"noTemplateCurlyInString": "error",
"useAwait": "error", // forces you to be intentional about your async code
"useErrorMessage": "error",
"useNumberToFixedDigitsArgument": "error" // forces you to be intentional about your async code
}
}
},
"vcs": {
"clientKind": "git",
"defaultBranch": "main",
"enabled": true,
"useIgnoreFile": true
}
}