Files
supabase/prettier.config.mjs
Ivan Vasilov 9fa96977be chore: Minor prettier fixes (#43849)
This PR fixes some prettier issues:
- Bump and unify all prettier versions to 3.7.3 across teh whole repo
- Bump the SQL prettier plugin
- When running `test:prettier`, check `mdx` files also
- Run the new prettier format on all files

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-17 11:17:42 +01:00

31 lines
728 B
JavaScript

let options = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
printWidth: 100,
endOfLine: 'lf',
sqlKeywordCase: 'lower',
sqlLiteralCase: 'lower',
sqlTypeCase: 'lower',
plugins: ['prettier-plugin-sql-cst'],
overrides: [
{
files: '**/*.json',
options: { parser: 'json' },
},
],
}
// Disable sorting imports when running a prettier command in CI. This is to make the sorting work in editors
// for easier migration.
if (process.env.SORT_IMPORTS !== 'false') {
options = {
...options,
plugins: [...options.plugins, '@ianvs/prettier-plugin-sort-imports'],
importOrder: ['<THIRD_PARTY_MODULES>', '', '^(@|\\.{1,2})/(.*)$'],
}
}
export default options