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.

Prettier 2 released, breaks XO

See original GitHub issue

After upgrading Prettier to v2.0.1 XO started crashing:

$ xo --fix
Error: Failed to load plugin 'prettier' declared in 'CLIOptions': Cannot find module 'eslint-plugin-prettier'
Require stack:
- /project/__placeholder__.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.resolve (internal/modules/cjs/helpers.js:83:19)
    at Object.resolve (/project/node_modules/eslint/lib/shared/relative-module-resolver.js:44:50)
    at ConfigArrayFactory._loadPlugin (/project/node_modules/eslint/lib/cli-engine/config-array-factory.js:959:39)
    at /project/node_modules/eslint/lib/cli-engine/config-array-factory.js:848:33
    at Array.reduce (<anonymous>)
    at ConfigArrayFactory._loadPlugins (/project/node_modules/eslint/lib/cli-engine/config-array-factory.js:844:22)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/project/node_modules/eslint/lib/cli-engine/config-array-factory.js:667:32)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/project/node_modules/eslint/lib/cli-engine/config-array-factory.js:596:20)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pvdlgcommented, Apr 7, 2020

I intend to work on the migration but not sure how much work there is and when I’ll have time. Might take a week or so.

1reaction
jonahsnidercommented, Mar 25, 2020

What about projects (like mine) that use Prettier to format non JavaScript files (ex. YAML)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier v2.0.5 breaks linting #466 - xojs/xo - GitHub
This is almost certainly the same root cause as why having a different Prettier version breaks. However XO is importing or using other ......
Read more >
Options - Prettier
Developers often use whitespace to break up long lines for readability. ... in TypeScript (supported since TypeScript 2.7 released in January 2018).
Read more >
Prettier 2.0 “2020”
Previously, any method call chain of length three or longer would be automatically broken into multiple lines. The new heuristic is based on ......
Read more >
Rationale - Prettier
Incompatibilities may be introduced in any release and should not be viewed as breaking changes. What Prettier is not concerned about. Prettier only...
Read more >
Prettier 2.6: new singleAttributePerLine option and new ...
This release includes a new `singleAttributePerLine` option. This is an option to print only one attribute per line in Vue SFC templates, ...
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