Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

💅 useFilenamingConvention ignores style in extension #3648

Closed
1 task done
kyptov opened this issue Aug 13, 2024 · 0 comments
Closed
1 task done

💅 useFilenamingConvention ignores style in extension #3648

kyptov opened this issue Aug 13, 2024 · 0 comments

Comments

@kyptov
Copy link

kyptov commented Aug 13, 2024

Environment information

D:\tms-api git:[feat-highway-api]
biome rage --linter
CLI:
  Version:                      1.8.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v20.16.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

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:                  false
  Recommended:                  false
  All:                          false
  Enabled rules:
  complexity/noBannedTypes
  suspicious/noCatchAssign
  suspicious/noPrototypeBuiltins
  complexity/useLiteralKeys
  suspicious/noMisleadingInstantiator
  suspicious/noDebugger
  complexity/noMultipleSpacesInRegularExpressionLiterals
  complexity/noUselessLoneBlockStatements
  complexity/noVoid
  suspicious/noGlobalAssign
  suspicious/noUnsafeNegation
  suspicious/useValidTypeof
  correctness/noConstantCondition
  suspicious/noDuplicateParameters
  correctness/noEmptyPattern
  suspicious/noExtraNonNullAssertion
  complexity/noUselessTernary
  style/useConst
  suspicious/noCompareNegZero
  suspicious/noSelfCompare
  correctness/noUnreachableSuper
  security/noGlobalEval
  style/noNonNullAssertion
  correctness/noConstAssign
  correctness/noSwitchDeclarations
  correctness/noUnusedVariables
  suspicious/noAsyncPromiseExecutor
  correctness/useIsNan
  suspicious/noControlCharactersInRegex
  complexity/noUselessTypeConstraint
  style/noVar
  suspicious/noDoubleEquals
  style/useConsistentArrayType
  complexity/noWith
  suspicious/noDuplicateClassMembers
  complexity/noExtraBooleanCast
  suspicious/noMisleadingCharacterClass
  correctness/noPrecisionLoss
  suspicious/noRedeclare
  correctness/noInvalidConstructorSuper
  suspicious/noDuplicateObjectKeys
  suspicious/noFallthroughSwitchClause
  correctness/noUnreachable
  suspicious/noConfusingVoidType
  complexity/useOptionalChain
  suspicious/noDuplicateCase
  style/useFilenamingConvention
  complexity/useRegexLiterals
  correctness/noSelfAssign
  style/useShorthandFunctionType
  suspicious/noEmptyBlockStatements
  suspicious/noShadowRestrictedNames
  complexity/noUselessCatch
  correctness/noInvalidUseBeforeDeclaration
  correctness/noUnsafeFinally
  style/useBlockStatements
  complexity/noUselessRename
  complexity/noUselessConstructor
  style/useEnumInitializers
  style/noDefaultExport
  style/useSingleVarDeclarator
  suspicious/noImportAssign
  style/noCommaOperator
  suspicious/useDefaultSwitchClauseLast
  style/noNamespace
  correctness/noGlobalObjectCalls
  correctness/noNewSymbol
  correctness/noEmptyCharacterClassInRegex
  suspicious/noClassAssign
  suspicious/noFunctionAssign

Workspace:
  Open Documents:               0

Rule name

useFilenamingConvention

Playground link

Not reproducible in the playground.

Expected result

In our project, we are using kebab case for file naming. To distinguish between "layers," we are using suffixes.
For User, we might have several files:
user.entity.ts, user.service.ts, user.repository.ts, user.use-case.ts. This works really well.

However, the problem is with user.use-case.ts Biome shows an error: The file extension should be in lowercase without any special characters.
Other examples include user.unit-test.ts and user.e2e-test.ts.

The expected result is no error for the second and following extensions.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@biomejs biomejs locked and limited conversation to collaborators Aug 13, 2024
@ematipico ematipico converted this issue into discussion #3650 Aug 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant