This module contains Viam's shared Prettier configurations for Prettier v3 in Svelte projects.
Use the Svelte config for Svelte projects.
pnpm add --save-dev prettier @viamrobotics/prettier-config-svelte
// prettier.config.js
export default '@viamrobotics/prettier-config-svelte';
If the project is inside a monorepo, you'll need to specify the path to your Tailwind config.
// prettier.config.js
import path from 'node:path';
import baseConfig from '@viamrobotics/prettier-config-svelte';
/** @satisfies {import('prettier').Config} */
const config = {
...baseConfig,
tailwindConfig: path.join(import.meta.dirname, 'tailwind.config.ts'),
};
export default config;