diff --git a/.prettierrc b/.prettierrc index 362e010..544138b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,3 @@ { - "singleQuote": true + "singleQuote": true } diff --git a/package.json b/package.json index 4b7512b..60b5238 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "sideEffects": false, "scripts": { "build": "tsup --dts", - "lint": "tsc" + "lint": "tsc", + "format": "prettier --write ./src" }, "repository": { "type": "git", diff --git a/src/createElement.ts b/src/createElement.ts index 5b5c6f9..1a79107 100644 --- a/src/createElement.ts +++ b/src/createElement.ts @@ -23,7 +23,7 @@ export default function createElement( tagName: K, options: CreateElementOptions = {}, - target = document + target = document, ): HTMLElementTagNameMap[K] { const element = target.createElement(tagName); Object.entries(options).forEach(([key, value]) => { @@ -40,7 +40,7 @@ export default function createElement( Object.entries(value as Record).forEach( ([dataKey, dataValue]) => { element.dataset[dataKey] = dataValue; - } + }, ); return; } diff --git a/src/qs.ts b/src/qs.ts index 8d2c216..c504639 100644 --- a/src/qs.ts +++ b/src/qs.ts @@ -11,7 +11,7 @@ */ export default function qs( selector: string, - parent: ParentNode = document + parent: ParentNode = document, ) { return parent.querySelector(selector); } diff --git a/src/qsa.ts b/src/qsa.ts index af58d7b..997c9cb 100644 --- a/src/qsa.ts +++ b/src/qsa.ts @@ -14,7 +14,7 @@ */ export default function qsa( selector: string, - parent: ParentNode = document + parent: ParentNode = document, ): NodeListOf { return parent.querySelectorAll(selector); }