mizdra / eslint-interactive

The CLI tool to fix huge number of ESLint errors
MIT License
363 stars 9 forks source link

TypeError: shouldUseFlatConfig is not a function #352

Closed drewgbarnes closed 6 months ago

drewgbarnes commented 6 months ago

Latest release throws this error on running the util.

TypeError: shouldUseFlatConfig is not a function
  at run (/[...]/node_modules/eslint-interactive/src/cli/run.ts:33:33)
  at file:///[...]/node_modules/eslint-interactive/bin/_eslint-interactive.js:4:1
   at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

I can use an old version in the meantime, but thought you might want to know.

As far as I can tell, I am on node version 20.x.x

mizdra commented 6 months ago

Thank you for reporting!

What the version of ESLint do you use? eslint-interactive supports ESLint v8.41.0+.

drewgbarnes commented 6 months ago

8.0, I am behind! That must explain it.

On Fri, Apr 5, 2024 at 1:26 AM mizdra @.***> wrote:

Thank you for reporting!

What the version of ESLint do you use? eslint-interactive supports ESLint v8.41.0+.

— Reply to this email directly, view it on GitHub https://github.com/mizdra/eslint-interactive/issues/352#issuecomment-2039235030, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQKGEZGV7LWMWQHTKHKI5DY3ZN23AVCNFSM6AAAAABFYBOZYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGIZTKMBTGA . You are receiving this because you authored the thread.Message ID: @.***>

--

Andrew Barnes | Software Engineer - SEO

he | him | his

@.***

https://nextdoor.com/

mizdra commented 6 months ago

Sorry, I said the wrong thing. eslint-interactive supports ESLint v8.45.0 and above.

Anyway, I think your problem will be solved by updating the version of ESLint. The shouldUseFlatConfig is an ESLint API and is not included in older versions of ESLint.

Please try updating it. :+1: