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

🐛 useConsistentArrayType won't accept options #1483

Closed
1 task done
EvHaus opened this issue Jan 9, 2024 · 0 comments · Fixed by #1490
Closed
1 task done

🐛 useConsistentArrayType won't accept options #1483

EvHaus opened this issue Jan 9, 2024 · 0 comments · Fixed by #1490
Assignees
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@EvHaus
Copy link

EvHaus commented Jan 9, 2024

Environment information

CLI:
  Version:                      1.5.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.1.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.10.2"

Biome Configuration:
  Error:                        The rule useConsistentArrayType doesn't accept any options.
  Status:                       Loaded with errors
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

I'm trying to setup useConsistentArrayType rule to use the "generic" syntax, but it seems like it won't accept any options. The config code I'm using is:

{
    "linter": {
        "rules": {
            "style": {
                "useConsistentArrayType": {
                    "level": "error",
                    "options": {
                        "syntax": "generic"
                    }
                }
            }
        }
    }
}

The schema check fails with:

Missing property "maxAllowedComplexity"
Property syntax is not allowed

And running biome check fails with:

/my project/biome.json:56:17 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ The rule useConsistentArrayType doesn't accept any options.

    54 │                                "useConsistentArrayType": {
    55 │                                        "level": "error",
  > 56 │                                        "options": {
       │                                                   ^
  > 57 │                                                "syntax": "generic"
  > 58 │                                        }
       │                                        ^
    59 │                                }

Expected result

I'm expecting to be able to change the default behavior of the rule from "shorthand" to "generic" syntax support, as per the docs: https://biomejs.dev/linter/rules/use-consistent-array-type/

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug labels Jan 9, 2024
@Conaclos Conaclos self-assigned this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants