Skip to content

Commit

Permalink
Bump prettier from 2.8.8 to 3.0.0 (#394)
Browse files Browse the repository at this point in the history
* Bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply Prettier

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
  • Loading branch information
dependabot[bot] and balloob committed Jul 11, 2023
1 parent fa1a4c5 commit ba62801
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@rollup/plugin-typescript": "^11.1.1",
"@rollup/plugin-terser": "^0.4.3",
"@types/w3c-web-serial": "^1.0.3",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"rollup": "^3.24.0",
"serve": "^14.2.0",
"typescript": "^5.1.3"
Expand Down
2 changes: 1 addition & 1 deletion src/components/ewt-console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class EwtConsole extends HTMLElement {
write: (chunk) => {
this._console!.addLine(chunk.replace("\r", ""));
},
})
}),
);
if (!abortSignal.aborted) {
this._console!.addLine("");
Expand Down
4 changes: 2 additions & 2 deletions src/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const connect = async (button: InstallButton) => {
} catch (err: any) {
if ((err as DOMException).name === "NotFoundError") {
import("./no-port-picked/index").then((mod) =>
mod.openNoPortPickedDialog(() => connect(button))
mod.openNoPortPickedDialog(() => connect(button)),
);
return;
}
Expand Down Expand Up @@ -36,7 +36,7 @@ export const connect = async (button: InstallButton) => {
() => {
port!.close();
},
{ once: true }
{ once: true },
);
document.body.appendChild(el);
};
6 changes: 3 additions & 3 deletions src/flash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const flash = async (
port: SerialPort,
manifestPath: string,
manifest: Manifest,
eraseFirst: boolean
eraseFirst: boolean,
) => {
let build: Build | undefined;
let chipFamily: Build["chipFamily"];
Expand Down Expand Up @@ -116,7 +116,7 @@ export const flash = async (
const resp = await fetch(url);
if (!resp.ok) {
throw new Error(
`Downlading firmware ${part.path} failed: ${resp.status}`
`Downlading firmware ${part.path} failed: ${resp.status}`,
);
}

Expand Down Expand Up @@ -198,7 +198,7 @@ export const flash = async (
(written / total) * fileArray[fileIndex].data.length;

const newPct = Math.floor(
((totalWritten + uncompressedWritten) / totalSize) * 100
((totalWritten + uncompressedWritten) / totalSize) * 100,
);

// we're done with this file
Expand Down
22 changes: 11 additions & 11 deletions src/install-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { dialogStyles } from "./styles";
import { version } from "./version";

console.log(
`ESP Web Tools ${version} by Nabu Casa; https://esphome.github.io/esp-web-tools/`
`ESP Web Tools ${version} by Nabu Casa; https://esphome.github.io/esp-web-tools/`,
);

const ERROR_ICON = "⚠️";
Expand All @@ -50,7 +50,7 @@ export class EwtInstallDialog extends LitElement {
public overrides?: {
checkSameFirmware?: (
manifest: Manifest,
deviceImprov: ImprovSerial["info"]
deviceImprov: ImprovSerial["info"],
) => boolean;
};

Expand Down Expand Up @@ -340,7 +340,7 @@ export class EwtInstallDialog extends LitElement {
this._renderProgress(
this._ssids === undefined
? "Scanning for networks"
: "Trying to connect"
: "Trying to connect",
),
true,
];
Expand Down Expand Up @@ -439,7 +439,7 @@ export class EwtInstallDialog extends LitElement {
error = `Unknown error (${this._client!.error})`;
}
const selectedSsid = this._ssids?.find(
(info) => info.name === this._selectedSsid
(info) => info.name === this._selectedSsid,
);
content = html`
<div>
Expand Down Expand Up @@ -470,7 +470,7 @@ export class EwtInstallDialog extends LitElement {
>
${info.name}
</ewt-list-item>
`
`,
)}
<ewt-list-item .selected=${!selectedSsid} value="-1">
Join other…
Expand Down Expand Up @@ -633,7 +633,7 @@ export class EwtInstallDialog extends LitElement {
: "2 minutes"}.<br />
Keep this page visible to prevent slow down
`,
percentage
percentage,
);
hideActions = true;
} else if (this._installState.state === FlashStateType.FINISHED) {
Expand Down Expand Up @@ -695,7 +695,7 @@ export class EwtInstallDialog extends LitElement {
@click=${() => {
textDownload(
this.shadowRoot!.querySelector("ewt-console")!.logs(),
`esp-web-tools-logs.txt`
`esp-web-tools-logs.txt`,
);
this.shadowRoot!.querySelector("ewt-console")!.reset();
Expand Down Expand Up @@ -805,7 +805,7 @@ export class EwtInstallDialog extends LitElement {

private _focusFormElement(selector = "ewt-textfield, ewt-select") {
const formEl = this.shadowRoot!.querySelector(
selector
selector,
) as LitElement | null;
if (formEl) {
formEl.updateComplete.then(() => setTimeout(() => formEl.focus(), 100));
Expand Down Expand Up @@ -898,7 +898,7 @@ export class EwtInstallDialog extends LitElement {
this.port,
this.manifestPath,
this._manifest,
this._installErase
this._installErase,
);
// YOLO2
}
Expand All @@ -911,14 +911,14 @@ export class EwtInstallDialog extends LitElement {
this._selectedSsid === null
? (
this.shadowRoot!.querySelector(
"ewt-textfield[name=ssid]"
"ewt-textfield[name=ssid]",
) as EwtTextfield
).value
: this._selectedSsid;
const password =
(
this.shadowRoot!.querySelector(
"ewt-textfield[name=password]"
"ewt-textfield[name=password]",
) as EwtTextfield | null
)?.value || "";
try {
Expand Down
2 changes: 1 addition & 1 deletion src/no-port-picked/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./no-port-picked-dialog";

export const openNoPortPickedDialog = async (
doTryAgain?: () => void
doTryAgain?: () => void,
): Promise<boolean> => {
const dialog = document.createElement("ewt-no-port-picked-dialog");
dialog.doTryAgain = doTryAgain;
Expand Down
2 changes: 1 addition & 1 deletion src/util/fire-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const fireEvent = <Event extends keyof HTMLElementEventMap>(
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
}
},
): void => {
options = options || {};
const event = new CustomEvent(type, {
Expand Down
2 changes: 1 addition & 1 deletion src/util/line-break-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export class LineBreakTransformer implements Transformer<string, string> {

transform(
chunk: string,
controller: TransformStreamDefaultController<string>
controller: TransformStreamDefaultController<string>,
) {
// Append new chunks to existing chunks.
this.chunks += chunk;
Expand Down
2 changes: 1 addition & 1 deletion src/util/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const downloadManifest = async (manifestPath: string) => {

if ("new_install_skip_erase" in manifest) {
console.warn(
'Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.'
'Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.',
);
if (manifest.new_install_skip_erase) {
manifest.new_install_prompt_erase = true;
Expand Down

0 comments on commit ba62801

Please sign in to comment.