-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Fix/consider option version #348
Merged
mitermayer
merged 18 commits into
prettier:master
from
victorsptt:fix/consider_option_version
Oct 10, 2023
Merged
Fix/consider option version #348
mitermayer
merged 18 commits into
prettier:master
from
victorsptt:fix/consider_option_version
Oct 10, 2023
Conversation
This file contains 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
Split the function that returns the visual selection range into two parts that return the start and the end of the range respectively, and use them in the CLI-command composer. This is part of a plan to use a general object with details about flags to compose the CLI command.
Added a new function to get the command part of the --stdin-filepath flag. This is part of a plan to compose the CLI command from an object with flag details.
Added a new function to return the CLI command part for the --loglevel flag. This is part of a plan to compose the CLI command from a general object with flag details.
Added a new function to return the CLI command part for the --stdin flag. This is part of a plan use an object with flag details to compose the CLI command.
Added general mapper functions that map flag names to parts of a CLI command. They are part a plan to use an object with flag details to compose the CLI command.
Adapted flag-mapper functions to use the same parameters. This is part of a plan to expose a common interface from planned objects with flags, to make code flexible to future changes, and to compose the CLI command from a general object with flag details.
Added a global variable for the bracketSameLine option. It is set to the user's defined value and uses the Prettier default as reserve. This is part of a plan to compose the CLI command from an object with details about the flags
Changed the function to make it reusable across versions of the CLI flag. This is part of a plan to compose the CLI command from an object with details about the flags.
Added an object with details about Prettier CLI flags. This is part of a plan to compose the flags of the CLI command from a general object with flag details.
Added two helper functions to get the version of the Prettier CLI as a string. This is part of a plan to compose the CLI command from an object with flag details.
Added 2 functions that compare versions strings according to semantic version. This is part of a plan to compose the flags of the CLI command from an object with flag details.
Added unit tests for version-comparison functions.
Added a function to filter flags that are uncompatible with a supplied version. This is part of a plan to compose the flags of the CLI command from an object with flag details.
Added a function that selects the flags that are compatible with the version of the Prettier CLI being used. This is part of a plan to compose the flags of the CLI command from an object with flag details.
Added Vim foldings to sections of the code in config.vim to improve file navigation.
Considered the addition and deprecation versions of each Prettier option contained in the object with details about the CLI flags when composing the CLI command.
Removed TODO comment that reminded to compose the flags of the CLI command from a list using list methods. The task is completed.
Wrote a comment describing the global variable that overwrites the "bracketSameLine" option.
Awesome! Thank you! Assuming it all works happy to merge and do a new release! |
mitermayer
approved these changes
Oct 10, 2023
This was referenced Oct 10, 2023
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.
Before submitting a pull request, please make sure the following is done...
master
.vim8
andneovim
./doc/prettier.txt
Please use the simple form below as a guideline for describing your pull request.
Thanks for contributing to vim-prettier
Summary
Test Plan
Tested the plugin in Vim 8.2, Vim 9.0, and Neovim 0.9. Wrote unit tests for some functions.