svelte: Use same prettier version as workspace root (#59160)

If we are not using the same version there will be differences between
running `pnpm format` in the SvelteKit package and `sg lint format`,
which will cause CI to fail (which is annoying).
This commit is contained in:
Felix Kling 2023-12-21 12:06:06 +01:00 committed by GitHub
parent a55b1da233
commit 3f3000d713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 28 deletions

View File

@ -13,5 +13,8 @@ pnpm-lock.yaml
package-lock.json
yarn.lock
/static/mockServiceWorker.js
.gql.d.ts
graphql-operations.ts
graphql-types.ts
tsconfig.json

View File

@ -47,8 +47,8 @@
"graphql": "^15.0.0",
"msw": "^1.2.3",
"msw-storybook-addon": "^1.8.0",
"prettier": "^3.0.0",
"prettier-plugin-svelte": "^3.0.3",
"prettier": "2.8.1",
"prettier-plugin-svelte": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"signale": "^1.4.0",

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />

View File

@ -43,8 +43,8 @@
</a>
</td>
{:else}
<td></td>
<td></td>
<td />
<td />
{/if}
{/if}
</tr>

View File

@ -169,7 +169,7 @@
>
<input class="hidden" value={$queryState.query} name="q" />
<div class="focus-container">
<div class="mode-switcher"></div>
<div class="mode-switcher" />
<BaseCodeMirrorQueryInput
bind:this={input}
bind:view={editor}

View File

@ -13,7 +13,7 @@
'outlineSecondary',
] as const
export type BadgeVariantType = (typeof BADGE_VARIANTS)[number]
export type BadgeVariantType = typeof BADGE_VARIANTS[number]
export function badgeClassName(variant: BadgeVariantType, small?: boolean, pill?: boolean): string {
return classNames(styles.badge, styles[variant], { [styles.small]: small, [styles.pill]: pill })

View File

@ -7,9 +7,9 @@
import { type BUTTON_DISPLAY, type BUTTON_SIZES, type BUTTON_VARIANTS, getButtonClassName } from './Button'
interface $$Props extends HTMLButtonAttributes {
variant?: (typeof BUTTON_VARIANTS)[number]
size?: (typeof BUTTON_SIZES)[number]
display?: (typeof BUTTON_DISPLAY)[number]
variant?: typeof BUTTON_VARIANTS[number]
size?: typeof BUTTON_SIZES[number]
display?: typeof BUTTON_DISPLAY[number]
outline?: boolean
}

View File

@ -5,7 +5,7 @@
import styles from './Button.module.scss'
export let direction: (typeof BUTTON_GROUP_DIRECTION)[number] = 'horizontal'
export let direction: typeof BUTTON_GROUP_DIRECTION[number] = 'horizontal'
$: className = classNames(styles.btnGroup, direction === 'vertical' && styles.btnGroupVertical)
</script>

View File

@ -5,7 +5,7 @@
<h2>Default</h2>
<table>
<thead>
<tr><th>Variant</th><th></th><th>pill=true</th><th>small=true</th><th>pill=true small=true</th></tr>
<tr><th>Variant</th><th /><th>pill=true</th><th>small=true</th><th>pill=true small=true</th></tr>
</thead>
<tbody>
{#each BADGE_VARIANTS as variant}

View File

@ -2,7 +2,6 @@
@component
Decorator for forcing the story component to be destroyed an recreated
-->
<script lang="ts">
import type { SvelteComponent } from 'svelte'

View File

@ -1518,11 +1518,11 @@ importers:
specifier: ^1.8.0
version: 1.8.0(msw@1.2.3)
prettier:
specifier: ^3.0.0
version: 3.0.0
specifier: 2.8.1
version: 2.8.1
prettier-plugin-svelte:
specifier: ^3.0.3
version: 3.0.3(prettier@3.0.0)(svelte@4.1.1)
specifier: ^2.0.0
version: 2.9.0(prettier@2.8.1)(svelte@4.1.1)
react:
specifier: ^18.2.0
version: 18.2.0
@ -21446,13 +21446,13 @@ packages:
svelte: 3.59.2
dev: true
/prettier-plugin-svelte@3.0.3(prettier@3.0.0)(svelte@4.1.1):
resolution: {integrity: sha512-dLhieh4obJEK1hnZ6koxF+tMUrZbV5YGvRpf2+OADyanjya5j0z1Llo8iGwiHmFWZVG/hLEw/AJD5chXd9r3XA==}
/prettier-plugin-svelte@2.9.0(prettier@2.8.1)(svelte@4.1.1):
resolution: {integrity: sha512-3doBi5NO4IVgaNPtwewvrgPpqAcvNv0NwJNflr76PIGgi9nf1oguQV1Hpdm9TI2ALIQVn/9iIwLpBO5UcD2Jiw==}
peerDependencies:
prettier: ^3.0.0
svelte: ^3.2.0 || ^4.0.0-next.0
prettier: ^1.16.4 || ^2.0.0
svelte: ^3.2.0
dependencies:
prettier: 3.0.0
prettier: 2.8.1
svelte: 4.1.1
dev: true
@ -21468,12 +21468,6 @@ packages:
hasBin: true
dev: true
/prettier@3.0.0:
resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==}
engines: {node: '>=14'}
hasBin: true
dev: true
/pretty-bytes@5.3.0:
resolution: {integrity: sha512-hjGrh+P926p4R4WbaB6OckyRtO0F0/lQBiT+0gnxjV+5kjPBrfVBFCsCLbMqVQeydvIoouYTCmmEURiH3R1Bdg==}
engines: {node: '>=6'}