diff --git a/.eslintrc.json b/.eslintrc.json index 61b4a4d..6652624 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,7 @@ { "extends": [ "eslint:recommended", - "plugin:compat/recommended", - "plugin:prettier/recommended" - ], - "plugins": [ - "prettier" + "plugin:compat/recommended" ], "env": { "browser": true, @@ -15,5 +11,8 @@ "ecmaVersion": 2015, "sourceType": "module" }, - "rules": {} + "rules": { + "quotes": ["error", "double"], + "semi": ["error", "always"] + } } diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 78e645a..0000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "printWidth": 120, - "tabWidth": 2, - "semi": true, - "singleQuote": false -} diff --git a/README.md b/README.md index 40ae823..8fdf5ea 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# 🌓 Dark mode switcheroo +# 🌓 Dark Mode Switcheroo™ [](https://github.com/jakejarvis/dark-mode.js/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@jakejarvis/dark-mode) -[](LICENSE) +[](LICENSE) -Very simple CSS dark/light mode toggler with saved preference via local storage & dynamic OS setting detection. Zero dependencies and only ~700 bytes gzipped! +Very simple CSS dark/light mode toggler with saved preference via local storage & dynamic OS setting detection. Zero dependencies and only ~600 bytes gzipped! - [View the example.](https://jakejarvis.github.io/dark-mode-example/) - [Read the blog post.](https://jarv.is/notes/dark-mode/) @@ -14,7 +14,7 @@ Very simple CSS dark/light mode toggler with saved preference via local storage ### Options -`darkMode([...options])` +`darkMode.init([...options])` - **toggle:** The clickable HTML element used to toggle between the two themes. (optional, default: `null`) - **classes:** An object containing the `
` class names for the light and dark themes. (optional, default: `{ light: "light", dark: "dark" }`) @@ -26,7 +26,7 @@ Very simple CSS dark/light mode toggler with saved preference via local storage ```html - + +