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

🐛 Getting Incorrect type, expected a string, but received an object when trying to use the rule called noRestrictedErrors #4638

Closed
1 task done
rimakan opened this issue Nov 25, 2024 · 3 comments
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@rimakan
Copy link

rimakan commented Nov 25, 2024

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.13.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.5.0"

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

Workspace:
  Open Documents:               0

What happened?

  1. Prepare a config by using yarn biome init
  2. Include the following snippet to the newly created config
"nursery": {
    "noRestrictedImports": {
      "level": "error",
      "options": {
        "paths": {
          "react-redux": {}
        }
      }
    }
  }
  1. Pay attention to the errors with the config highlighted by json-schema validator

Actual result: there's an error saying that the key expects a string but not an object

image

Expected result

There are no errors related to data types. It is possible to use objects

P.S. The docs show the very example. It does not work though.

image

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@rimakan rimakan added the S-Needs triage Status: this issue needs to be triaged label Nov 25, 2024
@ematipico
Copy link
Member

The docs aren't a reflection of the current version, unfortunately. The new features were added recently in main and they will be released in the next nightly or stable version.

@ematipico ematipico closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@rimakan
Copy link
Author

rimakan commented Nov 25, 2024

@ematipico , thanks! When do you plan to deploy the new release?

@ematipico
Copy link
Member

We don't have ETAs

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

No branches or pull requests

2 participants