@taskylizard/biome-config

1.0.5 • Public • Published

@taskylizard/biome-config

npm (scoped)

Usage

Installation

npm|yarn|pnpm|bun add -D @biomejs/biome @taskylizard/biome-config

Add the extends array to your project's biome.json file:

// <project-root>/biome.json
{
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  "extends": "@taskylizard/biome-config"
  // ...
}

Add scripts to your package.json if you haven't already:

// <project-root>/package.json
{
    //...
    "scripts": {
            "format": "biome format . --write",
            "lint": "biome lint .",
            "lint:fix": "biome lint . --write",
            "lint:fix:unsafe": "biome lint . --unsafe"
        }
    }
    // ...
}

Visual Studio Code Setup

  1. Install the BiomeJS Visual Studio Code extension if you haven't already.

  2. Add the following settings to your project's .vscode/settings.json, or create them anew:

// <project-root>/.vscode/settings.json
{
  // ...
  "[javascript][javascriptreact][typescript][typescriptreact][json][jsonc]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  }
  // ...
}

Rules

The follow rules are enabled by default for a out-of-the-box experience.

a11y - useValidLang — `error` - noAriaHiddenOnFocusable — `error` - noAccessKey — `error` - noAriaUnsupportedElements — `error` - noAutofocus — `error` - noBlankTarget — `error` - noDistractingElements — `error` - noHeaderScope — `error` - noInteractiveElementToNoninteractiveRole — `error` - noNoninteractiveElementToInteractiveRole — `error` - noNoninteractiveTabindex — `error` - noPositiveTabindex — `error` - noRedundantAlt — `error` - noRedundantRoles — `error` - useAltText — `error` - useAnchorContent — `error` - useAriaActivedescendantWithTabindex — `error` - useAriaPropsForRole — `error` - useButtonType — `warn` - useHeadingContent — `error` - useHtmlLang — `error` - useIframeTitle — `error` - useKeyWithClickEvents — `error` - useKeyWithMouseEvents — `error` - useMediaCaption — `error` - useValidAnchor — `error` - useValidAriaProps — `error` - useValidAriaRole — `error` - useValidAriaValues — `error` - noLabelWithoutControl — `error`
complexity - useFlatMap — `error` - noThisInStatic — `error` - useSimplifiedLogicExpression — `error` - noExtraBooleanCast — `error` - noMultipleSpacesInRegularExpressionLiterals — `error` - noUselessCatch — `error` - noUselessFragments — `warn` - noUselessLabel — `error` - noUselessLoneBlockStatements — `error` - noUselessRename — `warn` - noUselessTernary — `error` - noWith — `error` - useRegexLiterals — `error` - noUselessStringConcat — `error` - noUselessUndefinedInitialization — `warn` - noExcessiveCognitiveComplexity — `warn`
correctness - noChildrenProp — `error` - noConstAssign — `error` - noConstantCondition — `error` - noConstructorReturn — `error` - noEmptyCharacterClassInRegex — `error` - noEmptyPattern — `error` - noGlobalObjectCalls — `error` - noInnerDeclarations — `error` - noInvalidConstructorSuper — `error` - noNewSymbol — `error` - noNonoctalDecimalEscape — `error` - noPrecisionLoss — `error` - noSelfAssign — `error` - noSetterReturn — `error` - noSwitchDeclarations — `error` - noUndeclaredVariables — `error` - noUnreachable — `error` - noUnreachableSuper — `error` - noUnsafeFinally — `error` - noUnsafeOptionalChaining — `error` - noUnusedLabels — `error` - noUnusedVariables — `error` - useArrayLiterals — `error` - useExhaustiveDependencies — `warn` - useHookAtTopLevel — `error` - useIsNan — `error` - useJsxKeyInIterable — `error` - useValidForDirection — `error` - useYield — `error`
nursery - noSubstr — `error` - noDuplicateElseIf — `error`
security - noDangerouslySetInnerHtmlWithChildren — `error` - noGlobalEval — `error`
style - useNumberNamespace — `error` - noArguments — `error` - noCommaOperator — `error` - noDefaultExport — `error` - noImplicitBoolean — `warn` - noNonNullAssertion — `off` - noParameterAssign — `error` - noUselessElse — `warn` - noVar — `error` - useBlockStatements — `off` - useCollapsedElseIf — `warn` - useConst — `warn` - useFilenamingConvention — `See config object in biome.json` - useFragmentSyntax — `warn` - useNodejsImportProtocol — `warn` - useNumericLiterals — `error` - useTemplate — `warn` - noNamespace — `error` - useSelfClosingElements — `error` - useImportType — `warn` - noUnusedTemplateLiteral — `error` - noYodaExpression — `warn` - useConsistentBuiltinInstantiation — `error` - useNamingConvention — `See config object in biome.json`
suspicious - noArrayIndexKey — `warn` - noAssignInExpressions — `error` - noAsyncPromiseExecutor — `error` - noCatchAssign — `error` - noClassAssign — `error` - noCommentText — `error` - noCompareNegZero — `error` - noConfusingLabels — `error` - noConsoleLog — `error` - noControlCharactersInRegex — `error` - noDebugger — `error` - noDoubleEquals — `error` - noDuplicateCase — `error` - noDuplicateClassMembers — `error` - noDuplicateJsxProps — `error` - noDuplicateObjectKeys — `error` - noDuplicateParameters — `error` - noEmptyBlockStatements — `error` - noFallthroughSwitchClause — `error` - noFunctionAssign — `error` - noGlobalAssign — `error` - noImportAssign — `error` - noLabelVar — `error` - noMisleadingCharacterClass — `error` - noPrototypeBuiltins — `error` - noRedeclare — `error` - noSelfCompare — `error` - noShadowRestrictedNames — `error` - noUnsafeDeclarationMerging — `warn` - noUnsafeNegation — `error` - useAwait — `error` - useDefaultSwitchClauseLast — `error` - useGetterReturn — `error` - useIsArray — `error` - useValidTypeof — `error` - useNamespaceKeyword — `error` - noEmptyInterface — `error` - noApproximativeNumericConstant — `error` - noSuspiciousSemicolonInJsx — `error`

Package Sidebar

Install

npm i @taskylizard/biome-config

Weekly Downloads

3

Version

1.0.5

License

none

Unpacked Size

17.3 kB

Total Files

4

Last publish

Collaborators

  • taskylizard