biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
15.55k stars 485 forks source link

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

Closed rimakan closed 13 hours ago

rimakan commented 13 hours ago

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

ematipico commented 13 hours ago

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.

rimakan commented 12 hours ago

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

ematipico commented 11 hours ago

We don't have ETAs