Skip to content

chore: bump Prettier to 2.7 #5491

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

Merged
merged 7 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ packages/eslint-plugin/src/configs/*.json
CONTRIBUTORS.md
packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts

# Syntax not yet supported
packages/scope-manager/tests/fixtures/type-declaration/type-query-with-parameters.ts
packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts
packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts
packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts

# Ignore CHANGELOG.md files to avoid issues with automated release job
CHANGELOG.md

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"make-dir": "^3.1.0",
"markdownlint-cli": "^0.31.1",
"ncp": "^2.0.0",
"prettier": "2.5.1",
"prettier": "2.7.1",
"pretty-format": "^28.1.0",
"rimraf": "^3.0.2",
"tmp": "^0.2.1",
Expand All @@ -104,7 +104,7 @@
"typescript": ">=3.3.1 <4.8.0"
},
"resolutions": {
"typescript": "4.7.2",
"typescript": "4.7.4",
"@types/node": "^17.0.31",
"pretty-format": "^28.1.0",
"//": "Pin jest to v28 across the repo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Foo {
'const x = new Set<any>();',
'const x = { y: 1 };',
'const x = { y = 1 };',
'const x = { y(); };',
noFormat`const x = { y(); };`,
'const x: { y: number } = { y: 1 };',
'const x = [...[1, 2, 3]];',
'const [{ [`x${1}`]: x }] = [{ [`x`]: 1 }] as [{ [`x`]: any }];',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TSESLint } from '@typescript-eslint/utils';
import { RuleTester, getFixturesRootDir } from '../RuleTester';
import { RuleTester, getFixturesRootDir, noFormat } from '../RuleTester';
import rule from '../../src/rules/prefer-readonly-parameter-types';
import {
InferMessageIdsTypeFromRule,
Expand Down Expand Up @@ -288,7 +288,7 @@ ruleTester.run('prefer-readonly-parameter-types', rule, {
new (arg: readonly string[]): void;
}
`, // TSConstructSignatureDeclaration
'const x = { foo(arg: readonly string[]): void; };', // TSEmptyBodyFunctionExpression
noFormat`const x = { foo(arg: readonly string[]): void; };`, // TSEmptyBodyFunctionExpression
'function foo(arg: readonly string[]);', // TSDeclareFunction
'type Foo = (arg: readonly string[]) => void;', // TSFunctionType
`
Expand Down Expand Up @@ -627,7 +627,7 @@ ruleTester.run('prefer-readonly-parameter-types', rule, {
},
{
// TSEmptyBodyFunctionExpression
code: 'const x = { foo(arg: string[]): void; };',
code: noFormat`const x = { foo(arg: string[]): void; };`,
errors: [
{
messageId: 'shouldBeReadonly',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Foo<T> {
value: T
value: T;
}

class Bar<T> {
foo = Foo<T>
foo = Foo<T>;
}

new Bar()
new Bar();
2 changes: 1 addition & 1 deletion tests/integration/fixtures/vue-sfc/Hello.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div>
<div>
<!-- !!!!! expected error !!!!! -->
Hello {{ (name as any) }}{{ exclamationMarks }}
Hello {{ name as any }}{{ exclamationMarks }}
</div>
<button @click="decrement">-</button>
<button @click="increment">+</button>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Array [
<div>
<div>
<!-- !!!!! expected error !!!!! -->
Hello {{ (name as any) }}{{ exclamationMarks }}
Hello {{ name as any }}{{ exclamationMarks }}
</div>
<button @click=\\"decrement\\">-</button>
<button @click=\\"increment\\">+</button>
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11992,10 +11992,10 @@ prepend-http@^2.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=

prettier@*, prettier@2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a"
integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==
prettier@*, prettier@2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==

pretty-bytes@^5.6.0:
version "5.6.0"
Expand Down Expand Up @@ -14066,10 +14066,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@*, typescript@4.7.2, "typescript@>=3.3.1 <4.8.0", typescript@^4.5.3, typescript@^4.5.5, typescript@~4.7.4:
version "4.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4"
integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==
typescript@*, typescript@4.7.4, "typescript@>=3.3.1 <4.8.0", typescript@^4.5.3, typescript@^4.5.5, typescript@~4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

ua-parser-js@^0.7.30:
version "0.7.31"
Expand Down