-
Notifications
You must be signed in to change notification settings - Fork 266
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
Update to Prettier 3 #909
Conversation
@@ -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
@msivasubramaniaan This would be a nice enhancement to support Prettier v3, otherwise we are forced deliver 2 versions of Prettier within our app. |
e0de8a6
to
6dd6e31
Compare
c8ac1c6
to
678e80a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing lots of lint changes. Kindly rebase and raise PR only with affected files
8e3a1c4
to
9b48180
Compare
Done, but now CI fails. It’s hard to tell intent, because both ESLint are Prettier are not configured correctly for this repo. |
- 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.
9b48180
to
0db58e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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