From bac762f981eed314a4f66ae336b5d414066494cd Mon Sep 17 00:00:00 2001 From: satnaing Date: Tue, 25 Feb 2025 20:01:12 +0700 Subject: [PATCH] build: upgrade prettier and prettier config file --- .prettierignore | 1 + .prettierrc | 20 -------------------- .prettierrc.mjs | 22 ++++++++++++++++++++++ package.json | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 .prettierrc create mode 100644 .prettierrc.mjs diff --git a/.prettierignore b/.prettierignore index f390211..d223e72 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,6 +7,7 @@ !/.github !tsconfig.json !astro.config.ts +!.prettierrc.mjs !package.json !.prettierrc !eslint.config.js diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 5d921d9..0000000 --- a/.prettierrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "arrowParens": "avoid", - "semi": true, - "tabWidth": 2, - "printWidth": 80, - "singleQuote": false, - "jsxSingleQuote": false, - "trailingComma": "es5", - "bracketSpacing": true, - "endOfLine": "lf", - "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], - "overrides": [ - { - "files": "*.astro", - "options": { - "parser": "astro" - } - } - ] -} diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 0000000..5f2d7bd --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,22 @@ +/** @type {import("prettier").Config} */ +export default { + arrowParens: "avoid", + semi: true, + tabWidth: 2, + printWidth: 80, + singleQuote: false, + jsxSingleQuote: false, + trailingComma: "es5", + bracketSpacing: true, + endOfLine: "lf", + plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], + tailwindStylesheet: "./src/styles/global.css", + overrides: [ + { + files: "*.astro", + options: { + parser: "astro", + }, + }, + ], +}; diff --git a/package.json b/package.json index 82252aa..46e2f9d 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "eslint-plugin-astro": "^1.3.1", "eslint-plugin-jsx-a11y": "^6.10.2", "globals": "^16.0.0", - "prettier": "^3.4.2", + "prettier": "^3.5.2", "prettier-plugin-astro": "^0.14.1", "prettier-plugin-tailwindcss": "^0.6.11", "typescript": "^5.7.3",