Repository navigation
Expand file tree
/
Copy pathprettier.config.mjs
More file actions
53 lines (51 loc) · 1.68 KB
/
Copy pathprettier.config.mjs
File metadata and controls
53 lines (51 loc) · 1.68 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
45
46
47
48
49
50
51
52
53
import prettier from "eslint-plugin-prettier";
import tslint from "typescript-eslint";
import globals from "globals";
const prettierConfig = [
{
ignores: [
"dist/**/*",
".cache/**/*",
"configs/**/*",
"coverage/**/*",
"node_modules/**/*",
"./*.config.{mjs,ts}",
"./configs/*.config.{mjs,ts}",
"./src/shared/api/generated/**/*",
"**/migrations/*.ts",
"**/*.generated.ts",
]
},
{
files: ["src/**/*.{ts,tsx}"],
languageOptions: {
parser: tslint.parser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
},
},
plugins: { prettier },
rules: {
"prettier/prettier": [
"error",
{
bracketSameLine: true, // Keep JSX/HTML closing bracket on the same line
arrowParens: "always", // Always wrap arrow function parameters in ()
trailingComma: "all", // Add trailing comma wherever possible
printWidth: 124, // Wrap lines longer than 124 characters
endOfLine: "lf", // Enforce LF (Unix line endings)
tabWidth: 4, // Indent with 4 spaces
semi: true, // Always insert semicolons
}
],
},
}
];
export default prettierConfig;