Skip to content

Commit

Permalink
style: reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Sep 22, 2023
1 parent c2dc31b commit f77abf8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
"singleQuote": true
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"sideEffects": false,
"scripts": {
"build": "tsup --dts",
"lint": "tsc"
"lint": "tsc",
"format": "prettier --write ./src"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/createElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
export default function createElement<K extends keyof HTMLElementTagNameMap>(
tagName: K,
options: CreateElementOptions = {},
target = document
target = document,
): HTMLElementTagNameMap[K] {
const element = target.createElement(tagName);
Object.entries(options).forEach(([key, value]) => {
Expand All @@ -40,7 +40,7 @@ export default function createElement<K extends keyof HTMLElementTagNameMap>(
Object.entries(value as Record<string, string>).forEach(
([dataKey, dataValue]) => {
element.dataset[dataKey] = dataValue;
}
},
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/qs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
export default function qs<E extends Element>(
selector: string,
parent: ParentNode = document
parent: ParentNode = document,
) {
return parent.querySelector<E>(selector);
}
2 changes: 1 addition & 1 deletion src/qsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
export default function qsa<E extends Element>(
selector: string,
parent: ParentNode = document
parent: ParentNode = document,
): NodeListOf<E> {
return parent.querySelectorAll<E>(selector);
}

0 comments on commit f77abf8

Please sign in to comment.