question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error after updating eslint to 8.1.0

See original GitHub issue

Hey,

once I update eslint from 7.32.0 to 8.1.0. I see an error on my command line when I run prettier-eslint:

Scripts:

"prettier:watch": "onchange \"**/*.+(js|jsx|json|scss|css)\" -- prettier-eslint --write $PWD/{{changed}}",
"prettier:format": "prettier-eslint --write \"src/**/*.+(js|jsx|json|scss|css)\"",

My config:

  • prettier-eslint-cli version: 5.0.1
  • prettier version: 2.4.1
  • eslint version: 8.1.0

prettier-eslint shows error:

prettier-eslint [ERROR]: There was trouble creating the ESLint CLIEngine.
prettier-eslint-cli [ERROR]: There was an error formatting "/Users/me/workspace/company/app/frontend/package.json":
TypeError: CLIEngine is not a constructor
at getESLintCLIEngine (/Users/me/workspace/company/app/frontend/node_modules/prettier-eslint/dist/utils.js:403:12)
at getESLintConfig (/Users/me/workspace/company/app/frontend/node_modules/prettier-eslint/dist/index.js:210:51)
at format (/Users/me/workspace/company/app/frontend/node_modules/prettier-eslint/dist/index.js:75:71)
at MapSubscriber.project (/Users/me/workspace/company/app/frontend/node_modules/prettier-eslint-cli/dist/format-files.js:268:54)
at MapSubscriber._next (/Users/me/workspace/company/app/frontend/node_modules/rxjs/internal/operators/map.js:49:35)
at MapSubscriber.Subscriber.next (/Users/me/workspace/company/app/frontend/node_modules/rxjs/internal/Subscriber.js:66:18)
at AsyncSubject.Subject.next (/Users/me/workspace/company/app/frontend/node_modules/rxjs/internal/Subject.js:60:25)
at AsyncSubject.complete (/Users/me/workspace/company/app/frontend/node_modules/rxjs/internal/AsyncSubject.js:53:35)
at handler (/Users/me/workspace/company/app/frontend/node_modules/rxjs/internal/observable/bindNodeCallback.js:53:33)
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:69:3)
failure formatting 1 file with prettier-eslint


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:19
  • Comments:8

github_iconTop GitHub Comments

1reaction
georgecrawfordcommented, Apr 26, 2022

Since https://github.com/prettier/prettier-eslint/pull/696 is merged and prettier-eslint supports ESLint v8, what are the chances of this project upgrading eslint and prettier-eslint?

1reaction
YuliyaNovikcommented, Feb 25, 2022

any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

8.0.0 Failed to load plugin '@typescript-eslint' - Stack Overflow
I saw this error trying to use version 4.x.x of the @typescript-eslint packages:
Read more >
ESLint v8.0.0 released - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
eslint | Yarn - Package Manager
ESLint is a tool for identifying and reporting on patterns found in ... f2c4737 chore: upgrade @eslint/eslintrc@1.4.0 (#16675) (Milos Djermanovic) ...
Read more >
ESLint | IntelliJ IDEA Documentation - JetBrains
In .eslintrc or under eslintConfig in package.json, locate the rule you want to edit and set its ID to 1 warn or to...
Read more >
ESLint - npm
Stylistic Rule Updates. Stylistic rules are frozen according to our policy on how we evaluate new rules and rule changes. This means: Bug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found