Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable plugins autoload that are located in `@*/prettier-plugin-* #5945

Merged
merged 5 commits into from Mar 10, 2019

Conversation

Projects
None yet
4 participants
@Kocal
Copy link
Contributor

Kocal commented Mar 6, 2019

Due to #5944, I have in mind to create a Prettier plugin for prettify Twig files.

I used to publish my own packages under the scope @kocal on NPM, so my package name will be @kocal/prettier-plugin-twig.

Before doing this, I tweaked node_modules/prettier/bin-prettier.js on another project to see if my plugin will be able to be autoloaded. It wasn't the case because <scope>@/prettier-plugin-* is not allowed to be autoloaded.

This PR fixes this behavior.

Thanks! :)

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If not an internal change) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Kocal added some commits Mar 6, 2019

@duailibe duailibe requested a review from azz Mar 6, 2019

Show resolved Hide resolved docs/plugins.md Outdated
@azz

azz approved these changes Mar 10, 2019

@azz azz merged commit b383197 into prettier:master Mar 10, 2019

3 checks passed

codecov/patch Coverage not affected when comparing f526c47...90ca629
Details
codecov/project 94.42% remains the same compared to f526c47
Details
deploy/netlify Deploy preview ready!
Details
@azz

This comment has been minimized.

Copy link
Member

azz commented Mar 10, 2019

Thanks!

@Kocal Kocal deleted the Kocal:feat/load-plugins-from-other-scopes branch Mar 10, 2019

@lipis lipis added this to the 1.17 milestone Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.