From 620446370d54695f54e28249ca620084d501b0e7 Mon Sep 17 00:00:00 2001 From: satnaing Date: Thu, 14 Sep 2023 13:21:54 +0630 Subject: [PATCH] chore: add astro prettier plugin --- .prettierrc | 11 +++++- package-lock.json | 95 ++++++++++++++++++++++++++++++++++++----------- package.json | 1 + 3 files changed, 84 insertions(+), 23 deletions(-) diff --git a/.prettierrc b/.prettierrc index 1a5b843..5d921d9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,5 +7,14 @@ "jsxSingleQuote": false, "trailingComma": "es5", "bracketSpacing": true, - "endOfLine": "lf" + "endOfLine": "lf", + "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], + "overrides": [ + { + "files": "*.astro", + "options": { + "parser": "astro" + } + } + ] } diff --git a/package-lock.json b/package-lock.json index d6ea091..e401f9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "husky": "^8.0.3", "lint-staged": "^13.2.2", "prettier": "^2.8.8", + "prettier-plugin-astro": "^0.12.0", "prettier-plugin-tailwindcss": "^0.2.8", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -64,9 +65,9 @@ } }, "node_modules/@astrojs/compiler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.5.1.tgz", - "integrity": "sha512-iIGKu/uzB8sJ5VveQf0eHrVPPFEcrvSlp4qShYMOuY2aMmK2RVXQlX9dUjtmBQ+NAokfIOb7fwCutvH+p13l+g==" + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.8.2.tgz", + "integrity": "sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==" }, "node_modules/@astrojs/internal-helpers": { "version": "0.1.0", @@ -96,6 +97,21 @@ "astro-ls": "bin/nodeServer.js" } }, + "node_modules/@astrojs/language-server/node_modules/prettier-plugin-astro": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.9.1.tgz", + "integrity": "sha512-pYZXSbdq0eElvzoIMArzv1SBn1NUXzopjlcnt6Ql8VW32PjC12NovwBjXJ6rh8qQLi7vF8jNqAbraKW03UPfag==", + "dependencies": { + "@astrojs/compiler": "^1.0.1", + "prettier": "^2.8.3", + "sass-formatter": "^0.7.5", + "synckit": "^0.8.4" + }, + "engines": { + "node": "^14.15.0 || >=16.0.0", + "pnpm": ">=7.14.0" + } + }, "node_modules/@astrojs/markdown-remark": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-2.2.1.tgz", @@ -8588,18 +8604,32 @@ } }, "node_modules/prettier-plugin-astro": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.9.1.tgz", - "integrity": "sha512-pYZXSbdq0eElvzoIMArzv1SBn1NUXzopjlcnt6Ql8VW32PjC12NovwBjXJ6rh8qQLi7vF8jNqAbraKW03UPfag==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.12.0.tgz", + "integrity": "sha512-8E+9YQR6/5CPZJs8XsfBw579zrwZkc0Wb7x0fRVm/51JC8Iys4lBw4ecV8fHwpbQnzve86TUa4fJ08BJzqfWnA==", + "dev": true, "dependencies": { - "@astrojs/compiler": "^1.0.1", - "prettier": "^2.8.3", - "sass-formatter": "^0.7.5", - "synckit": "^0.8.4" + "@astrojs/compiler": "^1.5.5", + "prettier": "^3.0.0", + "sass-formatter": "^0.7.6" }, "engines": { - "node": "^14.15.0 || >=16.0.0", - "pnpm": ">=7.14.0" + "node": "^14.15.0 || >=16.0.0" + } + }, + "node_modules/prettier-plugin-astro/node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-plugin-tailwindcss": { @@ -11173,9 +11203,9 @@ } }, "@astrojs/compiler": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.5.1.tgz", - "integrity": "sha512-iIGKu/uzB8sJ5VveQf0eHrVPPFEcrvSlp4qShYMOuY2aMmK2RVXQlX9dUjtmBQ+NAokfIOb7fwCutvH+p13l+g==" + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.8.2.tgz", + "integrity": "sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==" }, "@astrojs/internal-helpers": { "version": "0.1.0", @@ -11200,6 +11230,19 @@ "vscode-languageserver-textdocument": "^1.0.4", "vscode-languageserver-types": "^3.17.1", "vscode-uri": "^3.0.3" + }, + "dependencies": { + "prettier-plugin-astro": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.9.1.tgz", + "integrity": "sha512-pYZXSbdq0eElvzoIMArzv1SBn1NUXzopjlcnt6Ql8VW32PjC12NovwBjXJ6rh8qQLi7vF8jNqAbraKW03UPfag==", + "requires": { + "@astrojs/compiler": "^1.0.1", + "prettier": "^2.8.3", + "sass-formatter": "^0.7.5", + "synckit": "^0.8.4" + } + } } }, "@astrojs/markdown-remark": { @@ -16962,14 +17005,22 @@ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==" }, "prettier-plugin-astro": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.9.1.tgz", - "integrity": "sha512-pYZXSbdq0eElvzoIMArzv1SBn1NUXzopjlcnt6Ql8VW32PjC12NovwBjXJ6rh8qQLi7vF8jNqAbraKW03UPfag==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.12.0.tgz", + "integrity": "sha512-8E+9YQR6/5CPZJs8XsfBw579zrwZkc0Wb7x0fRVm/51JC8Iys4lBw4ecV8fHwpbQnzve86TUa4fJ08BJzqfWnA==", + "dev": true, "requires": { - "@astrojs/compiler": "^1.0.1", - "prettier": "^2.8.3", - "sass-formatter": "^0.7.5", - "synckit": "^0.8.4" + "@astrojs/compiler": "^1.5.5", + "prettier": "^3.0.0", + "sass-formatter": "^0.7.6" + }, + "dependencies": { + "prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true + } } }, "prettier-plugin-tailwindcss": { diff --git a/package.json b/package.json index c98d126..6c55c6c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "husky": "^8.0.3", "lint-staged": "^13.2.2", "prettier": "^2.8.8", + "prettier-plugin-astro": "^0.12.0", "prettier-plugin-tailwindcss": "^0.2.8", "react": "^18.2.0", "react-dom": "^18.2.0"