From 9c6187d8284af9227ecc215ce7a771ba38820f5a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 26 Sep 2024 01:51:00 +0200 Subject: [PATCH] Switch to ts and ESM configs --- .prettierrc.json | 12 ------------ .prettierrc.mjs | 15 +++++++++++++++ babel.config.js | 3 --- babel.config.mjs | 3 +++ tailwind.config.js | 22 ---------------------- tailwind.config.ts | 22 ++++++++++++++++++++++ 6 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 .prettierrc.json create mode 100644 .prettierrc.mjs delete mode 100644 babel.config.js create mode 100644 babel.config.mjs delete mode 100644 tailwind.config.js create mode 100644 tailwind.config.ts diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index c24c22a..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "trailingComma": "es5", - "tabWidth": 2, - "useTabs": true, - "singleQuote": false, - "semi": true, - "bracketSameLine": false, - "bracketSpacing": true, - "jsxSingleQuote": false, - "quoteProps": "as-needed", - "endOfLine": "lf" -} diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 0000000..635cda2 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,15 @@ +// .prettierrc.mjs +/** @type {import("prettier").Config} */ +export default { + plugins: ["prettier-plugin-tailwindcss"], + trailingComma: "es5", + tabWidth: 2, + useTabs: true, + singleQuote: false, + semi: true, + bracketSameLine: false, + bracketSpacing: true, + jsxSingleQuote: false, + quoteProps: "as-needed", + endOfLine: "lf", +}; diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index f8c7bb9..0000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: [require.resolve("@docusaurus/core/lib/babel/preset")], -}; diff --git a/babel.config.mjs b/babel.config.mjs new file mode 100644 index 0000000..ea404a3 --- /dev/null +++ b/babel.config.mjs @@ -0,0 +1,3 @@ +export default { + presets: ["@docusaurus/core/lib/babel/preset"], +}; diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 2342407..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,22 +0,0 @@ -const { fontFamily } = require("tailwindcss/defaultTheme"); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - corePlugins: { - preflight: false, - container: false, - }, - darkMode: ["class", '[data-theme="dark"]'], - content: ["./src/**/*.{js,jsx,tsx,html}", "./docs/**/*.{md,mdx}"], - theme: { - extend: { - fontFamily: { - sans: ['"Inter"', ...fontFamily.sans], - jakarta: ['"Plus Jakarta Sans"', ...fontFamily.sans], - mono: ['"Fira Code"', ...fontFamily.mono], - }, - colors: {}, - }, - }, - plugins: [], -}; diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..9eb6157 --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,22 @@ +import type { Config } from "tailwindcss"; +import defaultTheme from "tailwindcss/defaultTheme"; + +export default { + corePlugins: { + preflight: false, + container: false, + }, + darkMode: ["class", '[data-theme="dark"]'], + content: ["./src/**/*.{js,jsx,tsx,html}", "./docs/**/*.{md,mdx}"], + theme: { + extend: { + fontFamily: { + sans: ["Inter", ...defaultTheme.fontFamily.sans], + jakarta: ["Plus Jakarta Sans", ...defaultTheme.fontFamily.sans], + mono: ["Fira Code", ...defaultTheme.fontFamily.mono], + }, + colors: {}, + }, + }, + plugins: [], +} satisfies Config;