From d22a55e4395e6325880eb9e59eb1ed82fa8fe332 Mon Sep 17 00:00:00 2001 From: Dominik Stumpf Date: Wed, 10 Jul 2024 14:09:55 +0200 Subject: [PATCH] ci: simplify biome config --- biome.json | 90 ++++++++++++------------------------------ lint-staged.config.mjs | 2 +- 2 files changed, 26 insertions(+), 66 deletions(-) diff --git a/biome.json b/biome.json index a0a4ee3ee4..479bd96aaf 100644 --- a/biome.json +++ b/biome.json @@ -29,7 +29,15 @@ "noInvalidUseBeforeDeclaration": "off", "noPrecisionLoss": "error", "noUnusedVariables": "off", - "useArrayLiterals": "off" + "useArrayLiterals": "off", + "noConstAssign": "off", + "noGlobalObjectCalls": "off", + "noInvalidConstructorSuper": "off", + "noNewSymbol": "off", + "noSetterReturn": "off", + "noUndeclaredVariables": "off", + "noUnreachable": "off", + "noUnreachableSuper": "off" }, "style": { "noInferrableTypes": "error", @@ -37,7 +45,10 @@ "noNonNullAssertion": "warn", "useAsConstAssertion": "error", "useBlockStatements": "off", - "useDefaultParameterLast": "error" + "useDefaultParameterLast": "error", + "noArguments": "error", + "noVar": "error", + "useConst": "error" }, "suspicious": { "noDuplicateClassMembers": "error", @@ -47,7 +58,17 @@ "noMisleadingInstantiator": "error", "noRedeclare": "error", "useAwait": "off", - "useNamespaceKeyword": "error" + "useNamespaceKeyword": "error", + "noDuplicateObjectKeys": "off", + "noDuplicateParameters": "off", + "noFunctionAssign": "off", + "noImportAssign": "off", + "noUnsafeNegation": "off", + "useGetterReturn": "off", + "useValidTypeof": "off" + }, + "nursery": { + "useSortedClasses": "info" } } }, @@ -63,66 +84,5 @@ "quoteStyle": "double", "attributePosition": "auto" } - }, - "overrides": [ - { - "linter": { - "rules": { - "correctness": { - "noConstAssign": "off", - "noGlobalObjectCalls": "off", - "noInvalidConstructorSuper": "off", - "noNewSymbol": "off", - "noSetterReturn": "off", - "noUndeclaredVariables": "off", - "noUnreachable": "off", - "noUnreachableSuper": "off" - }, - "suspicious": { - "noDuplicateClassMembers": "off", - "noDuplicateObjectKeys": "off", - "noDuplicateParameters": "off", - "noFunctionAssign": "off", - "noImportAssign": "off", - "noRedeclare": "off", - "noUnsafeNegation": "off", - "useGetterReturn": "off", - "useValidTypeof": "off" - } - } - } - }, - { - "linter": { - "rules": { - "correctness": { - "noConstAssign": "off", - "noGlobalObjectCalls": "off", - "noInvalidConstructorSuper": "off", - "noNewSymbol": "off", - "noSetterReturn": "off", - "noUndeclaredVariables": "off", - "noUnreachable": "off", - "noUnreachableSuper": "off" - }, - "style": { - "noArguments": "error", - "noVar": "error", - "useConst": "error" - }, - "suspicious": { - "noDuplicateClassMembers": "off", - "noDuplicateObjectKeys": "off", - "noDuplicateParameters": "off", - "noFunctionAssign": "off", - "noImportAssign": "off", - "noRedeclare": "off", - "noUnsafeNegation": "off", - "useGetterReturn": "off", - "useValidTypeof": "off" - } - } - } - } - ] + } } diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index 7a88a76095..37cfef3dfb 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -1,5 +1,5 @@ const config = { - "*.{mjs,js,jsx,ts,tsx}": ["biome format --write", "biome lint --apply"], + "*.{mjs,js,jsx,ts,tsx}": ["biome check --write"], "*.json": ["biome format --write"], }