From 243804fb5db92d5a1c8bb3d566e24a8c06be0b64 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 16 Aug 2022 15:26:17 -0400 Subject: [PATCH 1/4] chore(deps): bump Prettier to 2.7 --- .prettierignore | 6 ------ package.json | 2 +- yarn.lock | 7 ++++++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.prettierignore b/.prettierignore index abc364840aa8..637f32f77bfc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -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 diff --git a/package.json b/package.json index 3cba3f391376..4e288b7b2cf2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 339a98d56d41..1f4b023ff35d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11992,11 +11992,16 @@ 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: +prettier@*: version "2.5.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +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" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" From 5005ea0773a45903c40e84831c67d1e3dc1cac87 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 16 Aug 2022 16:05:02 -0400 Subject: [PATCH 2/4] Fix the changes --- .../fixtures/instantiation-expressions/type-arguments1.ts | 6 +++--- tests/integration/fixtures/vue-sfc/Hello.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts index dc8e0419db77..243db1b4aa8e 100644 --- a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts +++ b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts @@ -1,9 +1,9 @@ class Foo { - value: T + value: T; } class Bar { - foo = Foo + foo = Foo; } -new Bar() +new Bar(); diff --git a/tests/integration/fixtures/vue-sfc/Hello.vue b/tests/integration/fixtures/vue-sfc/Hello.vue index 1ee0282919b5..7855ce535972 100644 --- a/tests/integration/fixtures/vue-sfc/Hello.vue +++ b/tests/integration/fixtures/vue-sfc/Hello.vue @@ -3,7 +3,7 @@
- Hello {{ (name as any) }}{{ exclamationMarks }} + Hello {{ name as any }}{{ exclamationMarks }}
From 82609925f335ac74b61ba7532c12a955d44f5728 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 16 Aug 2022 16:35:28 -0400 Subject: [PATCH 3/4] Fix yarn.lock and snapshot --- tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap | 2 +- yarn.lock | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap b/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap index c019630df43b..513c225c023d 100644 --- a/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap +++ b/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap @@ -21,7 +21,7 @@ Array [
- Hello {{ (name as any) }}{{ exclamationMarks }} + Hello {{ name as any }}{{ exclamationMarks }}
diff --git a/yarn.lock b/yarn.lock index 1f4b023ff35d..7187581b5616 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11992,12 +11992,7 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@*: - version "2.5.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" - integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== - -prettier@2.7.1: +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== From 76398a17db824e95561c82808227078605221d92 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Wed, 17 Aug 2022 22:30:41 +0930 Subject: [PATCH 4/4] fix lint --- package.json | 2 +- .../tests/rules/no-unsafe-assignment.test.ts | 2 +- .../tests/rules/prefer-readonly-parameter-types.test.ts | 6 +++--- yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4e288b7b2cf2..da9add07ee0b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts index 78ef7e78b38b..d28a2b4e5135 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts @@ -112,7 +112,7 @@ class Foo { 'const x = new Set();', '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 }];', diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts index eadd526ca094..3f9b40b1eeb4 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts @@ -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, @@ -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 ` @@ -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', diff --git a/yarn.lock b/yarn.lock index 727b27f1512e..2af309cfae8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy