Skip to content

Commit 554297d

Browse files
refactor: replace ESLint and Prettier with Biome (#440)
1 parent 9575ee5 commit 554297d

File tree

7 files changed

+439
-2009
lines changed

7 files changed

+439
-2009
lines changed

.eslintrc.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

biome.json

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"ignore": ["node_modules", "dist", "coverage"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"useEditorconfig": true,
15+
"formatWithErrors": false,
16+
"indentStyle": "space",
17+
"indentWidth": 2,
18+
"lineEnding": "lf",
19+
"lineWidth": 80,
20+
"attributePosition": "auto",
21+
"bracketSpacing": true
22+
},
23+
"organizeImports": {
24+
"enabled": false
25+
},
26+
"linter": {
27+
"enabled": true,
28+
"rules": {
29+
"recommended": false,
30+
"complexity": {
31+
"noBannedTypes": "error",
32+
"noUselessTypeConstraint": "error"
33+
},
34+
"correctness": {
35+
"noPrecisionLoss": "error",
36+
"noUnusedVariables": "error",
37+
"useArrayLiterals": "off"
38+
},
39+
"style": {
40+
"noInferrableTypes": "error",
41+
"noNamespace": "error",
42+
"useAsConstAssertion": "error",
43+
"useBlockStatements": "off",
44+
"useConsistentArrayType": "error",
45+
"useForOf": "error",
46+
"useShorthandFunctionType": "error"
47+
},
48+
"suspicious": {
49+
"noEmptyBlockStatements": "error",
50+
"noExplicitAny": "off",
51+
"noExtraNonNullAssertion": "error",
52+
"noMisleadingInstantiator": "error",
53+
"noUnsafeDeclarationMerging": "error",
54+
"useNamespaceKeyword": "error"
55+
}
56+
},
57+
"ignore": ["**/node_modules", "**/dist", "**/.eslintrc.js"]
58+
},
59+
"javascript": {
60+
"formatter": {
61+
"jsxQuoteStyle": "double",
62+
"quoteProperties": "asNeeded",
63+
"trailingCommas": "all",
64+
"semicolons": "always",
65+
"arrowParentheses": "always",
66+
"bracketSameLine": false,
67+
"quoteStyle": "single",
68+
"attributePosition": "auto",
69+
"bracketSpacing": true
70+
},
71+
"parser": {
72+
"unsafeParameterDecoratorsEnabled": true
73+
}
74+
},
75+
"overrides": [
76+
{
77+
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
78+
"linter": {
79+
"rules": {
80+
"correctness": {
81+
"noConstAssign": "off",
82+
"noGlobalObjectCalls": "off",
83+
"noInvalidConstructorSuper": "off",
84+
"noNewSymbol": "off",
85+
"noSetterReturn": "off",
86+
"noUndeclaredVariables": "off",
87+
"noUnreachable": "off",
88+
"noUnreachableSuper": "off"
89+
},
90+
"style": {
91+
"noArguments": "error",
92+
"noVar": "error",
93+
"useConst": "error"
94+
},
95+
"suspicious": {
96+
"noDuplicateClassMembers": "off",
97+
"noDuplicateObjectKeys": "off",
98+
"noDuplicateParameters": "off",
99+
"noFunctionAssign": "off",
100+
"noImportAssign": "off",
101+
"noRedeclare": "off",
102+
"noUnsafeNegation": "off",
103+
"useGetterReturn": "off"
104+
}
105+
}
106+
}
107+
},
108+
{
109+
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
110+
"linter": {
111+
"rules": {
112+
"correctness": {
113+
"noConstAssign": "off",
114+
"noGlobalObjectCalls": "off",
115+
"noInvalidConstructorSuper": "off",
116+
"noNewSymbol": "off",
117+
"noSetterReturn": "off",
118+
"noUndeclaredVariables": "off",
119+
"noUnreachable": "off",
120+
"noUnreachableSuper": "off"
121+
},
122+
"style": {
123+
"noArguments": "error",
124+
"noVar": "error",
125+
"useConst": "error"
126+
},
127+
"suspicious": {
128+
"noDuplicateClassMembers": "off",
129+
"noDuplicateObjectKeys": "off",
130+
"noDuplicateParameters": "off",
131+
"noFunctionAssign": "off",
132+
"noImportAssign": "off",
133+
"noRedeclare": "off",
134+
"noUnsafeNegation": "off",
135+
"useGetterReturn": "off"
136+
}
137+
}
138+
}
139+
}
140+
]
141+
}

nest-cli.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"sourceRoot": "src",
55
"compilerOptions": {
66
"deleteOutDir": true,
7-
"plugins": [
8-
"@nestjs/swagger"
9-
]
7+
"plugins": ["@nestjs/swagger"]
108
}
119
}

0 commit comments

Comments
 (0)