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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃拝 noExcessiveNestedTestSuites rule violated by Zod schema #2599

Closed
1 task done
lukehedger opened this issue Apr 25, 2024 · 1 comment 路 Fixed by #2793
Closed
1 task done

馃拝 noExcessiveNestedTestSuites rule violated by Zod schema #2599

lukehedger opened this issue Apr 25, 2024 · 1 comment 路 Fixed by #2793
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@lukehedger
Copy link

Environment information

CLI:
  Version:                      1.7.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.2.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.6.6"

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

Linter:
  Recommended:                  false
  All:                          false
  Rules:                        complexity/useLiteralKeys = "off"
                                complexity/useOptionalChain = "warn"
                                correctness/noUnreachableSuper = "off"
                                correctness/noUnusedVariables = "warn"
                                performance/noDelete = "off"
                                style/noNonNullAssertion = "off"
                                style/useNamingConvention = "off"
                                suspicious/noExplicitAny = "off"
                                suspicious/noRedeclare = "off"
                                suspicious/noShadowRestrictedNames = "off"

Workspace:
  Open Documents:               0

Rule name

noExcessiveNestedTestSuites

Playground link

https://biomejs.dev/playground/?code=egAuAG8AYgBqAGUAYwB0ACgAewB9ACkACgAgACAALgBkAGUAcwBjAHIAaQBiAGUAKAAnACcAKQAKACAAIAAuAGQAZQBzAGMAcgBpAGIAZQAoACcAJwApAAoAIAAgAC4AZABlAHMAYwByAGkAYgBlACgAJwAnACkACgAgACAALgBkAGUAcwBjAHIAaQBiAGUAKAAnACcAKQAKACAAIAAuAGQAZQBzAGMAcgBpAGIAZQAoACcAJwApAAoAIAAgAC4AZABlAHMAYwByAGkAYgBlACgAJwAnACkAOwA%3D

Expected result

A Zod schema definition with multiple .describe() statements should not violate the noExcessiveNestedTestSuites rule

For example:

z.object({})
  .describe('')
  .describe('')
  .describe('')
  .describe('')
  .describe('')
  .describe('');

Currently throws:

Excessive `describe()` nesting detected. biome(lint/complexity/noExcessiveNestedTestSuites)

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Apr 25, 2024
@dyc3
Copy link
Contributor

dyc3 commented May 9, 2024

I think I can pick this one up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
3 participants