biome: πŸ› Unable to migrate ESLint configuration that extends @antfu/eslint-config

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.8.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:                 false

Workspace:
  Open Documents:               0

What happened?

  1. git clome https://github.com/Kamillaova/biome-eslint-migration-error-mre
  2. direnv allow # or skip
  3. pnpm i --frozen-lockfile
  4. biome migrate eslint --write # or node_modules/.bin/biome without direnv
./eslint.config.js:1:1 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– Incorrect type, expected an array, but received an object.

  > 1 β”‚ {"_operations":[null],"_operationsOverrides":[],"_operationsResolved":[],"_renames":{"@eslint-react":"react","@eslint-react/dom":"react-dom","@eslint-react/hooks-extra":"react-hooks-extra","@eslint-react/naming-convention":"react-naming-convention","@stylistic":"style","@typescript-eslint":"ts","import-x":"import","n":"node","vitest":"test","yml":"yaml"},"_pluginsConflictsError":{}}
      β”‚ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2 β”‚


migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– Migration has encountered an error: Could not deserialize the Eslint configuration file

Expected result

Successful migration

Code of Conduct

  • I agree to follow Biome’s Code of Conduct

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 5
  • Comments: 18 (11 by maintainers)

Most upvoted comments

for people running into this issue, I used eslint print-config to extract the resulting configs and passed it to biome migrate.

  βœ– Migration has encountered an error: `node` was invoked to resolve './eslint.config.js'. This invocation failed with the following error:
    [eval]:15
    } import('./eslint.config.js').then((c) => c.default).then((c) => console.log(JSON.stringify(uncycle(c))))
                                                                                       ^

    TypeError: Converting circular structure to JSON
        --> starting at object with constructor 'Object'
        |     property 'configs' -> object with constructor 'Object'
        |     property 'flat/base' -> object with constructor 'Array'
        |     ...
        |     property 'plugins' -> object with constructor 'Object'
        --- property 'jsonc' closes the circle
        at JSON.stringify (<anonymous>)
        at [eval]:15:84

    Node.js v22.8.0

😦