From 9638331f7791dd4fbcbd7d6cbe5ce9966bd5258f Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 18 Sep 2023 12:27:04 +0100 Subject: [PATCH] update biome config --- biome.json | 228 +++++++++++++++++++++++++++------------------------ package.json | 4 +- 2 files changed, 124 insertions(+), 108 deletions(-) diff --git a/biome.json b/biome.json index fd0cfe8798..079a148845 100644 --- a/biome.json +++ b/biome.json @@ -23,144 +23,160 @@ "rules": { "recommended": false, "a11y": { - "noAccessKey": "error", + "noAccessKey": "warn", + "noAriaUnsupportedElements": "warn", "noAutofocus": "off", - "noBlankTarget": "error", - "noDistractingElements": "error", - "noHeaderScope": "error", - "noNoninteractiveElementToInteractiveRole": "error", - "noPositiveTabindex": "error", - "noRedundantAlt": "error", + "noBlankTarget": "warn", + "noDistractingElements": "warn", + "noHeaderScope": "warn", + "noNoninteractiveElementToInteractiveRole": "warn", + "noNoninteractiveTabindex": "off", + "noPositiveTabindex": "warn", + "noRedundantAlt": "warn", + "noRedundantRoles": "warn", "noSvgWithoutTitle": "off", - "useAltText": "error", - "useAnchorContent": "error", - "useAriaPropsForRole": "error", - "useButtonType": "error", - "useHeadingContent": "error", - "useHtmlLang": "error", + "useAltText": "warn", + "useAnchorContent": "warn", + "useAriaPropsForRole": "warn", + "useButtonType": "warn", + "useHeadingContent": "warn", + "useHtmlLang": "warn", "useIframeTitle": "off", "useKeyWithClickEvents": "off", - "useKeyWithMouseEvents": "error", + "useKeyWithMouseEvents": "warn", "useMediaCaption": "off", "useValidAnchor": "off", - "useValidAriaProps": "error", - "useValidLang": "error" + "useValidAriaProps": "warn", + "useValidAriaValues": "warn", + "useValidLang": "warn" }, "complexity": { - "noExtraBooleanCast": "error", + "noBannedTypes": "warn", + "noExtraBooleanCast": "warn", "noForEach": "off", - "noMultipleSpacesInRegularExpressionLiterals": "error", - "noUselessCatch": "error", - "noUselessConstructor": "error", - "noUselessFragments": "error", - "noUselessLabel": "error", - "noUselessRename": "error", - "noUselessSwitchCase": "error", - "noUselessTypeConstraint": "error", - "noWith": "error", - "useFlatMap": "error", - "useLiteralKeys": "error", - "useOptionalChain": "error", - "useSimpleNumberKeys": "error", + "noMultipleSpacesInRegularExpressionLiterals": "warn", + "noStaticOnlyClass": "warn", + "noUselessCatch": "warn", + "noUselessConstructor": "warn", + "noUselessEmptyExport": "warn", + "noUselessFragments": "warn", + "noUselessLabel": "warn", + "noUselessRename": "warn", + "noUselessSwitchCase": "warn", + "noUselessThisAlias": "warn", + "noUselessTypeConstraint": "warn", + "noWith": "warn", + "useFlatMap": "warn", + "useLiteralKeys": "warn", + "useOptionalChain": "warn", + "useSimpleNumberKeys": "warn", "useSimplifiedLogicExpression": "off" }, "correctness": { "noChildrenProp": "off", - "noConstAssign": "error", - "noConstructorReturn": "error", - "noEmptyPattern": "error", - "noGlobalObjectCalls": "error", - "noInnerDeclarations": "off", - "noInvalidConstructorSuper": "error", - "noNewSymbol": "error", - "noPrecisionLoss": "error", - "noRenderReturnValue": "error", - "noSetterReturn": "error", - "noStringCaseMismatch": "error", - "noSwitchDeclarations": "error", + "noConstAssign": "warn", + "noConstantCondition": "warn", + "noConstructorReturn": "warn", + "noEmptyPattern": "warn", + "noGlobalObjectCalls": "warn", + "noInnerDeclarations": "warn", + "noInvalidConstructorSuper": "warn", + "noNewSymbol": "warn", + "noNonoctalDecimalEscape": "warn", + "noPrecisionLoss": "warn", + "noRenderReturnValue": "warn", + "noSelfAssign": "warn", + "noSetterReturn": "warn", + "noStringCaseMismatch": "warn", + "noSwitchDeclarations": "warn", "noUndeclaredVariables": "off", - "noUnnecessaryContinue": "error", - "noUnreachable": "error", - "noUnreachableSuper": "error", - "noUnsafeFinally": "error", - "noUnsafeOptionalChaining": "error", - "noUnusedLabels": "error", - "noUnusedVariables": "error", - "noVoidElementsWithChildren": "error", - "noVoidTypeReturn": "error", - "useIsNan": "error", - "useValidForDirection": "error", - "useYield": "error" + "noUnnecessaryContinue": "warn", + "noUnreachable": "warn", + "noUnreachableSuper": "warn", + "noUnsafeFinally": "warn", + "noUnsafeOptionalChaining": "warn", + "noUnusedLabels": "warn", + "noUnusedVariables": "warn", + "noVoidElementsWithChildren": "warn", + "noVoidTypeReturn": "warn", + "useIsNan": "warn", + "useValidForDirection": "warn", + "useYield": "warn" }, "performance": { - "noDelete": "error" + "noDelete": "warn" }, "security": { - "noDangerouslySetInnerHtml": "error", - "noDangerouslySetInnerHtmlWithChildren": "error" + "noDangerouslySetInnerHtml": "warn", + "noDangerouslySetInnerHtmlWithChildren": "warn" }, "style": { - "noArguments": "error", - "noCommaOperator": "error", + "noArguments": "warn", + "noCommaOperator": "warn", "noImplicitBoolean": "off", - "noInferrableTypes": "error", - "noNamespace": "error", - "noNegationElse": "error", + "noInferrableTypes": "warn", + "noNamespace": "warn", + "noNegationElse": "warn", "noNonNullAssertion": "off", "noParameterAssign": "off", - "noParameterProperties": "error", - "noRestrictedGlobals": "error", - "noShoutyConstants": "error", - "noUnusedTemplateLiteral": "error", - "noVar": "error", + "noParameterProperties": "warn", + "noRestrictedGlobals": "warn", + "noShoutyConstants": "warn", + "noUnusedTemplateLiteral": "warn", + "noVar": "warn", "useBlockStatements": "off", - "useConst": "error", - "useDefaultParameterLast": "error", - "useEnumInitializers": "error", - "useExponentiationOperator": "error", - "useFragmentSyntax": "error", - "useNumericLiterals": "error", - "useSelfClosingElements": "error", - "useShorthandArrayType": "error", + "useConst": "warn", + "useDefaultParameterLast": "warn", + "useEnumInitializers": "warn", + "useExponentiationOperator": "warn", + "useFragmentSyntax": "warn", + "useLiteralEnumMembers": "warn", + "useNamingConvention": "off", + "useNumericLiterals": "warn", + "useSelfClosingElements": "warn", + "useShorthandArrayType": "warn", "useSingleCaseStatement": "off", - "useSingleVarDeclarator": "error", - "useTemplate": "error", - "useWhile": "error" + "useSingleVarDeclarator": "warn", + "useTemplate": "warn", + "useWhile": "warn" }, "suspicious": { "noArrayIndexKey": "off", "noAssignInExpressions": "off", - "noAsyncPromiseExecutor": "error", - "noCatchAssign": "error", - "noClassAssign": "error", - "noCommentText": "error", - "noCompareNegZero": "error", - "noConfusingLabels": "error", + "noAsyncPromiseExecutor": "warn", + "noCatchAssign": "warn", + "noClassAssign": "warn", + "noCommentText": "warn", + "noCompareNegZero": "warn", + "noConfusingLabels": "warn", "noConsoleLog": "off", - "noConstEnum": "error", - "noDebugger": "error", - "noDoubleEquals": "error", - "noDuplicateCase": "error", - "noDuplicateClassMembers": "error", - "noDuplicateJsxProps": "error", - "noDuplicateObjectKeys": "error", - "noDuplicateParameters": "error", - "noEmptyInterface": "error", + "noConstEnum": "warn", + "noControlCharactersInRegex": "warn", + "noDebugger": "warn", + "noDoubleEquals": "warn", + "noDuplicateCase": "warn", + "noDuplicateClassMembers": "warn", + "noDuplicateJsxProps": "warn", + "noDuplicateObjectKeys": "warn", + "noDuplicateParameters": "warn", + "noEmptyInterface": "warn", "noExplicitAny": "off", - "noExtraNonNullAssertion": "error", - "noFunctionAssign": "error", - "noImportAssign": "error", - "noLabelVar": "error", - "noPrototypeBuiltins": "error", - "noRedeclare": "error", - "noRedundantUseStrict": "error", - "noSelfCompare": "error", - "noShadowRestrictedNames": "error", - "noSparseArray": "error", - "noUnsafeNegation": "error", - "useDefaultSwitchClauseLast": "error", + "noExtraNonNullAssertion": "warn", + "noFunctionAssign": "warn", + "noImportAssign": "warn", + "noLabelVar": "warn", + "noPrototypeBuiltins": "warn", + "noRedeclare": "warn", + "noRedundantUseStrict": "warn", + "noSelfCompare": "warn", + "noShadowRestrictedNames": "warn", + "noSparseArray": "warn", + "noUnsafeDeclarationMerging": "warn", + "noUnsafeNegation": "warn", + "useDefaultSwitchClauseLast": "warn", + "useGetterReturn": "warn", "useNamespaceKeyword": "off", - "useValidTypeof": "error" + "useValidTypeof": "warn" } } }, diff --git a/package.json b/package.json index ea6d8deb75..7765457904 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ "test": "vitest run", "test:watch": "vitest watch", "format": "biome format . --write", - "check": "biome check .", - "biome:ci": "biome ci .", + "check": "biome check . --error-on-warnings", + "biome:ci": "biome ci . --error-on-warnings", "eslint": "eslint --ext js,ts,tsx --max-warnings 0 --cache --color src test website vite.config.ts", "eslint:fix": "npm run eslint -- --fix", "prettier:check": "prettier --check .",