Skip to content

Commit 81378c8

Browse files
committed
Fix some more ESLint errors and cleanup
1 parent 4b00e4f commit 81378c8

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ const build = function(statics) {
203203

204204
const CACHE = new Map();
205205

206-
function html(statics) {
206+
function html(statics, ...values) {
207207
let tmp = CACHE;
208208

209209
tmp = evaluate(
210210
createElement,
211211
tmp.get(statics) || (tmp.set(statics, (tmp = build(statics))), tmp),
212-
arguments,
212+
[statics, ...values],
213213
[],
214214
);
215215

html/html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { createElement } from "../src/core.js";
33

44
const CACHE = new Map();
55

6-
export function html(statics) {
6+
export function html(statics, ...values) {
77
let tmp = CACHE;
88

99
tmp = evaluate(
1010
createElement,
1111
tmp.get(statics) || (tmp.set(statics, (tmp = build(statics))), tmp),
12-
arguments,
12+
[statics, ...values],
1313
[],
1414
);
1515

src/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const SHEETS = {};
1111
/**
1212
* Create a Style from a string
1313
* @param {TemplateStringsArray} template
14-
* @param {...any} args
14+
* @param {...any} args
1515
*/
1616
export function css(template, ...args) {
1717
const cssText = (template.raw || template).reduce(

src/hooks/tests/use-promise.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ describe("usePromise", () => {
7272

7373
const load = () => {
7474
useAbortController();
75+
// eslint-disable-next-line prefer-promise-reject-errors
7576
const promise = usePromise(() => Promise.reject(10), []);
7677
switch (cycle++) {
7778
case 0:

src/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export function renderChildren(children, fragment, parent, id, hydrate, isSvg) {
299299

300300
children &&
301301
flat(children, (child) => {
302-
if (typeof child == "object" && child.$$ != $$) {
302+
if (isObject(child) && child.$$ != $$) {
303303
return;
304304
}
305305

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const COMPATIBILITY_LIST = [
1212

1313
/**
1414
* serialize a string
15-
* @param {...any} args
15+
* @param {...any} args
1616
* @returns {string}
1717
*/
1818
export const serialize = (...args) => args.filter((value) => value).join(" ");

0 commit comments

Comments
 (0)