-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprettier.config.mjs
More file actions
44 lines (41 loc) · 1.56 KB
/
prettier.config.mjs
File metadata and controls
44 lines (41 loc) · 1.56 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @file Prettier Configuration for Code Formatting.
*
* @description Custom settings for Prettier, the code formatter. Define
* formatting rules to maintain consistency in your project's code, including
* quoting, semicolons, indentation, and line length.
*
* @see {@link https://prettier.io/docs/configuration | Prettier Configuration File}
* @module PrettierConfiguration
*/
// ━━ TYPE DEFINITIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/**
* Type for Prettier configuration.
*
* @typedef {import("prettier").Config} PrettierConfigurationOptions
*/
// ━━ MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/**
* Prettier settings for the project.
*
* @constant prettierConfiguration
* @type {PrettierConfigurationOptions}
*/
const prettierConfiguration = {
trailingComma: 'all',
printWidth: 100,
tabWidth: 2,
semi: false,
singleQuote: true,
arrowParens: 'avoid',
overrides: [
{
files: ['.prettierrc', '.babelrc', '.eslintrc', '.stylelintrc'],
options: {
parser: 'json',
},
},
],
};
// ━━ EXPORT MODULE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
export default prettierConfiguration;