diff --git a/website/playground/package.json b/website/playground/package.json index cbbf72038ba..360b180babe 100644 --- a/website/playground/package.json +++ b/website/playground/package.json @@ -30,7 +30,7 @@ "@vitejs/plugin-react": "^1.0.7", "autoprefixer": "^10.4.2", "postcss": "^8.4.6", - "rome": "0.5.0-next", + "rome": "0.6.0-next", "tailwindcss": "^3.0.19", "typescript": "^4.4.4", "vite": "^2.7.2" diff --git a/website/playground/pnpm-lock.yaml b/website/playground/pnpm-lock.yaml index 088418a59b7..ba34c595024 100644 --- a/website/playground/pnpm-lock.yaml +++ b/website/playground/pnpm-lock.yaml @@ -16,7 +16,7 @@ specifiers: react-dom: ^17.0.2 react-json-view: ^1.21.3 react-tabs: ^3.2.3 - rome: 0.5.0-next + rome: 0.6.0-next tailwindcss: ^3.0.19 typescript: ^4.4.4 vite: ^2.7.2 @@ -39,7 +39,7 @@ devDependencies: '@vitejs/plugin-react': 1.1.4 autoprefixer: 10.4.2_postcss@8.4.6 postcss: 8.4.6 - rome: 0.5.0-next + rome: 0.6.0-next tailwindcss: 3.0.19_qm7bagfnbv4vjkuayu3hle4sne typescript: 4.5.5 vite: 2.7.13 @@ -389,48 +389,48 @@ packages: picomatch: 2.3.1 dev: true - /@rometools/cli-darwin-arm64/0.5.0-next: - resolution: {integrity: sha512-dzwIOxvSNPD70DJYzyrxs0DLqUd4p+wDJM/AmHKGTxYJSdQahEG5/scnqfwIGiaSpKP/qNIv4+7Hd0aSaQF0NQ==} + /@rometools/cli-darwin-arm64/0.6.0-next: + resolution: {integrity: sha512-DQzlRUlTRnxhFXG/50aBNQjb60mTpEn2Ko5yWLwW9m4sQiUhG1xK1NXxbCI8MfGnymcUiV1vQDv7ScC51MXLzg==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rometools/cli-darwin-x64/0.5.0-next: - resolution: {integrity: sha512-DXb/5PxNvD4ENb0oKiWnV2Zfww+yyZ5Q/ADUQqF1TsQjy8l7+4uiY618Wxo7KfH4y2uJA8b7wnly16bSw44F5g==} + /@rometools/cli-darwin-x64/0.6.0-next: + resolution: {integrity: sha512-/0ubFXniAgdp6GJuZjfH7i+YkGY0Dvr8271OvybeWhcLh72f9JosYp2VIcjgox/eIl9b+iKoAn8IpiBSirTodA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rometools/cli-linux-arm64/0.5.0-next: - resolution: {integrity: sha512-1vWKrnQgBgTBeQZquphsmqdCudX4GuwugaQbQVmpCQa+WfKpAe8SAQIJz5G5G3m9uYQRUfwS2AXXEWuMCVHSZQ==} + /@rometools/cli-linux-arm64/0.6.0-next: + resolution: {integrity: sha512-TC8g4dABlYghMMMXHcvtvm08ATkCbSbYcyk4fv4/utOxUTmzDlguGXj8uulMvKCGhTSuKSwdzQztg+QMVhF4Xg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rometools/cli-linux-x64/0.5.0-next: - resolution: {integrity: sha512-rKLhodWhYdMmVtIN1mZFxEFTbTiceat6NJUBGbsLHrjQVZ9h9tw8LlK/Lx8dBpzH5j093xKModnxZDFeIYyHLQ==} + /@rometools/cli-linux-x64/0.6.0-next: + resolution: {integrity: sha512-YUym0jh5aZx/DmnwiEawEdw+kcOJti6ym+0FkGsOGiW/Zsaw5K0rzC5T+ucK+TV1TS8Aq7UT244oN3KdbYJkCA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rometools/cli-win32-arm64/0.5.0-next: - resolution: {integrity: sha512-XDVcPeTAvR9KgCqJQYLkhG2cb5XhsY1ZQUKSGsruxB257spkizb2M299VvLaSKVD7pDakG8Vk0JN3lPXdn0zdQ==} + /@rometools/cli-win32-arm64/0.6.0-next: + resolution: {integrity: sha512-H6swDALdEm2VGAz3xmYylI52/ZjbOjJtTobY/qXHvVOY2BgFNT8SfDCaAfF3rrBm6PPPRqLW5bcP6C0rZh9LOQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rometools/cli-win32-x64/0.5.0-next: - resolution: {integrity: sha512-kZeH17xLyQeAD+Y3vAPFuFnF7RxaCmtN/WSfB4mobje5HsAIqP6YPA7Gxpex/fJhv3rRWyNMTvrZEtDn5ogjHw==} + /@rometools/cli-win32-x64/0.6.0-next: + resolution: {integrity: sha512-KxV4LHYXnO/8bRYsuon5codT4C9VwXokdw/fxAQ128rGrt8G3o0hei0XqdZiS3T0ktiwl0hDxufujNgVPpDUkQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -572,6 +572,7 @@ packages: /@types/prop-types/15.7.4: resolution: {integrity: sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==} + dev: true /@types/react-dom/17.0.11: resolution: {integrity: sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==} @@ -591,6 +592,7 @@ packages: '@types/prop-types': 15.7.4 '@types/scheduler': 0.16.2 csstype: 3.0.10 + dev: true /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} @@ -600,6 +602,7 @@ packages: /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} + dev: true /@types/unist/2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} @@ -1125,6 +1128,7 @@ packages: /csstype/3.0.10: resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} + dev: true /debug/4.3.3: resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} @@ -2958,18 +2962,18 @@ packages: fsevents: 2.3.2 dev: true - /rome/0.5.0-next: - resolution: {integrity: sha512-Y5LmDdSeu35DrqJRQnNHSmZcL6yOyHUhJLKevZN5xXW4GnPwHMLF8rUahnhgAugD5wmyGYAgakwKWA64n6yxkg==} + /rome/0.6.0-next: + resolution: {integrity: sha512-6XFNdUYs/tJ5pMi/aI+iF15nD1lEnYbGMLL7S9BzIRKZo6+2hLd3/cqEtcjT+V58eJoXuQvyIgZg2RFkAYBpAw==} engines: {node: '>=14.18.0'} hasBin: true requiresBuild: true optionalDependencies: - '@rometools/cli-darwin-arm64': 0.5.0-next - '@rometools/cli-darwin-x64': 0.5.0-next - '@rometools/cli-linux-arm64': 0.5.0-next - '@rometools/cli-linux-x64': 0.5.0-next - '@rometools/cli-win32-arm64': 0.5.0-next - '@rometools/cli-win32-x64': 0.5.0-next + '@rometools/cli-darwin-arm64': 0.6.0-next + '@rometools/cli-darwin-x64': 0.6.0-next + '@rometools/cli-linux-arm64': 0.6.0-next + '@rometools/cli-linux-x64': 0.6.0-next + '@rometools/cli-win32-arm64': 0.6.0-next + '@rometools/cli-win32-x64': 0.6.0-next dev: true /run-async/2.4.1: diff --git a/website/playground/src/App.tsx b/website/playground/src/App.tsx index 4ab7be2ef65..ab2decd477e 100644 --- a/website/playground/src/App.tsx +++ b/website/playground/src/App.tsx @@ -14,10 +14,10 @@ function App() { init() .then(() => { setLoadingState(LoadingState.Success); - }) + },) .catch(() => { setLoadingState(LoadingState.Error); - }); + },); }, [], ); diff --git a/website/playground/src/LineWidthInput.tsx b/website/playground/src/LineWidthInput.tsx index 047570a2835..008e1bda586 100644 --- a/website/playground/src/LineWidthInput.tsx +++ b/website/playground/src/LineWidthInput.tsx @@ -1,4 +1,7 @@ -interface Props { lineWidth: number; setLineWidth: (lineWidth: number) => void } +interface Props { + lineWidth: number; + setLineWidth: (lineWidth: number) => void; +} export default function LineWidthInput({ lineWidth, setLineWidth }: Props) { return (
diff --git a/website/playground/src/SourceTypeSelect.tsx b/website/playground/src/SourceTypeSelect.tsx index d4f0c93f5cc..299a73718f4 100644 --- a/website/playground/src/SourceTypeSelect.tsx +++ b/website/playground/src/SourceTypeSelect.tsx @@ -10,7 +10,14 @@ interface Props { } export default function SourceTypeSelect( - { setIsTypeScript, isTypeScript, setIsJsx, isJsx, setSourceType, sourceType }: Props, + { + setIsTypeScript, + isTypeScript, + setIsJsx, + isJsx, + setSourceType, + sourceType, + }: Props, ) { return (
@@ -54,7 +61,7 @@ export default function SourceTypeSelect( setIsTypeScript(e.target.checked); }} className="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-30" - disabled={sourceType == SourceType.Script} + disabled={sourceType === SourceType.Script} />
@@ -76,7 +83,7 @@ export default function SourceTypeSelect( checked={isJsx} onChange={(e) => setIsJsx(e.target.checked)} className="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-30" - disabled={sourceType == SourceType.Script} + disabled={sourceType === SourceType.Script} />
diff --git a/website/playground/src/TreeView.tsx b/website/playground/src/TreeView.tsx index a57316985d4..6f4608afc5d 100644 --- a/website/playground/src/TreeView.tsx +++ b/website/playground/src/TreeView.tsx @@ -11,7 +11,9 @@ interface Props { setPlaygroundState: Dispatch>; } -export default function TreeView({ tree, treeStyle, setPlaygroundState }: Props) { +export default function TreeView( + { tree, treeStyle, setPlaygroundState }: Props, +) { return (
({ width: undefined, height: undefined, - }); + },); useEffect( () => { // Handler to call on window resize @@ -45,16 +56,20 @@ export function usePlaygroundState(): [ const searchParams = new URLSearchParams(window.location.search); const [playgroundState, setPlaygroundState] = useState( () => ({ - code: window.location.hash !== "#" ? decodeCode( - window.location.hash.substring(1), - ) : "", + code: + window.location.hash !== "#" ? decodeCode( + window.location.hash.substring(1), + ) : "", lineWidth: parseInt(searchParams.get("lineWidth") ?? "80"), - indentStyle: (searchParams.get("indentStyle") as IndentStyle) ?? IndentStyle.Tab, - quoteStyle: (searchParams.get("quoteStyle") as QuoteStyle) ?? QuoteStyle.Double, + indentStyle: + (searchParams.get("indentStyle") as IndentStyle) ?? IndentStyle.Tab, + quoteStyle: + (searchParams.get("quoteStyle") as QuoteStyle) ?? QuoteStyle.Double, indentWidth: parseInt(searchParams.get("indentWidth") ?? "2"), isTypeScript: searchParams.get("typescript") === "true", isJsx: searchParams.get("jsx") === "true", - sourceType: (searchParams.get("sourceType") as SourceType) ?? SourceType.Module, + sourceType: + (searchParams.get("sourceType") as SourceType) ?? SourceType.Module, treeStyle: TreeStyle.Json, }), ); @@ -67,7 +82,7 @@ export function usePlaygroundState(): [ ...options, typescript: isTypeScript.toString(), jsx: isJsx.toString(), - }).toString(); + },).toString(); const url = `${window.location.protocol}//${window.location.host}${window.location.pathname}?${queryString}#${encodeCode( code, )}`; @@ -112,7 +127,10 @@ export function formatWithPrettier( // @ts-ignore let debug = prettier.__debug; const document = debug.printToDoc(code, prettierOptions); - const formattedCode = debug.printDocToString(document, prettierOptions).formatted; + const formattedCode = debug.printDocToString( + document, + prettierOptions, + ).formatted; const ir = debug.formatDoc( document, { parser: "babel", plugins: [parserBabel] }, diff --git a/website/playground/vite.config.ts b/website/playground/vite.config.ts index 13a3c633704..efda705154e 100644 --- a/website/playground/vite.config.ts +++ b/website/playground/vite.config.ts @@ -6,4 +6,4 @@ import svgr from "@honkhonk/vite-plugin-svgr"; export default defineConfig({ base: process.env.BASE_URL, plugins: [react(), svgr()], -}); +},); diff --git a/website/playground/workers-site/index.js b/website/playground/workers-site/index.js index cae4ed1439e..509392c0ec8 100644 --- a/website/playground/workers-site/index.js +++ b/website/playground/workers-site/index.js @@ -1,4 +1,7 @@ -import { getAssetFromKV, mapRequestToAsset } from "@cloudflare/kv-asset-handler"; +import { + getAssetFromKV, + mapRequestToAsset, +} from "@cloudflare/kv-asset-handler"; /** * The DEBUG flag will do two things that help during development: