1
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:
2021-12-18 20:08:07 -05:00
parent 413a8b4bd1
commit 5ee595807d
5 changed files with 82 additions and 94 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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