Improve lint anf fmt cmds

This commit is contained in:
EthanShoeDev
2025-09-09 21:21:12 -04:00
parent f7d1d3b0f4
commit 638cfc49cb
15 changed files with 5266 additions and 1992 deletions

View File

@@ -1,15 +1,14 @@
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';
// Sometimes this plugin can remove imports that are being edited.
// As a workaround we will only use this in the cli. (pnpm run fmt)
// const sortImports = process.env.SORT_IMPORTS === "true";
/** @type {import("prettier").Options} */
export default {
...defaultConfig,
semi: true,
plugins: [
...(sortImports ? ['prettier-plugin-organize-imports'] : []),
// ...(sortImports ? ["prettier-plugin-organize-imports"] : []),
...(defaultConfig.plugins || []),
],
};