From 535374918cc30faec750c14c7effe795f960ebd3 Mon Sep 17 00:00:00 2001 From: yulimchen Date: Sun, 19 May 2024 21:47:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=94=B9=E4=B8=BA=20ESM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc.js | 9 +++++++++ .prettierrc.json | 14 -------------- commitlint.config.js | 2 +- postcss.config.js | 2 +- tailwind.config.js => tailwind.config.ts | 7 ++++--- 5 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 .prettierrc.js delete mode 100644 .prettierrc.json rename tailwind.config.js => tailwind.config.ts (57%) diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..5e00251 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,9 @@ +// @ts-check + +/** @type {import("prettier").Config} */ +export default { + bracketSpacing: true, + singleQuote: false, + arrowParens: "avoid", + trailingComma: "none" +}; diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index bca4819..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "bracketSpacing": true, - "singleQuote": false, - "arrowParens": "avoid", - "trailingComma": "none", - "overrides": [ - { - "files": "*.html", - "options": { - "parser": "html" - } - } - ] -} \ No newline at end of file diff --git a/commitlint.config.js b/commitlint.config.js index 71bc373..870b95b 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { ignores: [commit => commit.includes("init")], extends: ["@commitlint/config-conventional"], rules: { diff --git a/postcss.config.js b/postcss.config.js index 9ba5e24..8c96bb1 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { plugins: { tailwindcss: {}, // 使用 cnjm-postcss-px-to-viewport 规避 postcss.plugin was deprecated 警告 diff --git a/tailwind.config.js b/tailwind.config.ts similarity index 57% rename from tailwind.config.js rename to tailwind.config.ts index ab03656..143b67f 100644 --- a/tailwind.config.js +++ b/tailwind.config.ts @@ -1,8 +1,9 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { +import type { Config } from "tailwindcss"; + +export default { content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], theme: { extend: {} }, plugins: [] -}; +} satisfies Config;