diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 000000000000..fdb95b6dce6c --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + semi: true, + singleQuote: true, + overrides: [ + { + files: '*.astro', + options: { + parser: 'astro', + singleQuote: true, + jsxSingleQuote: true, + }, + }, + ], + plugins: [ + require.resolve('prettier-plugin-astro'), + require('prettier-plugin-tailwindcss'), + ], +}; diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..d3b317b51dbd --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "prettier.documentSelectors": ["**/*.astro"], + "[astro]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } +} diff --git a/package.json b/package.json index 3ad71e7b737b..4806cf153de0 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "markdown-it": "^13.0.1", "openai": "^3.2.1", "prettier": "^2.8.7", - "prettier-plugin-astro": "^0.8.0" + "prettier-plugin-astro": "^0.8.0", + "prettier-plugin-tailwindcss": "^0.2.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd276377ae24..b05efe6068fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,6 +15,7 @@ specifiers: openai: ^3.2.1 prettier: ^2.8.7 prettier-plugin-astro: ^0.8.0 + prettier-plugin-tailwindcss: ^0.2.6 rehype-external-links: ^2.0.1 roadmap-renderer: ^1.0.4 tailwindcss: ^3.2.7 @@ -28,7 +29,7 @@ dependencies: npm-check-updates: 16.8.0 rehype-external-links: 2.0.1 roadmap-renderer: 1.0.4 - tailwindcss: 3.2.7 + tailwindcss: 3.2.7_postcss@8.4.21 devDependencies: '@playwright/test': 1.32.1 @@ -39,6 +40,7 @@ devDependencies: openai: 3.2.1 prettier: 2.8.7 prettier-plugin-astro: 0.8.0 + prettier-plugin-tailwindcss: 0.2.6_kb4gmvngxncp3puqxt3b6slppy packages: @@ -128,7 +130,7 @@ packages: autoprefixer: 10.4.13_postcss@8.4.21 postcss: 8.4.21 postcss-load-config: 4.0.1_postcss@8.4.21 - tailwindcss: 3.2.7 + tailwindcss: 3.2.7_postcss@8.4.21 transitivePeerDependencies: - ts-node dev: false @@ -818,7 +820,7 @@ packages: lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 postcss-selector-parser: 6.0.10 - tailwindcss: 3.2.7 + tailwindcss: 3.2.7_postcss@8.4.21 dev: true /@tootallnate/once/2.0.0: @@ -4211,6 +4213,62 @@ packages: synckit: 0.8.4 dev: true + /prettier-plugin-tailwindcss/0.2.6_kb4gmvngxncp3puqxt3b6slppy: + resolution: {integrity: sha512-F+7XCl9RLF/LPrGdUMHWpsT6TM31JraonAUyE6eBmpqymFvDwyl0ETHsKFHP1NG+sEfv8bmKqnTxEbWQbHPlBA==} + engines: {node: '>=12.17.0'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-php': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@shufo/prettier-plugin-blade': '*' + '@trivago/prettier-plugin-sort-imports': '*' + prettier: '>=2.2.0' + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + prettier-plugin-twig-melody: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-php': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@shufo/prettier-plugin-blade': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + prettier-plugin-twig-melody: + optional: true + dependencies: + prettier: 2.8.7 + prettier-plugin-astro: 0.8.0 + dev: true + /prettier/2.8.7: resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==} engines: {node: '>=10.13.0'} @@ -4965,10 +5023,12 @@ packages: '@pkgr/utils': 2.3.1 tslib: 2.4.1 - /tailwindcss/3.2.7: + /tailwindcss/3.2.7_postcss@8.4.21: resolution: {integrity: sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==} engines: {node: '>=12.13.0'} hasBin: true + peerDependencies: + postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 diff --git a/src/pages/roadmaps.astro b/src/pages/roadmaps.astro index 0833cf6f6168..118a937f79b9 100644 --- a/src/pages/roadmaps.astro +++ b/src/pages/roadmaps.astro @@ -19,9 +19,9 @@ const skillRoadmaps = await getRoadmapsByTag('skill-roadmap'); showYouTubeAlert={true} /> -