From 8daa4e8c0e28833f161543397e21219d6803e946 Mon Sep 17 00:00:00 2001 From: Victor Trinh Date: Mon, 18 Nov 2024 16:37:46 -0500 Subject: [PATCH] Revert "Test prettier-local hacks" This reverts commit e05ab31b1c2105380f944e99161f8eaf4009600b. --- .storybook/components/snippet/formatCode.ts | 6 +++--- package.json | 2 +- pnpm-lock.yaml | 11 +++++++++-- tsconfig.json | 4 +--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.storybook/components/snippet/formatCode.ts b/.storybook/components/snippet/formatCode.ts index a16de3824..dfdf3a961 100644 --- a/.storybook/components/snippet/formatCode.ts +++ b/.storybook/components/snippet/formatCode.ts @@ -1,7 +1,7 @@ import { isNil } from "@components/shared/index.ts"; -import prettier from "prettier-local"; -import babel from "prettier-parser-babel"; -import postcss from "prettier-parser-postcss"; +import * as prettier from "prettier-local/standalone"; +import babel from "prettier-local/parser-babel"; +import postcss from "prettier-local/parser-postcss"; const PrettierParser = { "javascript": "babel", diff --git a/package.json b/package.json index ccf67381d..b544ef27c 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "jest-environment-jsdom": "29.7.0", "meow": "9.0.0", "netlify-cli": "17.37.2", - "prettier-local": "npm:prettier@2.8.8", + "prettier-local": "npm:prettier@2.5.1", "prism-react-renderer": "1.2.1", "react": "18.3.1", "react-dom": "18.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 677411711..f9fe9d66d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,8 +165,8 @@ importers: specifier: 17.37.2 version: 17.37.2(@swc/core@1.7.36(@swc/helpers@0.5.13))(@types/express@4.17.21)(@types/node@22.9.0)(picomatch@4.0.2) prettier-local: - specifier: npm:prettier@2.8.8 - version: prettier@2.8.8 + specifier: npm:prettier@2.5.1 + version: prettier@2.5.1 prism-react-renderer: specifier: 1.2.1 version: 1.2.1(react@18.3.1) @@ -8079,6 +8079,11 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} + prettier@2.5.1: + resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} + engines: {node: '>=10.13.0'} + hasBin: true + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -19677,6 +19682,8 @@ snapshots: dependencies: fast-diff: 1.3.0 + prettier@2.5.1: {} + prettier@2.8.8: {} prettier@3.3.3: {} diff --git a/tsconfig.json b/tsconfig.json index 4058d9d1d..250684d06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,9 +12,7 @@ "@components": ["packages/components/src/index.ts"], "@components/*": ["packages/components/src/*"], "@stories/components": [".storybook/components/index.ts"], - "@stories/mdx": [".storybook/mdx/index.ts"], - "prettier-parser-babel": ["node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/esm/parser-babel.mjs"], - "prettier-parser-postcss": ["node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/esm/parser-postcss.mjs"] + "@stories/mdx": [".storybook/mdx/index.ts"] } }, "exclude": ["**/dist/**", "node_modules", "packages", "apps"],