mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-29 19:05:58 -04:00
manually cherry-pick (most of) the rules/settings from eslint-config-preact
This commit is contained in:
@@ -10,4 +10,4 @@ try {
|
||||
// - the user's OS is in dark mode.
|
||||
const pref = getDarkPref();
|
||||
updateDOM(pref === "true" || (!pref && window.matchMedia("(prefers-color-scheme: dark)").matches));
|
||||
} catch (e) {}
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
@@ -25,7 +25,7 @@ const ThemeToggle = () => {
|
||||
|
||||
// cleanup and stop listening if/when preference is explicitly set
|
||||
return () => matcher.removeEventListener("change", matchCallback, true);
|
||||
} catch (e) {}
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
}, [saved, matchCallback]);
|
||||
|
||||
// sets appropriate `<html class="...">` and `color-scheme` CSS property when mode changes
|
||||
|
||||
Reference in New Issue
Block a user