16 lines
1.1 KiB
JavaScript
16 lines
1.1 KiB
JavaScript
// .prettierrc.js
|
|
module.exports = {
|
|
printWidth: 100, // Specify the line length that the printer will wrap on.
|
|
tabWidth: 2, // Specify the number of spaces per indentation-level.
|
|
useTabs: false, // Indent lines with tabs instead of spaces.
|
|
semi: true, // Print semicolons at the ends of statements.
|
|
singleQuote: true, // Use single quotes instead of double quotes.
|
|
quoteProps: 'as-needed', // Change when properties in objects are quoted.
|
|
jsxSingleQuote: false, // Use single quotes instead of double quotes in JSX.
|
|
trailingComma: 'es5', // Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.)
|
|
bracketSpacing: true, // Print spaces between brackets in object literals.
|
|
bracketSameLine: false, // Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
|
|
arrowParens: 'always', // Include parentheses around a sole arrow function parameter.
|
|
endOfLine: 'lf', // Ensure consistent line endings
|
|
};
|