|
1 | 1 | { |
2 | 2 | "$schema": "https://unpkg.com/@biomejs/biome/configuration_schema.json", |
3 | 3 | "files": { |
4 | | - "ignore": ["node_modules/**/*"] |
| 4 | + "includes": ["**", "!**/node_modules/**/*"] |
5 | 5 | }, |
6 | 6 | "vcs": { |
7 | 7 | "useIgnoreFile": true |
8 | 8 | }, |
9 | 9 | "linter": { |
10 | 10 | "enabled": true, |
11 | | - "ignore": ["node_modules/**/*"], |
| 11 | + "includes": ["**", "!**/node_modules/**/*"], |
12 | 12 | "rules": { |
| 13 | + "recommended": true, |
13 | 14 | "a11y": { |
14 | | - "noAccessKey": "error", |
15 | 15 | "noAriaHiddenOnFocusable": "off", |
16 | | - "noAriaUnsupportedElements": "error", |
17 | | - "noAutofocus": "error", |
18 | | - "noBlankTarget": "error", |
19 | | - "noDistractingElements": "error", |
20 | | - "noHeaderScope": "error", |
21 | | - "noInteractiveElementToNoninteractiveRole": "error", |
22 | | - "noNoninteractiveElementToInteractiveRole": "error", |
23 | | - "noNoninteractiveTabindex": "error", |
24 | | - "noPositiveTabindex": "error", |
25 | | - "noRedundantAlt": "error", |
26 | | - "noRedundantRoles": "error", |
27 | | - "noSvgWithoutTitle": "error", |
28 | | - "useAltText": "error", |
29 | | - "useAnchorContent": "error", |
30 | | - "useAriaActivedescendantWithTabindex": "error", |
31 | | - "useAriaPropsForRole": "error", |
32 | | - "useButtonType": "error", |
33 | | - "useHeadingContent": "error", |
34 | | - "useHtmlLang": "error", |
35 | 16 | "useIframeTitle": "warn", |
36 | 17 | "useKeyWithClickEvents": "warn", |
37 | | - "useKeyWithMouseEvents": "warn", |
38 | | - "useMediaCaption": "error", |
39 | | - "useValidAnchor": "error", |
40 | | - "useValidAriaProps": "error", |
41 | | - "useValidAriaRole": "error", |
42 | | - "useValidAriaValues": "error", |
43 | | - "useValidLang": "error" |
| 18 | + "useKeyWithMouseEvents": "warn" |
44 | 19 | }, |
45 | 20 | "complexity": { |
46 | | - "noBannedTypes": "error", |
47 | | - "noExcessiveCognitiveComplexity": "error", |
48 | | - "noExtraBooleanCast": "error", |
49 | 21 | "noForEach": "error", |
50 | | - "noMultipleSpacesInRegularExpressionLiterals": "warn", |
51 | | - "noStaticOnlyClass": "error", |
52 | | - "noThisInStatic": "error", |
53 | | - "noUselessCatch": "error", |
54 | | - "noUselessConstructor": "error", |
55 | | - "noUselessEmptyExport": "error", |
56 | | - "noUselessFragments": "error", |
57 | | - "noUselessLabel": "error", |
58 | | - "noUselessRename": "error", |
59 | | - "noUselessSwitchCase": "error", |
60 | | - "noUselessThisAlias": "error", |
61 | | - "noUselessTypeConstraint": "error", |
62 | 22 | "noVoid": "off", |
63 | | - "noWith": "error", |
64 | | - "useArrowFunction": "error", |
65 | | - "useFlatMap": "error", |
66 | | - "useLiteralKeys": "error", |
67 | 23 | "useOptionalChain": "warn", |
68 | | - "useRegexLiterals": "error", |
69 | | - "useSimpleNumberKeys": "error", |
70 | | - "useSimplifiedLogicExpression": "error" |
| 24 | + "useSimplifiedLogicExpression": "error", |
| 25 | + "noArguments": "error", |
| 26 | + "useNumericLiterals": "error", |
| 27 | + "useWhile": "error" |
71 | 28 | }, |
72 | 29 | "correctness": { |
73 | | - "noChildrenProp": "error", |
74 | | - "noConstantCondition": "error", |
75 | | - "noConstAssign": "error", |
76 | | - "noConstructorReturn": "error", |
77 | | - "noEmptyCharacterClassInRegex": "error", |
78 | | - "noEmptyPattern": "error", |
79 | | - "noGlobalObjectCalls": "error", |
80 | | - "noInnerDeclarations": "error", |
81 | | - "noInvalidConstructorSuper": "error", |
82 | | - "noInvalidNewBuiltin": "error", |
83 | | - "noNewSymbol": "error", |
84 | | - "noNonoctalDecimalEscape": "error", |
85 | | - "noPrecisionLoss": "error", |
86 | | - "noRenderReturnValue": "error", |
87 | | - "noSelfAssign": "error", |
88 | | - "noSetterReturn": "error", |
89 | | - "noStringCaseMismatch": "error", |
90 | | - "noSwitchDeclarations": "error", |
| 30 | + "noConstantMathMinMaxClamp": "error", |
| 31 | + "noNodejsModules": "off", |
| 32 | + "noUndeclaredDependencies": "off", |
91 | 33 | "noUndeclaredVariables": "error", |
92 | | - "noUnnecessaryContinue": "error", |
93 | | - "noUnreachable": "error", |
94 | | - "noUnreachableSuper": "error", |
95 | | - "noUnsafeFinally": "error", |
96 | | - "noUnsafeOptionalChaining": "error", |
97 | | - "noUnusedLabels": "error", |
| 34 | + "noUnusedFunctionParameters": "error", |
| 35 | + "noUnusedImports": "error", |
| 36 | + "noUnusedPrivateClassMembers": "error", |
98 | 37 | "noUnusedVariables": "error", |
99 | | - "noVoidElementsWithChildren": "error", |
100 | | - "noVoidTypeReturn": "error", |
101 | | - "useExhaustiveDependencies": "error", |
102 | | - "useHookAtTopLevel": "error", |
103 | | - "useIsNan": "error", |
104 | | - "useValidForDirection": "error", |
105 | | - "useYield": "error" |
| 38 | + "noInvalidBuiltinInstantiation": "error", |
| 39 | + "noSwitchDeclarations": "error" |
106 | 40 | }, |
107 | 41 | "performance": { |
108 | 42 | "noAccumulatingSpread": "error", |
109 | | - "noDelete": "off" |
| 43 | + "useTopLevelRegex": "error" |
110 | 44 | }, |
111 | 45 | "security": { |
112 | | - "noDangerouslySetInnerHtml": "error", |
113 | | - "noDangerouslySetInnerHtmlWithChildren": "error" |
| 46 | + "noGlobalEval": "off" |
114 | 47 | }, |
115 | 48 | "style": { |
116 | | - "noArguments": "error", |
117 | | - "noCommaOperator": "off", |
118 | | - "noDefaultExport": "off", |
119 | | - "noImplicitBoolean": "off", |
| 49 | + "noImplicitBoolean": "error", |
120 | 50 | "noInferrableTypes": "error", |
121 | 51 | "noNamespace": "error", |
122 | 52 | "noNegationElse": "error", |
123 | | - "noNonNullAssertion": "off", |
124 | | - "noParameterAssign": "off", |
125 | | - "noParameterProperties": "off", |
126 | 53 | "noRestrictedGlobals": "error", |
127 | 54 | "noShoutyConstants": "error", |
128 | 55 | "noUnusedTemplateLiteral": "error", |
129 | 56 | "noUselessElse": "error", |
130 | | - "noVar": "error", |
| 57 | + "noYodaExpression": "error", |
131 | 58 | "useAsConstAssertion": "error", |
132 | 59 | "useBlockStatements": "error", |
133 | 60 | "useCollapsedElseIf": "error", |
| 61 | + "useConsistentArrayType": "error", |
| 62 | + "useConsistentBuiltinInstantiation": "error", |
134 | 63 | "useConst": "error", |
135 | 64 | "useDefaultParameterLast": "error", |
136 | 65 | "useEnumInitializers": "error", |
137 | 66 | "useExponentiationOperator": "error", |
| 67 | + "useExportType": "error", |
138 | 68 | "useFragmentSyntax": "error", |
| 69 | + "useForOf": "warn", |
| 70 | + "useImportType": "error", |
139 | 71 | "useLiteralEnumMembers": "error", |
140 | | - "useNamingConvention": "off", |
141 | | - "useNumericLiterals": "error", |
| 72 | + "useNodejsImportProtocol": "warn", |
| 73 | + "useNumberNamespace": "error", |
142 | 74 | "useSelfClosingElements": "error", |
143 | | - "useShorthandArrayType": "error", |
144 | 75 | "useShorthandAssign": "error", |
145 | | - "useSingleCaseStatement": "error", |
| 76 | + "useShorthandFunctionType": "warn", |
146 | 77 | "useSingleVarDeclarator": "error", |
147 | 78 | "useTemplate": "off", |
148 | | - "useWhile": "error" |
| 79 | + "useArrayLiterals": "error" |
149 | 80 | }, |
150 | 81 | "suspicious": { |
151 | | - "noApproximativeNumericConstant": "error", |
152 | | - "noArrayIndexKey": "error", |
153 | | - "noAssignInExpressions": "error", |
154 | | - "noAsyncPromiseExecutor": "error", |
155 | | - "noCatchAssign": "error", |
156 | | - "noClassAssign": "error", |
157 | | - "noCommentText": "error", |
158 | | - "noCompareNegZero": "error", |
159 | | - "noConfusingLabels": "error", |
160 | | - "noConfusingVoidType": "error", |
161 | | - "noConsoleLog": "warn", |
162 | 82 | "noConstEnum": "off", |
163 | | - "noControlCharactersInRegex": "error", |
164 | 83 | "noDebugger": "off", |
165 | | - "noDoubleEquals": "error", |
166 | | - "noDuplicateCase": "error", |
167 | | - "noDuplicateClassMembers": "error", |
168 | | - "noDuplicateJsxProps": "error", |
169 | | - "noDuplicateObjectKeys": "error", |
170 | | - "noDuplicateParameters": "error", |
171 | | - "noEmptyInterface": "error", |
| 84 | + "noEmptyBlockStatements": "error", |
172 | 85 | "noExplicitAny": "warn", |
173 | | - "noExtraNonNullAssertion": "error", |
174 | | - "noFallthroughSwitchClause": "error", |
175 | | - "noFunctionAssign": "error", |
176 | | - "noGlobalIsFinite": "error", |
177 | | - "noGlobalIsNan": "error", |
178 | 86 | "noImplicitAnyLet": "off", |
179 | | - "noImportAssign": "error", |
180 | | - "noLabelVar": "error", |
181 | | - "noMisleadingInstantiator": "error", |
182 | 87 | "noMisrefactoredShorthandAssign": "off", |
183 | | - "noPrototypeBuiltins": "error", |
184 | | - "noRedeclare": "error", |
185 | | - "noRedundantUseStrict": "error", |
186 | 88 | "noSelfCompare": "off", |
187 | | - "noShadowRestrictedNames": "error", |
188 | 89 | "noSparseArray": "off", |
189 | | - "noUnsafeDeclarationMerging": "error", |
190 | | - "noUnsafeNegation": "error", |
191 | | - "useDefaultSwitchClauseLast": "error", |
192 | | - "useGetterReturn": "error", |
193 | | - "useIsArray": "error", |
194 | | - "useNamespaceKeyword": "error", |
195 | | - "useValidTypeof": "error" |
196 | | - }, |
197 | | - "nursery": { |
198 | | - "noDuplicateJsonKeys": "off", |
199 | | - "noEmptyBlockStatements": "error", |
200 | | - "noEmptyTypeParameters": "error", |
201 | | - "noGlobalEval": "off", |
202 | | - "noGlobalAssign": "error", |
203 | | - "noInvalidUseBeforeDeclaration": "error", |
204 | | - "noMisleadingCharacterClass": "error", |
205 | | - "noNodejsModules": "off", |
206 | 90 | "noThenProperty": "warn", |
207 | | - "noUnusedImports": "error", |
208 | | - "noUnusedPrivateClassMembers": "error", |
209 | | - "noUselessLoneBlockStatements": "error", |
210 | | - "noUselessTernary": "error", |
211 | 91 | "useAwait": "error", |
212 | | - "useConsistentArrayType": "error", |
213 | | - "useExportType": "error", |
214 | | - "useFilenamingConvention": "off", |
215 | | - "useForOf": "warn", |
216 | | - "useGroupedTypeImport": "error", |
217 | | - "useImportRestrictions": "off", |
218 | | - "useImportType": "error", |
219 | | - "useNodejsImportProtocol": "warn", |
220 | | - "useNumberNamespace": "error", |
221 | | - "useShorthandFunctionType": "warn" |
| 92 | + "useErrorMessage": "error", |
| 93 | + "noVar": "error", |
| 94 | + "noConsole": { "level": "warn", "options": { "allow": ["log"] } } |
222 | 95 | } |
223 | 96 | } |
224 | 97 | }, |
225 | 98 | "formatter": { |
226 | 99 | "enabled": true, |
227 | | - "ignore": ["node_modules/**/*"], |
| 100 | + "includes": ["**", "!**/node_modules/**/*"], |
228 | 101 | "formatWithErrors": false, |
229 | 102 | "indentWidth": 2, |
230 | 103 | "indentStyle": "space", |
231 | 104 | "lineEnding": "lf", |
232 | 105 | "lineWidth": 80 |
233 | 106 | }, |
234 | | - "organizeImports": { |
235 | | - "enabled": true, |
236 | | - "ignore": ["node_modules/**/*"] |
237 | | - }, |
| 107 | + "assist": { "actions": { "source": { "organizeImports": "on" } } }, |
238 | 108 | "javascript": { |
239 | 109 | "formatter": { |
240 | 110 | "enabled": true, |
|
249 | 119 | "quoteProperties": "asNeeded", |
250 | 120 | "quoteStyle": "single", |
251 | 121 | "semicolons": "always", |
252 | | - "trailingComma": "all" |
| 122 | + "trailingCommas": "all", |
| 123 | + "expand": "auto" |
253 | 124 | }, |
254 | 125 | "globals": [], |
255 | 126 | "parser": { |
|
0 commit comments