Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 8f3b687

Browse files
authored
[eslint-plugin] fix prettier.json export (Azure#32445)
There's a regression from eslint-plugin's ESM migration. `./prettier.json` should be exported as-is to be used by other packages as their formatting configs in VS Code.
1 parent fb6da93 commit 8f3b687

File tree

2 files changed

+17
-34
lines changed

2 files changed

+17
-34
lines changed

common/tools/eslint-plugin-azure-sdk/package.json

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,7 @@
5353
"default": "./dist/commonjs/index.js"
5454
}
5555
},
56-
"./prettier.json": {
57-
"browser": {
58-
"types": "./dist/browser/prettier.json/index.d.ts",
59-
"default": "./dist/browser/prettier.json/index.js"
60-
},
61-
"react-native": {
62-
"types": "./dist/react-native/prettier.json/index.d.ts",
63-
"default": "./dist/react-native/prettier.json/index.js"
64-
},
65-
"import": {
66-
"types": "./dist/esm/prettier.json/index.d.ts",
67-
"default": "./dist/esm/prettier.json/index.js"
68-
},
69-
"require": {
70-
"types": "./dist/commonjs/prettier.json/index.d.ts",
71-
"default": "./dist/commonjs/prettier.json/index.js"
72-
}
73-
}
56+
"./prettier.json": "./prettier.json"
7457
},
7558
"files": [
7659
"dist/",
@@ -147,7 +130,7 @@
147130
"exports": {
148131
"./package.json": "./package.json",
149132
".": "./src/index.ts",
150-
"./prettier.json": "./src/prettier.json/index.ts"
133+
"./prettier.json": "./prettier.json"
151134
},
152135
"dialects": [
153136
"esm",

sdk/communication/communication-sms/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ for (const sendResult of sendResults) {
112112
To check if the recipients are in the Opt Out list, call the `check` function from the `SmsClient.optOuts` with a list of recipient phone numbers.
113113

114114
```typescript
115-
const optOutCheckResults = await client.optOuts.check(
116-
from: "<from-phone-number>", // Your E.164 formatted phone number used to send SMS
117-
to: ["<to-phone-number-1>", "<to-phone-number-2>"], E.164 formatted recipient phone numbers
118-
);
115+
const optOutCheckResults = await client.optOuts.check(
116+
"<from-phone-number>", // Your E.164 formatted phone number used to send SMS
117+
["<to-phone-number-1>", "<to-phone-number-2>"], // E.164 formatted recipient phone numbers
118+
);
119119

120120
for (const optOutCheckResult of optOutCheckResults) {
121-
if (optOutCheckResult.httpStatusCode == 200) {
121+
if (optOutCheckResult.httpStatusCode === 200) {
122122
console.log("Success: ", optOutCheckResult);
123123
} else {
124124
console.error("Something went wrong when trying to send opt out check request: ", optOutCheckResult);
@@ -130,13 +130,13 @@ To check if the recipients are in the Opt Out list, call the `check` function fr
130130
To add the list of recipients to Opt Out list, call the `add` function from the `SmsClient.pptOuts` with a list of recipient phone numbers.
131131

132132
```typescript
133-
const optOutAddResults = await client.optOuts.add(
134-
from: "<from-phone-number>", // Your E.164 formatted phone number used to send SMS
135-
to: ["<to-phone-number-1>", "<to-phone-number-2>"], // E.164 formatted recipient phone numbers
136-
);
133+
const optOutAddResults = await client.optOuts.add(
134+
"<from-phone-number>", // Your E.164 formatted phone number used to send SMS
135+
["<to-phone-number-1>", "<to-phone-number-2>"], // E.164 formatted recipient phone numbers
136+
);
137137

138138
for (const optOutAddResult of optOutAddResults) {
139-
if (optOutAddResult.httpStatusCode == 200) {
139+
if (optOutAddResult.httpStatusCode === 200) {
140140
console.log("Success: ", optOutAddResult);
141141
} else {
142142
console.error("Something went wrong when trying to send opt out add request: ", optOutAddResult);
@@ -148,13 +148,13 @@ const optOutAddResults = await client.optOuts.add(
148148
To remove the list of recipients to Opt Out list, call the `remove` function from the `SmsClient.optOuts.` with a list of recipient phone numbers.
149149

150150
```typescript
151-
const optOutRemoveResults = await client.optOuts.remove(
152-
from: "<from-phone-number>", // Your E.164 formatted phone number used to send SMS
153-
to: ["<to-phone-number-1>", "<to-phone-number-2>"], // E.164 formatted recipient phone numbers
154-
);
151+
const optOutRemoveResults = await client.optOuts.remove(
152+
"<from-phone-number>", // Your E.164 formatted phone number used to send SMS
153+
["<to-phone-number-1>", "<to-phone-number-2>"], // E.164 formatted recipient phone numbers
154+
);
155155

156156
for (const optOutRemoveResult of optOutRemoveResults) {
157-
if (optOutRemoveResult.httpStatusCode == 200) {
157+
if (optOutRemoveResult.httpStatusCode === 200) {
158158
console.log("Success: ", optOutRemoveResult);
159159
} else {
160160
console.error("Something went wrong when trying to send opt out remove request: ", optOutRemoveResult);

0 commit comments

Comments
 (0)