Skip to content

use bundled prettier if local prettier does not resolve#561

Closed
anisjonischkeit wants to merge 7 commits intoprettier:masterfrom
anisjonischkeit:master
Closed

use bundled prettier if local prettier does not resolve#561
anisjonischkeit wants to merge 7 commits intoprettier:masterfrom
anisjonischkeit:master

Conversation

@anisjonischkeit
Copy link
Copy Markdown

This PR is a fix for this issue: #522.

@CiGit
Copy link
Copy Markdown
Member

CiGit commented Aug 21, 2018

Thanks for your contribution.
I'm not convinced this is the right solution: silently using an other prettier version.

IMHO: If a user specifies a prettier version, they would expect their code be formatted by that given version.

@anisjonischkeit
Copy link
Copy Markdown
Author

I didn’t realise you could even specify what version of prettier you want to use. How do you set it?

@CiGit
Copy link
Copy Markdown
Member

CiGit commented Aug 21, 2018

package.json's (dev)dependencies

@anisjonischkeit
Copy link
Copy Markdown
Author

The problem we are having is that our node_modules folder is not in the default location. With the current version of prettier-vscode, it fails silently in this scenario. With the PR, it passes silently. What if we let it pass but display a message saying "Could not find locally installed prettier, maybe try running npm install. Defaulting to bundled prettier."

@xeoneux
Copy link
Copy Markdown

xeoneux commented Sep 17, 2018

Ah! There's already a PR for this! :)

@anisjonischkeit anisjonischkeit force-pushed the master branch 2 times, most recently from 1a8a20d to 144cae9 Compare November 9, 2018 00:40
DJMcNab and others added 6 commits November 9, 2018 10:45
* Use the schema for package.json "prettier" key

* Add changelog entry
* feat: update prettier to 1.15.1

* fix: add new prettier options

* fix: move prettier settings to correct place
Peer dep of prettier-tslint
@jgoux
Copy link
Copy Markdown

jgoux commented Mar 12, 2019

What can we do to move this PR forward?

I'm using yarn plug and play feature and there is no node_modules directory, so no local prettier resolved. 😢

CiGit pushed a commit that referenced this pull request Apr 25, 2019
@CiGit
Copy link
Copy Markdown
Member

CiGit commented Apr 25, 2019

Closing in favor of #811

@CiGit CiGit closed this Apr 25, 2019
CiGit pushed a commit that referenced this pull request Apr 25, 2019
* Support prettier 1.17

* Update in reaction to new VS code feature to prompt when multiple formatters are installed

* Support Prettier <1.8.0 for getSupportInfo (#707)

* feat: hide statusBarItem for disabled languages (#733)

* Resolve prettier to bundled if findPkg can't find it (#811)

Fixes #522
Slightly different implementation of #561

* Update .vscodeignore

Add .github folder

* Create bare-bones pull request template (#708)

* Create bare-bones pull request template

This template almost certainly needs fleshing out, but I figured a good place to start was making sure people run tests and making sure they update the Changelog.

* Create separate .github folder for issue/pr templates

* add support for quoteProps

* Support prettier 1.17

* Update in reaction to new VS code feature to prompt when multiple formatters are installed

* add support for quoteProps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants