Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💅 useNamingConvention fix breaks code #4873

Open
1 task done
Leptopoda opened this issue Jan 10, 2025 · 0 comments
Open
1 task done

💅 useNamingConvention fix breaks code #4873

Leptopoda opened this issue Jan 10, 2025 · 0 comments
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@Leptopoda
Copy link

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.18.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.15.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true
  VCS disabled:                 true

Linter:
  JavaScript enabled:           true
  JSON enabled:                 true
  CSS enabled:                  true
  GraphQL enabled:              false
  Recommended:                  false
  All:                          true
  Enabled rules:
  suspicious/noCatchAssign
  complexity/useLiteralKeys
  complexity/noMultipleSpacesInRegularExpressionLiterals
  suspicious/useNamespaceKeyword
  complexity/noUselessEmptyExport
  suspicious/noAssignInExpressions
  suspicious/noDuplicateSelectorsKeyframeBlock
  suspicious/noDuplicateParameters
  correctness/noConstructorReturn
  style/useSelfClosingElements
  suspicious/noMisplacedAssertion
  style/useTemplate
  correctness/noUnusedLabels
  correctness/noUnreachableSuper
  suspicious/noCompareNegZero
  a11y/noAutofocus
  correctness/noUnsafeOptionalChaining
  correctness/noConstAssign
  suspicious/noControlCharactersInRegex
  style/noVar
  suspicious/noDoubleEquals
  suspicious/noEmptyInterface
  suspicious/noConstEnum
  correctness/noPrecisionLoss
  correctness/noSetterReturn
  correctness/noInvalidConstructorSuper
  suspicious/noImplicitAnyLet
  a11y/useKeyWithClickEvents
  suspicious/noDuplicateObjectKeys
  suspicious/noUnsafeDeclarationMerging
  correctness/noInnerDeclarations
  correctness/useArrayLiterals
  style/noUselessElse
  correctness/noInvalidDirectionInLinearGradient
  suspicious/noImportantInKeyframe
  complexity/noUselessLabel
  complexity/noUselessCatch
  a11y/useAriaPropsForRole
  style/useCollapsedElseIf
  correctness/noNonoctalDecimalEscape
  suspicious/noDuplicateTestHooks
  style/noDoneCallback
  complexity/noStaticOnlyClass
  complexity/noUselessUndefinedInitialization
  a11y/noInteractiveElementToNoninteractiveRole
  correctness/noNodejsModules
  correctness/noUnnecessaryContinue
  suspicious/noApproximativeNumericConstant
  suspicious/noLabelVar
  correctness/noEmptyCharacterClassInRegex
  correctness/useImportExtensions
  correctness/noUnknownUnit
  suspicious/noSparseArray
  a11y/useIframeTitle
  a11y/noSvgWithoutTitle
  correctness/noVoidElementsWithChildren
  correctness/useJsxKeyInIterable
  style/useExportType
  complexity/noUselessLoneBlockStatements
  style/noArguments
  a11y/useValidAriaValues
  suspicious/noGlobalAssign
  suspicious/noCommentText
  suspicious/noThenProperty
  suspicious/useGetterReturn
  style/useFragmentSyntax
  a11y/noPositiveTabindex
  style/useNamingConvention
  correctness/noRenderReturnValue
  correctness/useExhaustiveDependencies
  security/noGlobalEval
  style/noYodaExpression
  a11y/noRedundantRoles
  correctness/noUnusedVariables
  suspicious/noSelfCompare
  suspicious/noAsyncPromiseExecutor
  security/noDangerouslySetInnerHtml
  style/useNodejsImportProtocol
  suspicious/noArrayIndexKey
  complexity/noWith
  suspicious/noDuplicateClassMembers
  complexity/noExtraBooleanCast
  performance/noAccumulatingSpread
  suspicious/noConfusingLabels
  correctness/noChildrenProp
  correctness/noUnknownFunction
  correctness/noInvalidPositionAtImportRule
  style/noShoutyConstants
  a11y/noAriaUnsupportedElements
  correctness/noFlatMapIdentity
  a11y/noBlankTarget
  a11y/useHeadingContent
  correctness/useValidForDirection
  correctness/noInvalidUseBeforeDeclaration
  a11y/noAriaHiddenOnFocusable
  a11y/useGenericFontNames
  style/useBlockStatements
  correctness/noInvalidNewBuiltin
  style/noNegationElse
  complexity/useSimplifiedLogicExpression
  correctness/noUnusedFunctionParameters
  style/noRestrictedGlobals
  style/noNamespaceImport
  style/noUnusedTemplateLiteral
  correctness/noUndeclaredVariables
  style/useExponentiationOperator
  suspicious/useAwait
  style/noNamespace
  suspicious/noDuplicateAtImportRules
  complexity/noUselessFragments
  performance/useTopLevelRegex
  suspicious/noEmptyBlock
  correctness/noUnusedImports
  complexity/noUselessStringConcat
  suspicious/noFunctionAssign
  performance/noDelete
  suspicious/noUnsafeNegation
  a11y/useValidLang
  suspicious/useValidTypeof
  a11y/useValidAriaRole
  correctness/noConstantCondition
  a11y/useAriaActivedescendantWithTabindex
  style/useExplicitLengthCheck
  style/useDefaultParameterLast
  complexity/noEmptyTypeParameters
  correctness/noUnknownProperty
  complexity/noUselessTernary
  suspicious/noExplicitAny
  correctness/noSwitchDeclarations
  complexity/noUselessTypeConstraint
  suspicious/noRedundantUseStrict
  style/useLiteralEnumMembers
  suspicious/noGlobalIsNan
  suspicious/noSkippedTests
  suspicious/noMisleadingCharacterClass
  a11y/noLabelWithoutControl
  style/useDefaultSwitchClause
  correctness/noStringCaseMismatch
  suspicious/noRedeclare
  suspicious/noFallthroughSwitchClause
  complexity/noUselessThisAlias
  correctness/noUnreachable
  complexity/noThisInStatic
  complexity/useOptionalChain
  suspicious/noDuplicateCase
  style/noParameterAssign
  a11y/useValidAnchor
  complexity/useRegexLiterals
  correctness/noSelfAssign
  correctness/noInvalidBuiltinInstantiation
  style/useShorthandFunctionType
  style/useSingleCaseStatement
  style/useThrowNewError
  suspicious/noEmptyBlockStatements
  suspicious/noShadowRestrictedNames
  a11y/useMediaCaption
  correctness/noUnsafeFinally
  style/useNodeAssertStrict
  style/useEnumInitializers
  a11y/useHtmlLang
  correctness/noUndeclaredDependencies
  suspicious/noEvolvingTypes
  style/useWhile
  suspicious/noConsole
  complexity/useArrowFunction
  style/noInferrableTypes
  a11y/noNoninteractiveTabindex
  complexity/useSimpleNumberKeys
  correctness/useYield
  style/useNumericLiterals
  suspicious/noImportAssign
  suspicious/useDefaultSwitchClauseLast
  correctness/noGlobalObjectCalls
  style/noParameterProperties
  a11y/useAltText
  performance/noBarrelFile
  suspicious/noSuspiciousSemicolonInJsx
  complexity/noBannedTypes
  style/useThrowOnlyError
  suspicious/noPrototypeBuiltins
  style/useAsConstAssertion
  suspicious/noDebugger
  suspicious/noMisleadingInstantiator
  complexity/noVoid
  a11y/useFocusableInteractive
  correctness/noUnmatchableAnbSelector
  suspicious/noDuplicateJsxProps
  correctness/noEmptyPattern
  complexity/noExcessiveNestedTestSuites
  performance/noReExportAll
  a11y/useKeyWithMouseEvents
  security/noDangerouslySetInnerHtmlWithChildren
  suspicious/noExtraNonNullAssertion
  suspicious/noShorthandPropertyOverrides
  style/useConst
  style/noNonNullAssertion
  complexity/useFlatMap
  correctness/useHookAtTopLevel
  correctness/useIsNan
  suspicious/noGlobalIsFinite
  style/useConsistentBuiltinInstantiation
  suspicious/noDuplicateFontNames
  complexity/noExcessiveCognitiveComplexity
  a11y/noDistractingElements
  style/useConsistentArrayType
  style/useForOf
  a11y/useValidAriaProps
  a11y/noRedundantAlt
  complexity/useDateNow
  suspicious/noConfusingVoidType
  suspicious/noFocusedTests
  a11y/useButtonType
  a11y/useSemanticElements
  correctness/noInvalidGridAreas
  style/useFilenamingConvention
  style/useShorthandArrayType
  style/useShorthandAssign
  suspicious/useErrorMessage
  correctness/noConstantMathMinMaxClamp
  correctness/noUnusedPrivateClassMembers
  correctness/noVoidTypeReturn
  correctness/noUnknownMediaFeatureName
  a11y/useAnchorContent
  complexity/noUselessRename
  style/useNumberNamespace
  complexity/noUselessConstructor
  a11y/noAccessKey
  complexity/noUselessSwitchCase
  style/noDefaultExport
  style/useSingleVarDeclarator
  suspicious/noExportsInTest
  suspicious/useNumberToFixedDigitsArgument
  a11y/noNoninteractiveElementToInteractiveRole
  style/noCommaOperator
  suspicious/noConsoleLog
  suspicious/useIsArray
  correctness/noNewSymbol
  a11y/noHeaderScope
  suspicious/noMisrefactoredShorthandAssign
  complexity/noForEach
  suspicious/noClassAssign
  style/noImplicitBoolean
  style/useImportType

Workspace:
  Open Documents:               0

Rule name

useNamingConvention

Playground link

https://biomejs.dev/playground/?lintRules=all&code=aQBtAHAAbwByAHQAIABIAFQATQBMAFcAcgBhAHAAcABlAHIAIABmAHIAbwBtACAAJwBIAFQATQBMAFcAcgBhAHAAcABlAHIALgB0AHMAeAAnAAoACgAKAGYAdQBuAGMAdABpAG8AbgAgAHQAZQBzAHQAKAApACAAOgAgAHUAbgBkAGUAZgBpAG4AZQBkACAAewAKACAAIAAgACAAcgBlAHQAdQByAG4AIAA8AEgAVABNAEwAVwByAGEAcABwAGUAcgA%2BACAAPAAvAEgAVABNAEwAVwByAGEAcABwAGUAcgA%2BAAoAfQA%3D

Expected result

Quick fixes for the rule are allegedly "safe" to use.
Running the quick fix here will rename the imported element, breaking the code.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Leptopoda Leptopoda added the S-Needs triage Status: this issue needs to be triaged label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Needs triage Status: this issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant