mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 22:18:00 +08:00
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>
31 lines
728 B
JavaScript
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
|