Prettier 2 released, breaks XO
See original GitHub issueAfter 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:
- Created 3 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
What about projects (like mine) that use Prettier to format non JavaScript files (ex. YAML)?