CLI:
Version: 1.9.4
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: unset
JS_RUNTIME_NAME: unset
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: false
Linter:
JavaScript enabled: true
JSON enabled: true
CSS enabled: true
GraphQL enabled: false
Recommended: false
All: true
Enabled rules:
performance/noDelete
suspicious/noCatchAssign
suspicious/noUnsafeNegation
complexity/useLiteralKeys
a11y/noHeaderScope
suspicious/noMisrefactoredShorthandAssign
complexity/noMultipleSpacesInRegularExpressionLiterals
suspicious/useNamespaceKeyword
complexity/noUselessEmptyExport
a11y/useValidLang
suspicious/useValidTypeof
suspicious/noDuplicateSelectorsKeyframeBlock
a11y/useValidAriaRole
suspicious/noDuplicateParameters
a11y/useAriaActivedescendantWithTabindex
style/useDefaultParameterLast
correctness/noConstantCondition
correctness/noConstructorReturn
suspicious/noMisplacedAssertion
style/useExplicitLengthCheck
complexity/noEmptyTypeParameters
complexity/noForEach
correctness/noUnknownProperty
suspicious/noClassAssign
correctness/noUnusedLabels
complexity/noUselessTernary
correctness/noUnreachableSuper
suspicious/noCompareNegZero
style/useImportType
correctness/noSwitchDeclarations
a11y/noAutofocus
correctness/noUnsafeOptionalChaining
correctness/noConstAssign
suspicious/noControlCharactersInRegex
complexity/noUselessTypeConstraint
style/noVar
suspicious/noDoubleEquals
suspicious/noRedundantUseStrict
style/useLiteralEnumMembers
suspicious/noGlobalIsNan
suspicious/noEmptyInterface
suspicious/noConstEnum
suspicious/noSkippedTests
suspicious/noMisleadingCharacterClass
correctness/noPrecisionLoss
a11y/noLabelWithoutControl
style/useDefaultSwitchClause
correctness/noStringCaseMismatch
suspicious/noRedeclare
correctness/noSetterReturn
correctness/noInvalidConstructorSuper
suspicious/noImplicitAnyLet
a11y/useKeyWithClickEvents
suspicious/noDuplicateObjectKeys
suspicious/noUnsafeDeclarationMerging
suspicious/noFallthroughSwitchClause
complexity/noUselessThisAlias
correctness/noUnreachable
complexity/noThisInStatic
correctness/noInnerDeclarations
complexity/useOptionalChain
suspicious/noDuplicateCase
a11y/useValidAnchor
correctness/useArrayLiterals
complexity/useRegexLiterals
correctness/noSelfAssign
correctness/noInvalidBuiltinInstantiation
style/noUselessElse
style/useShorthandFunctionType
suspicious/noShadowRestrictedNames
correctness/noInvalidDirectionInLinearGradient
style/useThrowNewError
suspicious/noImportantInKeyframe
complexity/noUselessLabel
complexity/noUselessCatch
correctness/noUnsafeFinally
a11y/useAriaPropsForRole
style/useCollapsedElseIf
style/useNodeAssertStrict
correctness/noNonoctalDecimalEscape
style/useEnumInitializers
suspicious/noDuplicateTestHooks
a11y/useHtmlLang
correctness/noUndeclaredDependencies
style/noDoneCallback
complexity/noStaticOnlyClass
suspicious/noEvolvingTypes
style/useWhile
complexity/noUselessUndefinedInitialization
complexity/useArrowFunction
style/noInferrableTypes
a11y/noNoninteractiveTabindex
complexity/useSimpleNumberKeys
correctness/useYield
a11y/noInteractiveElementToNoninteractiveRole
suspicious/noLabelVar
correctness/noUnnecessaryContinue
suspicious/noApproximativeNumericConstant
style/useNumericLiterals
suspicious/noImportAssign
suspicious/useDefaultSwitchClauseLast
correctness/noGlobalObjectCalls
style/noParameterProperties
correctness/noEmptyCharacterClassInRegex
correctness/noUnknownUnit
suspicious/noSuspiciousSemicolonInJsx
suspicious/noSparseArray
a11y/useIframeTitle
complexity/noBannedTypes
correctness/noVoidElementsWithChildren
style/useThrowOnlyError
suspicious/noPrototypeBuiltins
style/useAsConstAssertion
style/useExportType
complexity/noUselessLoneBlockStatements
style/noArguments
a11y/useValidAriaValues
suspicious/noGlobalAssign
suspicious/noCommentText
suspicious/noThenProperty
suspicious/useGetterReturn
suspicious/noDebugger
suspicious/noMisleadingInstantiator
style/useFragmentSyntax
a11y/noPositiveTabindex
complexity/noVoid
a11y/useFocusableInteractive
correctness/noUnmatchableAnbSelector
suspicious/noDuplicateJsxProps
correctness/noEmptyPattern
complexity/noExcessiveNestedTestSuites
correctness/noRenderReturnValue
security/noGlobalEval
style/noYodaExpression
a11y/useKeyWithMouseEvents
a11y/noRedundantRoles
suspicious/noSelfCompare
security/noDangerouslySetInnerHtmlWithChildren
suspicious/noExtraNonNullAssertion
suspicious/noShorthandPropertyOverrides
style/useConst
style/noNonNullAssertion
suspicious/noAsyncPromiseExecutor
complexity/useFlatMap
correctness/useHookAtTopLevel
correctness/useIsNan
security/noDangerouslySetInnerHtml
style/useNodejsImportProtocol
suspicious/noGlobalIsFinite
style/useConsistentBuiltinInstantiation
complexity/noWith
suspicious/noDuplicateFontNames
a11y/noDistractingElements
suspicious/noDuplicateClassMembers
complexity/noExtraBooleanCast
performance/noAccumulatingSpread
suspicious/noConfusingLabels
style/useConsistentArrayType
correctness/noChildrenProp
correctness/noUnknownFunction
correctness/noInvalidPositionAtImportRule
a11y/useValidAriaProps
a11y/noRedundantAlt
complexity/useDateNow
suspicious/noConfusingVoidType
suspicious/noFocusedTests
a11y/useButtonType
a11y/useSemanticElements
style/noShoutyConstants
a11y/noAriaUnsupportedElements
correctness/noInvalidGridAreas
style/useFilenamingConvention
style/useShorthandArrayType
correctness/noFlatMapIdentity
style/useShorthandAssign
suspicious/useErrorMessage
a11y/noBlankTarget
a11y/useHeadingContent
correctness/useValidForDirection
correctness/noConstantMathMinMaxClamp
correctness/noUnusedPrivateClassMembers
correctness/noVoidTypeReturn
correctness/noInvalidUseBeforeDeclaration
a11y/noAriaHiddenOnFocusable
a11y/useGenericFontNames
correctness/noUnknownMediaFeatureName
correctness/noInvalidNewBuiltin
a11y/useAnchorContent
complexity/noUselessRename
style/useNumberNamespace
complexity/noUselessConstructor
style/noRestrictedGlobals
correctness/noUnusedFunctionParameters
style/useExponentiationOperator
suspicious/useAwait
a11y/noAccessKey
complexity/noUselessSwitchCase
style/useSingleVarDeclarator
suspicious/noExportsInTest
suspicious/useNumberToFixedDigitsArgument
a11y/noNoninteractiveElementToInteractiveRole
style/noCommaOperator
suspicious/noDuplicateAtImportRules
suspicious/useIsArray
complexity/noUselessFragments
correctness/noNewSymbol
performance/useTopLevelRegex
complexity/noUselessStringConcat
correctness/noUnusedImports
suspicious/noEmptyBlock
suspicious/noFunctionAssign
Workspace:
Open Documents: 0
noUndeclaredDependencies
https://github.com/calvinusesyourcode/biome-reproducible-error
Biome should know to use the package.json closest to the file.
TLDR: I am using bun
and have a monorepo with a packages/
folder, and I am getting linter errors relating to the root package.json, meanwhile biome should be using the package's package.json.
Because bun monorepos hoist the depedencies up into the root node_modules, instead of using a local node_modules folder in the nested package, biome gets confused when it sees the npm package installed in the root node_modules folder but no depedency mentioned in the root package.json. I bet it would have no problem if the npm package was installed in the nested package's node_modules.
Here's a one-liner:
git clone https://github.com/calvinusesyourcode/biome-reproducible-error && cd biome-reproducible-error && bun install && code ./packages/react/app/page.tsx
And then look at line 3 and 'react'
should give a warning with the message The current dependency isn't specified in your package.json. biome(lint/correctness/noUndeclaredDependencies)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too