From 7a2c05ff3839b7c622ea1b8f4fdc2891846f9bd0 Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Thu, 23 Sep 2021 14:06:16 -0400 Subject: [PATCH 1/5] Add tsdoc-metadata.json to .prettierignore for @azure/core-rest-pipeline failure, see #14681 --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 55583adb4d3a..93c1296dcdfe 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,4 @@ **/*.yaml **/*.d.ts .env +tsdoc-metadata.json From 82d2004fa0ebe1edb0b0cfdb8a57c89413ef0ebc Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Thu, 23 Sep 2021 14:11:08 -0400 Subject: [PATCH 2/5] Fix paths to .prettierrc.json and .prettierignore in @azure-tools/perf-container-registery package.json --- .../perf-tests/container-registry/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/containerregistry/perf-tests/container-registry/package.json b/sdk/containerregistry/perf-tests/container-registry/package.json index b95a67f58274..e47ff5e90396 100644 --- a/sdk/containerregistry/perf-tests/container-registry/package.json +++ b/sdk/containerregistry/perf-tests/container-registry/package.json @@ -27,9 +27,9 @@ "build": "tsc -p .", "build:samples": "echo skipped", "build:test": "echo skipped", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "check-format": "prettier --list-different --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "format": "prettier --write --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", "integration-test": "echo skipped", From 18e5d7925e72390a8865436e841932cdb113dc8d Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Thu, 23 Sep 2021 14:16:08 -0400 Subject: [PATCH 3/5] Run prettier with prettierrc.json config on sdk/test-utils/testing-recorder-new/rollup.base.config.js --- sdk/test-utils/testing-recorder-new/rollup.base.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/test-utils/testing-recorder-new/rollup.base.config.js b/sdk/test-utils/testing-recorder-new/rollup.base.config.js index 6a274be35d48..53e2408d9480 100644 --- a/sdk/test-utils/testing-recorder-new/rollup.base.config.js +++ b/sdk/test-utils/testing-recorder-new/rollup.base.config.js @@ -100,9 +100,7 @@ export function browserConfig(test = false) { }; if (test) { - baseConfig.input = [ - "dist-esm/test/*.spec.js" - ]; + baseConfig.input = ["dist-esm/test/*.spec.js"]; baseConfig.plugins.unshift(multiEntry({ exports: false })); baseConfig.output.file = "dist-test/index.browser.js"; From 1321d21dbfa145e5fe0878518b535016fd27dbdb Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Thu, 23 Sep 2021 14:28:14 -0400 Subject: [PATCH 4/5] Use global prettier config and ignore for identity/identity/test/manual --- .../identity/test/manual/package.json | 3 ++- .../identity/test/manual/src/index.tsx | 20 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/sdk/identity/identity/test/manual/package.json b/sdk/identity/identity/test/manual/package.json index 62b09f118173..a4dadc844321 100644 --- a/sdk/identity/identity/test/manual/package.json +++ b/sdk/identity/identity/test/manual/package.json @@ -6,7 +6,8 @@ "scripts": { "build": "webpack --config webpack.config.js", "start": "webpack-dev-server", - "format": "prettier --write \"src/**/*.tsx\"" + "check-format": "prettier --list-different --config ../../../../../.prettierrc.json --ignore-path ../../../../../.prettierignore \"src/**/*.tsx\"", + "format": "prettier --write --config ../../../../../.prettierrc.json --ignore-path ../../../../../.prettierignore \"src/**/*.tsx\"" }, "author": "Microsoft Corporation", "license": "MIT", diff --git a/sdk/identity/identity/test/manual/src/index.tsx b/sdk/identity/identity/test/manual/src/index.tsx index 6839b05eec64..5d920882e974 100644 --- a/sdk/identity/identity/test/manual/src/index.tsx +++ b/sdk/identity/identity/test/manual/src/index.tsx @@ -4,10 +4,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import { - InteractiveBrowserCredential, - BrowserLoginStyle -} from "@azure/identity"; +import { InteractiveBrowserCredential, BrowserLoginStyle } from "@azure/identity"; import { ServiceBusClient } from "@azure/service-bus"; interface ClientDetails { @@ -82,7 +79,7 @@ function getCredential( cachedCredential = new InteractiveBrowserCredential({ tenantId, clientId, - loginStyle + loginStyle, }); lastLoginStyle = clientDetails.loginStyle; return cachedCredential; @@ -95,13 +92,12 @@ function ClientDetailsEditor({ clientDetails, onSetClientDetails }: ClientDetail onSetClientDetails(newDetails); }; - const setDetail = (name: keyof ClientDetails, changeValue?: (v: string) => any) => ( - value: string - ) => - handleDetailsChange({ - ...clientDetails, - [name]: changeValue ? changeValue(value) : value, - }); + const setDetail = + (name: keyof ClientDetails, changeValue?: (v: string) => any) => (value: string) => + handleDetailsChange({ + ...clientDetails, + [name]: changeValue ? changeValue(value) : value, + }); return (
From 9ddcc1deba3a837a44b886565a6c759bb0722d2b Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Thu, 23 Sep 2021 14:31:27 -0400 Subject: [PATCH 5/5] Use global prettier config and ignore in common/tools/eslint-plugin-azure-sdk --- common/tools/eslint-plugin-azure-sdk/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/tools/eslint-plugin-azure-sdk/package.json b/common/tools/eslint-plugin-azure-sdk/package.json index 134a7a6d74cf..a6de82d5bb74 100644 --- a/common/tools/eslint-plugin-azure-sdk/package.json +++ b/common/tools/eslint-plugin-azure-sdk/package.json @@ -40,8 +40,8 @@ "build:samples": "echo Skipped.", "build:test": "npm run clean && tsc -p tsconfig.json", "clean": "rimraf dist/", - "format": "prettier --write \"./**/*.{ts,json,md}\"", - "check-format": "prettier --check \"./**/*.{ts,json,md}\"", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"./**/*.{ts,json,md}\"", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"./**/*.{ts,json,md}\"", "lint": "eslint src tests --ext .ts", "pack": "npm pack 2>&1", "prebuild": "npm run clean",