-
Notifications
You must be signed in to change notification settings - Fork 23
/
prettier.config.js
30 lines (23 loc) · 962 Bytes
/
prettier.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/** @type {import('prettier').Config} */
module.exports = {
// Set the line ending to `lf`.
// https://prettier.io/docs/en/options.html#end-of-line
endOfLine: 'lf',
// Do not add semicolons at the end of statements.
// Specify the parser plugins to use for import sorting.
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
// Use single quotes for string literals.
// Combine type-only imports with value imports.
importOrderTypeScriptVersion: '5.1.6',
// Set the tab width to 2 spaces.
plugins: ['prettier-plugin-packagejson'],
// Add trailing commas for object and array literals in ES5-compatible mode.
// https://prettier.io/docs/en/options.html#semicolons
semi: true,
// https://prettier.io/docs/en/options.html#quotes
singleQuote: true,
// https://prettier.io/docs/en/options.html#tab-width
tabWidth: 2,
// https://prettier.io/docs/en/options.html#trailing-commas
trailingComma: 'es5',
};