Repository navigation
fix: update dprint-core to 0.75.2 and add code examples to the config schema - #14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates dprint-core to 0.75.2, which has fixes for the performance of the printer and no API changes.
Also improves the configuration documentation that dprint.dev renders from
schema.json, using keywords that validators and editors ignore:x-playgroundat the root: unformatted TypeScript that the dprint.dev playground starts with when this plugin is selected.x-exampleon 32 properties: input code that's formatted with each of the property's values. The repo'sschema.jsononly has the inputs. The outputs are generated with the built plugin when the schema is published. The options of the Prettier plugins setpluginsin the example'sconfig, and the ones for other languages set anextension(tsx,html,vue,md,svelte).x-sectionsat the root: the properties grouped into nine sections (General, Pragmas, JavaScript and TypeScript, JSX/HTML/Vue, Markdown, Svelte, Prettier plugins, oxfmt, Languages).There are no
x-overrides, since no option defaults to the value of another one.Other schema changes:
printWidthandtabWidthareintegerwith a minimum of 0 (and a maximum of 255 fortabWidth), which is what the plugin accepts.importOrderSortByLength,importOrderImportAttributesKeyword,organizeImportsTypeOrder, and thecommentLineStrategyandlineWrappingStyleofjsdoc, and the options ofsvelte.CI
The new "Generate config schema" step runs the
publish-schematask from dprint/automation on the built wasm plugin, before the schema is uploaded to a release. It adds the example outputs and each example's file extension, and fails when the plugin has a diagnostic for a property's default, an example formats the same with every value, a top level property isn't in exactly one section, or the playground's code doesn't format or is already formatted.To see the generated schema locally: