Skip to content

💅 GritQL plugin not working (grit does) #6782

@eMerzh

Description

@eMerzh

Environment information

yarn run v1.22.22
$ /Users/bmaron/code/node_modules/.bin/biome rage --linter
CLI:
  Version:                      2.1.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v24.1.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         yarn/1.22.22

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true

Linter:
  JavaScript enabled:           unset
  JSON enabled:                 unset
  CSS enabled:                  unset
  GraphQL enabled:              unset
  Recommended:                  true
  Enabled rules:
    a11y/noAccessKey
    a11y/noAriaHiddenOnFocusable
    a11y/noAriaUnsupportedElements
    a11y/noAutofocus
    a11y/noDistractingElements
    a11y/noHeaderScope
    a11y/noInteractiveElementToNoninteractiveRole
    a11y/noLabelWithoutControl
    a11y/noNoninteractiveElementToInteractiveRole
    a11y/noNoninteractiveTabindex
    a11y/noPositiveTabindex
    a11y/noRedundantAlt
    a11y/noRedundantRoles
    a11y/noSvgWithoutTitle
    a11y/useAltText
    a11y/useAnchorContent
    a11y/useAriaActivedescendantWithTabindex
    a11y/useAriaPropsForRole
    a11y/useAriaPropsSupportedByRole
    a11y/useButtonType
    a11y/useFocusableInteractive
    a11y/useGenericFontNames
    a11y/useHeadingContent
    a11y/useHtmlLang
    a11y/useIframeTitle
    a11y/useKeyWithMouseEvents
    a11y/useMediaCaption
    a11y/useSemanticElements
    a11y/useValidAnchor
    a11y/useValidAriaProps
    a11y/useValidAriaRole
    a11y/useValidAriaValues
    a11y/useValidAutocomplete
    a11y/useValidLang
    complexity/noAdjacentSpacesInRegex
    complexity/noArguments
    complexity/noCommaOperator
    complexity/noEmptyTypeParameters
    complexity/noExtraBooleanCast
    complexity/noFlatMapIdentity
    complexity/noStaticOnlyClass
    complexity/noThisInStatic
    complexity/noUselessCatch
    complexity/noUselessConstructor
    complexity/noUselessContinue
    complexity/noUselessEmptyExport
    complexity/noUselessEscapeInRegex
    complexity/noUselessFragments
    complexity/noUselessLabel
    complexity/noUselessLoneBlockStatements
    complexity/noUselessRename
    complexity/noUselessStringRaw
    complexity/noUselessTernary
    complexity/noUselessThisAlias
    complexity/noUselessTypeConstraint
    complexity/noUselessUndefinedInitialization
    complexity/useArrowFunction
    complexity/useDateNow
    complexity/useFlatMap
    complexity/useLiteralKeys
    complexity/useNumericLiterals
    complexity/useOptionalChain
    complexity/useRegexLiterals
    complexity/useSimpleNumberKeys
    correctness/noChildrenProp
    correctness/noConstAssign
    correctness/noConstantCondition
    correctness/noConstantMathMinMaxClamp
    correctness/noConstructorReturn
    correctness/noEmptyCharacterClassInRegex
    correctness/noEmptyPattern
    correctness/noGlobalObjectCalls
    correctness/noInnerDeclarations
    correctness/noInvalidBuiltinInstantiation
    correctness/noInvalidConstructorSuper
    correctness/noInvalidDirectionInLinearGradient
    correctness/noInvalidGridAreas
    correctness/noInvalidPositionAtImportRule
    correctness/noInvalidUseBeforeDeclaration
    correctness/noMissingVarFunction
    correctness/noNonoctalDecimalEscape
    correctness/noPrecisionLoss
    correctness/noSelfAssign
    correctness/noSetterReturn
    correctness/noStringCaseMismatch
    correctness/noSwitchDeclarations
    correctness/noUnknownFunction
    correctness/noUnknownMediaFeatureName
    correctness/noUnknownProperty
    correctness/noUnknownPseudoClass
    correctness/noUnknownPseudoElement
    correctness/noUnknownTypeSelector
    correctness/noUnknownUnit
    correctness/noUnmatchableAnbSelector
    correctness/noUnreachable
    correctness/noUnreachableSuper
    correctness/noUnsafeFinally
    correctness/noUnsafeOptionalChaining
    correctness/noUnusedFunctionParameters
    correctness/noUnusedImports
    correctness/noUnusedLabels
    correctness/noUnusedPrivateClassMembers
    correctness/noUnusedVariables
    correctness/noVoidElementsWithChildren
    correctness/noVoidTypeReturn
    correctness/useHookAtTopLevel
    correctness/useIsNan
    correctness/useValidForDirection
    correctness/useValidTypeof
    correctness/useYield
    performance/noAccumulatingSpread
    performance/noDynamicNamespaceImportAccess
    security/noBlankTarget
    security/noDangerouslySetInnerHtml
    security/noDangerouslySetInnerHtmlWithChildren
    security/noGlobalEval
    style/noDescendingSpecificity
    style/noInferrableTypes
    style/noRestrictedGlobals
    style/noUnusedTemplateLiteral
    style/useArrayLiterals
    style/useAsConstAssertion
    style/useCollapsedIf
    style/useConst
    style/useDefaultParameterLast
    style/useDeprecatedReason
    style/useExponentiationOperator
    style/useExportType
    style/useLiteralEnumMembers
    style/useNodejsImportProtocol
    style/useSelfClosingElements
    style/useShorthandFunctionType
    style/useSingleVarDeclarator
    style/useTemplate
    suspicious/noApproximativeNumericConstant
    suspicious/noAsyncPromiseExecutor
    suspicious/noCatchAssign
    suspicious/noClassAssign
    suspicious/noCommentText
    suspicious/noCompareNegZero
    suspicious/noConfusingLabels
    suspicious/noConstEnum
    suspicious/noControlCharactersInRegex
    suspicious/noDebugger
    suspicious/noDocumentCookie
    suspicious/noDoubleEquals
    suspicious/noDuplicateAtImportRules
    suspicious/noDuplicateCase
    suspicious/noDuplicateClassMembers
    suspicious/noDuplicateCustomProperties
    suspicious/noDuplicateElseIf
    suspicious/noDuplicateFields
    suspicious/noDuplicateFontNames
    suspicious/noDuplicateJsxProps
    suspicious/noDuplicateObjectKeys
    suspicious/noDuplicateParameters
    suspicious/noDuplicateProperties
    suspicious/noDuplicateSelectorsKeyframeBlock
    suspicious/noEmptyBlock
    suspicious/noEmptyInterface
    suspicious/noExtraNonNullAssertion
    suspicious/noFallthroughSwitchClause
    suspicious/noFunctionAssign
    suspicious/noGlobalAssign
    suspicious/noGlobalIsFinite
    suspicious/noImportAssign
    suspicious/noImportantInKeyframe
    suspicious/noIrregularWhitespace
    suspicious/noLabelVar
    suspicious/noMisleadingCharacterClass
    suspicious/noMisleadingInstantiator
    suspicious/noMisrefactoredShorthandAssign
    suspicious/noOctalEscape
    suspicious/noPrototypeBuiltins
    suspicious/noRedeclare
    suspicious/noRedundantUseStrict
    suspicious/noSelfCompare
    suspicious/noShadowRestrictedNames
    suspicious/noShorthandPropertyOverrides
    suspicious/noSparseArray
    suspicious/noSuspiciousSemicolonInJsx
    suspicious/noTemplateCurlyInString
    suspicious/noThenProperty
    suspicious/noUnsafeDeclarationMerging
    suspicious/noUnsafeNegation
    suspicious/noWith
    suspicious/useAdjacentOverloadSignatures
    suspicious/useDefaultSwitchClauseLast
    suspicious/useGetterReturn
    suspicious/useGoogleFontDisplay
    suspicious/useIsArray
    suspicious/useNamespaceKeyword

Workspace:
  Open Documents:               0

Done in 0.21s.

Rule name

custom

Playground link

https://biomejs.dev/playground/?files.main.tsx=YwBvAG4AcwB0ACAAQwBvAG0AcABvAG4AZQBuAHQAIAA9ACAAKAApACAAPQA%2BACAAewAKACAAIAByAGUAdAB1AHIAbgAgADwAUgBlAGEAYwB0AC4ARgByAGEAZwBtAGUAbgB0AD4ACgAgACAAIAAgADwAZABpAHYAPgBIAGUAbABsAG8APAAvAGQAaQB2AD4ACgAgACAAIAAgADwAcwBwAGEAbgA%2BAFcAbwByAGwAZAA8AC8AcwBwAGEAbgA%2BAAoAIAAgADwALwBSAGUAYQBjAHQALgBGAHIAYQBnAG0AZQBuAHQAPgAKAH0ACgAKAGUAeABwAG8AcgB0ACAAZABlAGYAYQB1AGwAdAAgAEMAbwBtAHAAbwBuAGUAbgB0AA%3D%3D&files.fragment.grit=YAA8ACQAYwBvAG0AcABvAG4AZQBuAHQAIAAkAGEAdAB0AHIAcwA%2BACQAYwBoAGkAbABkAHIAZQBuADwALwAkAGMAbwBtAHAAbwBuAGUAbgB0AD4AYAAgAGEAcwAgACQAZgByAGEAZwBtAGUAbgB0ACAAdwBoAGUAcgBlACAAewAKACAAIAAgACAAJABjAG8AbQBwAG8AbgBlAG4AdAAgADwAOgAgAGAAUgBlAGEAYwB0AC4ARgByAGEAZwBtAGUAbgB0AGAALAAKACAAIAAgACAAcgBlAGcAaQBzAHQAZQByAF8AZABpAGEAZwBuAG8AcwB0AGkAYwAoAHMAcABhAG4APQAkAGYAcgBhAGcAbQBlAG4AdAAsACAAbQBlAHMAcwBhAGcAZQA9AGAAUAByAGUAZgBlAHIAIABpAG0AcABvAHIAdABpAG4AZwAgADwARgByAGEAZwBtAGUAbgB0ACAALwA%2BACAAaQBuAHMAdABlAGEAZAAgAG8AZgAgAHIAZQBsAHkAaQBuAGcAIABvAG4AIABhAHUAdABvACAAaQBtAHAAbwByAHQAIAAoACQAYwBvAG0AcABvAG4AZQBuAHQAKQBgACkACgB9AA%3D%3D

Expected result

this pattern in gritcli seems to work, but in biome it doesn't give anything

`<$component $attrs>$children</$component>` as $fragment where {
    $component <: `React.Fragment`,
    log(message="This is a debug log", variable=$component)
}

It's not clear what work in biome's grit and what only work on grit's grit

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PluginsArea: pluginsL-GritLanguage: GritQLS-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions