Skip to content

Commit 5e3b910

Browse files
authored
chore: improve lint rules (#1175)
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
1 parent 6d3d016 commit 5e3b910

12 files changed

Lines changed: 275 additions & 216 deletions

File tree

biome.jsonc

Lines changed: 94 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
33
"files": {
44
"ignoreUnknown": true,
55
"includes": [
@@ -26,10 +26,64 @@
2626
"linter": {
2727
"enabled": true,
2828
"rules": {
29-
"recommended": false,
29+
"preset": "none",
30+
"complexity": {
31+
"noArguments": "error",
32+
"noCommaOperator": "error",
33+
"noEmptyTypeParameters": "error",
34+
"noExtraBooleanCast": "error",
35+
"noFlatMapIdentity": "error",
36+
"noUselessCatch": "error",
37+
"noUselessConstructor": "error",
38+
"noUselessContinue": "error",
39+
"noUselessEmptyExport": "error",
40+
"noUselessLabel": "error",
41+
"noUselessLoneBlockStatements": "error",
42+
"noUselessRename": "error",
43+
"noUselessStringConcat": "error",
44+
"noUselessSwitchCase": "error",
45+
"noUselessTernary": "error",
46+
"noUselessThisAlias": "error",
47+
"noUselessTypeConstraint": "error",
48+
"useDateNow": "error",
49+
"useFlatMap": "error",
50+
"useIndexOf": "error",
51+
"useRegexLiterals": "error"
52+
},
3053
"correctness": {
54+
"noConstAssign": "error",
55+
"noConstantCondition": "error",
56+
"noConstantMathMinMaxClamp": "error",
57+
"noDuplicateArgumentNames": "error",
58+
"noDuplicateEnumValueNames": "error",
59+
"noDuplicateVariableNames": "error",
60+
"noEmptyCharacterClassInRegex": "error",
61+
"noEmptyPattern": "error",
62+
"noGlobalObjectCalls": "error",
63+
"noInnerDeclarations": "error",
64+
"noInvalidBuiltinInstantiation": "error",
65+
"noInvalidConstructorSuper": "error",
66+
"noInvalidUseBeforeDeclaration": "error",
67+
"noNonoctalDecimalEscape": "error",
68+
"noSelfAssign": "error",
69+
"noSetterReturn": "error",
70+
"noSwitchDeclarations": "error",
71+
"noUnreachable": "error",
72+
"noUnreachableSuper": "error",
73+
"noUnsafeFinally": "error",
74+
"noUnsafeOptionalChaining": "error",
75+
"noUnusedLabels": "error",
3176
"noUnusedImports": "error",
32-
"noUnusedVariables": "error"
77+
"noUnusedVariables": "error",
78+
"noVoidTypeReturn": "error",
79+
"useIsNan": "error",
80+
"useValidTypeof": "error"
81+
},
82+
"performance": {
83+
"noAccumulatingSpread": "error"
84+
},
85+
"security": {
86+
"noGlobalEval": "error"
3387
},
3488
"style": {
3589
"noCommonJs": "error",
@@ -39,16 +93,51 @@
3993
"suspicious": {
4094
"noAssignInExpressions": "error",
4195
"noAsyncPromiseExecutor": "error",
96+
"noCompareNegZero": "error",
97+
"noConstantBinaryExpressions": "error",
98+
"noControlCharactersInRegex": "error",
99+
"noDebugger": "error",
42100
"noDoubleEquals": "error",
101+
"noDuplicateCase": "error",
102+
"noDuplicateClassMembers": "error",
103+
"noDuplicateElseIf": "error",
104+
"noDuplicateObjectKeys": "error",
105+
"noDuplicateParameters": "error",
43106
"noExplicitAny": "error",
107+
"noExtraNonNullAssertion": "error",
108+
"noFallthroughSwitchClause": "error",
44109
"noFocusedTests": "error",
110+
"noFunctionAssign": "error",
111+
"noGlobalAssign": "error",
112+
"noGlobalIsFinite": "error",
45113
"noImplicitAnyLet": "error",
114+
"noImportAssign": "error",
115+
"noIrregularWhitespace": "error",
116+
"noMisleadingCharacterClass": "error",
117+
"noMisrefactoredShorthandAssign": "error",
118+
"noNonNullAssertedOptionalChain": "error",
119+
"noOctalEscape": "error",
120+
"noProto": "error",
121+
"noRedeclare": "error",
122+
"noReturnAssign": "error",
123+
"noSelfCompare": "error",
46124
"noShadowRestrictedNames": "error",
47-
"noTsIgnore": "error"
125+
"noSkippedTests": "error",
126+
"noSparseArray": "error",
127+
"noTemplateCurlyInString": "error",
128+
"noThenProperty": "error",
129+
"noTsIgnore": "error",
130+
"noUnsafeDeclarationMerging": "error",
131+
"noUnsafeNegation": "error",
132+
"noUnusedExpressions": "error",
133+
"noVar": "error",
134+
"noWith": "error"
48135
},
49136
"nursery": {
50137
"noFloatingPromises": "error",
51-
"noUnnecessaryConditions": "error"
138+
"noImpliedEval": "error",
139+
"noUnsafePlusOperands": "error",
140+
"useExhaustiveSwitchCases": "error"
52141
}
53142
}
54143
},

0 commit comments

Comments
 (0)