suppress-eslint-errors
suppress-eslint-errors copied to clipboard
Support ESLint 8
When I try to run suppress-eslint-errors
, I get this error:
ERR src/app/graphQlClient/index.ts Transformation error (CLIEngine is not a constructor) TypeError: CLIEngine is not a constructor at codeMod (/home/gabrielx/projects/oss/oss_ms_teams/node_modules/suppress-eslint-errors/transforms/suppress-eslint-errors.js:12:23)
My project uses ESLint and I see that CLIEngine
has been removed in ESLint 8: https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#the-cliengine-class-has-been-removed
As a workaround, I was able to temporarily just revert from eslint": "^8.8.0
, to eslint": "^7.32.0
. Then I could run suppress-eslint-errors
, and immediately switch back to the latest eslint.
FYI: I recently developed a tool inspired by suppress-eslint-errors
called eslint-interactive
. This tool covers the functionality of suppress-eslint-errors
and supports ESLint v8. Maybe this will help you.
This also caught me up, but was able to use the recommended 7.32.0. @mizdra I would love to try yours out sometime as well. I like the interactive idea a lot!
Fixed in 3.0.1