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

refactor(prettier): simplify plugin options #84

Merged
merged 4 commits into from Mar 13, 2024
Merged

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Mar 12, 2024

  • Renamed languages option to documentSelector.
  • The following options have been removed and are now handled through a getFormattingOptions option:
    • ignoreIdeOptions
    • useIdeOptionsFallback
    • additionalOptions
    • resolveConfigOptions
  • Removed prettier and getPrettier options. Now, the prettier instance or getter must be passed as the first parameter. The plugin no longer attempts to require('prettier') on its own.
  • Removed allowImportError option. If the getter returns undefined, the plugin simply does nothing. The getter is responsible for reporting errors.
  • Added a isFormattingEnabled option to handle fileInfo.ignored confition.

@johnsoncodehk johnsoncodehk changed the title refactor(prettier): simplify options refactor(prettier): simplify plugin options Mar 13, 2024
Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! Tried the Astro PR as well and it worked.

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.

None yet

2 participants