-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.prettierrc.cjs
28 lines (20 loc) · 1003 Bytes
/
.prettierrc.cjs
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
module.exports = {
// Use 2 spaces for indentation. This is common and beginner-friendly.
tabWidth: 4,
// Use spaces instead of tabs for indentation.
useTabs: false,
// Add a semicolon at the end of every statement. This is clear and avoids errors.
semi: true,
// Use single quotes instead of double quotes for strings. Personal preference, and often simpler.
singleQuote: true,
// Add trailing commas where possible. This makes diffs cleaner when adding new items.
trailingComma: 'es5',
// Add spaces between brackets in object literals for readability.
bracketSpacing: true,
// Always include parentheses around a sole arrow function parameter. This is explicit and easier for beginners.
arrowParens: 'always',
// Wrap lines that exceed 150 characters. Keeps code readable, but small screens may need a lower value.
printWidth: 150,
// Use LF (line feed) for newlines. Standard for most environments.
endOfLine: 'lf',
};