Files
fressh/prettier.config.js
2025-09-07 23:00:30 -04:00

15 lines
497 B
JavaScript

import defaultConfig from '@epic-web/config/prettier'
// const defaultConfig = require('@epic-web/config/prettier')
// Sometimes this plugin can remove imports that are in use.
// As a workaround we will only use this in the cli. (npm run fmt)
const sortImports = process.env.SORT_IMPORTS === 'true'
/** @type {import("prettier").Options} */
export default {
...defaultConfig,
plugins: [
...(sortImports ? ['prettier-plugin-organize-imports'] : []),
...(defaultConfig.plugins || []),
],
}