-
Notifications
You must be signed in to change notification settings - Fork 264
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
Update to Prettier 3 #909
Open
remcohaszing
wants to merge
1
commit into
redhat-developer:main
Choose a base branch
from
remcohaszing:prettier-3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update to Prettier 3 #909
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
@@ -24,7 +24,7 @@ | |||
describe('Formatter', function () { | |||
describe('Test that formatter works with custom tags', function () { | |||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |||
function parseSetup(content: string, options: any = {}): TextEdit[] { | |||
function parseSetup(content: string, options: any = {}): Promise<TextEdit[]> { |
Check warning
Code scanning / ESLint
Disallow the `any` type Warning test
Unexpected any. Specify a different type.
@msivasubramaniaan This would be a nice enhancement to support Prettier v3, otherwise we are forced deliver 2 versions of Prettier within our app. |
remcohaszing
force-pushed
the
prettier-3
branch
2 times, most recently
from
April 26, 2024 11:03
e0de8a6
to
6dd6e31
Compare
- Prettier 3 is async, so related functions were made async. - Code was reformatted using Prettier. - Prettier now ships their own types, so `@types/prettier` was removed. - Prettier was moved to `dependencies`. `optionalDependencies` is for dependencies that have a `install` script that may fail. This isn’t the case for Prettier. - `eslint-config-prettier` was updated as well. - `eslint-plugin-prettier` was updated as well.
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.
What does this PR do?
This updates Prettier to version 3.
@types/prettier
was removed.dependencies
.optionalDependencies
is for dependencies that have ainstall
script that may fail. This isn’t the case for Prettier.eslint-plugin-prettier
was updated as well.Alternatively the formatting functionality could be removed. IMO people should just use Prettier themselves for formatting YAML instead of relying on this
yaml-language-server
.What issues does this PR fix or reference?
N/A
Is it tested? How?
npm test