Skip to content

Latest commit

 

History

History

prettier-config-svelte

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Viam's Prettier Config for Svelte

This module contains Viam's shared Prettier configurations for Prettier v3 in Svelte projects.

Usage

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;