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

💅 useComponentExportOnlyModules does not allow wrapping with forwardRef or memo #4424

Open
heyitsarpit opened this issue Oct 29, 2024 · 2 comments · May be fixed by #4429
Open

💅 useComponentExportOnlyModules does not allow wrapping with forwardRef or memo #4424

heyitsarpit opened this issue Oct 29, 2024 · 2 comments · May be fixed by #4429
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@heyitsarpit
Copy link

Environment information

pnpm  biome rage --linter
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:           "v20.17.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.12.0"

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

Linter:
  JavaScript enabled:           true
  JSON enabled:                 true
  CSS enabled:                  true
  GraphQL enabled:              false
  Recommended:                  true
  All:                          false
  Enabled rules:
  performance/noDelete
  suspicious/noCatchAssign
  suspicious/noUnsafeNegation
  complexity/useLiteralKeys
  suspicious/noEmptyBlock
  style/useImportType
  complexity/noMultipleSpacesInRegularExpressionLiterals
  a11y/useValidLang
  complexity/noUselessEmptyExport
  suspicious/useNamespaceKeyword
  suspicious/useValidTypeof
  a11y/useValidAriaRole
  correctness/noConstantCondition
  a11y/useAriaActivedescendantWithTabindex
  suspicious/noAssignInExpressions
  style/useDefaultParameterLast
  complexity/noEmptyTypeParameters
  correctness/noConstructorReturn
  style/useSelfClosingElements
  suspicious/noDuplicateParameters
  suspicious/noDuplicateSelectorsKeyframeBlock
  nursery/useComponentExportOnlyModules
  correctness/noUnknownProperty
  style/useTemplate
  correctness/noUnusedLabels
  complexity/noUselessTernary
  correctness/noUnreachableSuper
  suspicious/noCompareNegZero
  suspicious/noExplicitAny
  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/noMisleadingCharacterClass
  correctness/noPrecisionLoss
  a11y/noLabelWithoutControl
  suspicious/noRedeclare
  correctness/noStringCaseMismatch
  correctness/noSetterReturn
  correctness/noInvalidConstructorSuper
  suspicious/noImplicitAnyLet
  suspicious/noFallthroughSwitchClause
  suspicious/noUnsafeDeclarationMerging
  complexity/noUselessThisAlias
  correctness/noUnreachable
  a11y/useKeyWithClickEvents
  suspicious/noDuplicateObjectKeys
  complexity/noThisInStatic
  complexity/useOptionalChain
  correctness/noInnerDeclarations
  style/noParameterAssign
  suspicious/noDuplicateCase
  a11y/useValidAnchor
  complexity/useRegexLiterals
  correctness/noSelfAssign
  correctness/noInvalidBuiltinInstantiation
  style/noUselessElse
  style/useShorthandFunctionType
  suspicious/noShadowRestrictedNames
  correctness/noInvalidDirectionInLinearGradient
  suspicious/noEmptyBlockStatements
  suspicious/noImportantInKeyframe
  a11y/useMediaCaption
  complexity/noUselessLabel
  complexity/noUselessCatch
  correctness/noUnsafeFinally
  a11y/useAriaPropsForRole
  correctness/noNonoctalDecimalEscape
  style/useEnumInitializers
  a11y/useHtmlLang
  suspicious/noDuplicateTestHooks
  complexity/noStaticOnlyClass
  style/useWhile
  complexity/useArrowFunction
  style/noInferrableTypes
  a11y/noNoninteractiveTabindex
  complexity/useSimpleNumberKeys
  correctness/useYield
  a11y/noInteractiveElementToNoninteractiveRole
  style/useNumericLiterals
  correctness/noUnnecessaryContinue
  suspicious/noApproximativeNumericConstant
  suspicious/noImportAssign
  suspicious/noLabelVar
  correctness/noGlobalObjectCalls
  suspicious/useDefaultSwitchClauseLast
  a11y/useAltText
  correctness/noEmptyCharacterClassInRegex
  correctness/noUnknownUnit
  suspicious/noSparseArray
  a11y/useIframeTitle
  complexity/noBannedTypes
  a11y/noSvgWithoutTitle
  correctness/noVoidElementsWithChildren
  style/useAsConstAssertion
  correctness/useJsxKeyInIterable
  nursery/noEnum
  complexity/noUselessLoneBlockStatements
  style/noArguments
  a11y/useValidAriaValues
  style/useExportType
  suspicious/noCommentText
  a11y/useFocusableInteractive
  correctness/noUnmatchableAnbSelector
  suspicious/noDebugger
  suspicious/noDuplicateJsxProps
  suspicious/noGlobalAssign
  a11y/noPositiveTabindex
  correctness/noEmptyPattern
  complexity/noExcessiveNestedTestSuites
  security/noDangerouslySetInnerHtmlWithChildren
  a11y/useKeyWithMouseEvents
  suspicious/noExtraNonNullAssertion
  suspicious/noShorthandPropertyOverrides
  correctness/noRenderReturnValue
  correctness/useExhaustiveDependencies
  security/noGlobalEval
  style/noNonNullAssertion
  a11y/noRedundantRoles
  complexity/useFlatMap
  correctness/useIsNan
  correctness/noUnusedVariables
  correctness/useHookAtTopLevel
  style/useConst
  suspicious/noGlobalIsFinite
  suspicious/noAsyncPromiseExecutor
  suspicious/noDuplicateFontNames
  suspicious/noSelfCompare
  suspicious/noThenProperty
  security/noDangerouslySetInnerHtml
  style/useNodejsImportProtocol
  a11y/noDistractingElements
  suspicious/noArrayIndexKey
  complexity/noWith
  suspicious/useGetterReturn
  suspicious/noDuplicateClassMembers
  complexity/noExtraBooleanCast
  performance/noAccumulatingSpread
  a11y/useValidAriaProps
  a11y/noRedundantAlt
  correctness/noChildrenProp
  correctness/noUnknownFunction
  correctness/noInvalidPositionAtImportRule
  suspicious/noConfusingLabels
  suspicious/noMisleadingInstantiator
  suspicious/noPrototypeBuiltins
  suspicious/noConfusingVoidType
  suspicious/noFocusedTests
  a11y/useButtonType
  a11y/useSemanticElements
  a11y/noAriaUnsupportedElements
  correctness/noInvalidGridAreas
  correctness/noFlatMapIdentity
  suspicious/noSuspiciousSemicolonInJsx
  a11y/noBlankTarget
  a11y/useHeadingContent
  correctness/useValidForDirection
  correctness/noVoidTypeReturn
  correctness/noInvalidUseBeforeDeclaration
  a11y/noAriaHiddenOnFocusable
  a11y/useGenericFontNames
  correctness/noUnknownMediaFeatureName
  a11y/useAnchorContent
  complexity/noUselessRename
  style/useNumberNamespace
  complexity/noUselessConstructor
  a11y/noAccessKey
  style/useExponentiationOperator
  style/noUnusedTemplateLiteral
  complexity/noUselessSwitchCase
  correctness/noUndeclaredVariables
  style/useSingleVarDeclarator
  suspicious/noExportsInTest
  a11y/noNoninteractiveElementToInteractiveRole
  style/noCommaOperator
  style/noNamespace
  suspicious/noDuplicateAtImportRules
  suspicious/useIsArray
  a11y/noHeaderScope
  complexity/noUselessFragments
  suspicious/noMisrefactoredShorthandAssign
  correctness/noNewSymbol
  complexity/noForEach
  suspicious/noClassAssign
  suspicious/noFunctionAssign

Workspace:
  Open Documents:               0


### Rule name

useComponentExportOnlyModules

### Playground link

https://biomejs.dev/playground/?lintRules=all&code=aQBtAHAAbwByAHQAIAAqACAAYQBzACAAUgBhAGQAaQB4AEEAYwBjAG8AcgBkAGkAbwBuACAAZgByAG8AbQAgACcAQAByAGEAZABpAHgALQB1AGkALwByAGUAYQBjAHQALQBhAGMAYwBvAHIAZABpAG8AbgAnAAoAaQBtAHAAbwByAHQAIAB7ACAAZgBvAHIAdwBhAHIAZABSAGUAZgAgAH0AIABmAHIAbwBtACAAJwByAGUAYQBjAHQAJwAKAAoAZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABDAG8AbgB0AGUAbgB0ACAAPQAgAGYAbwByAHcAYQByAGQAUgBlAGYAPAAKACAAIABIAFQATQBMAEQAaQB2AEUAbABlAG0AZQBuAHQALAAKACAAIABSAGEAZABpAHgAQQBjAGMAbwByAGQAaQBvAG4ALgBBAGMAYwBvAHIAZABpAG8AbgBDAG8AbgB0AGUAbgB0AFAAcgBvAHAAcwAgACYAIABBAGMAYwBvAHIAZABpAG8AbgBDAG8AbgB0AGUAbgB0AFAAcgBvAHAAcwAKAD4AKAAoAHsAIABjAGgAaQBsAGQAcgBlAG4ALAAgAGMAbABhAHMAcwBOAGEAbQBlACwAIAAuAC4ALgBwAHIAbwBwAHMAIAB9ACwAIABmAG8AcgB3AGEAcgBkAGUAZABSAGUAZgApACAAPQA+ACAAewAKACAAIAByAGUAdAB1AHIAbgAgACgACgAgACAAIAAgADwAUgBhAGQAaQB4AEEAYwBjAG8AcgBkAGkAbwBuAC4AQQBjAGMAbwByAGQAaQBvAG4AQwBvAG4AdABlAG4AdAAKACAAIAAgACAAIAAgAHsALgAuAC4AcAByAG8AcABzAH0ACgAgACAAIAAgACAAIABjAGwAYQBzAHMATgBhAG0AZQA9AHsAYwBuACgAJwBtAHQALQAyACcALAAgAGMAbABhAHMAcwBOAGEAbQBlACkAfQAKACAAIAAgACAAIAAgAHIAZQBmAD0AewBmAG8AcgB3AGEAcgBkAGUAZABSAGUAZgB9AAoAIAAgACAAIAA+AAoAIAAgACAAIAAgACAAewBjAGgAaQBsAGQAcgBlAG4AfQAKACAAIAAgACAAPAAvAFIAYQBkAGkAeABBAGMAYwBvAHIAZABpAG8AbgAuAEEAYwBjAG8AcgBkAGkAbwBuAEMAbwBuAHQAZQBuAHQAPgAKACAAIAApAAoAfQApAA%3D%3D

### Expected result

`useComponentExportOnlyModules` should allow components wrapped with `forwardRef` or `memo` or `React.forwardRef` or `React.memo`

### Code of Conduct

- [X] I agree to follow Biome's Code of Conduct
@heyitsarpit heyitsarpit added the S-Needs triage Status: this issue needs to be triaged label Oct 29, 2024
@heyitsarpit
Copy link
Author

cc @GunseiKPaseri

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

Successfully merging a pull request may close this issue.

2 participants