Skip to content

Commit 5d3c0a2

Browse files
committed
chore: install biome
replaces eslint and prettier
1 parent 9d3f35f commit 5d3c0a2

5 files changed

Lines changed: 231 additions & 927 deletions

File tree

.prettierrc

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

biome.json

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

eslint.config.js

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

package.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,22 @@
88
"scripts": {
99
"build": "node scripts/build.js",
1010
"watch": "node scripts/build.js --watch",
11-
"prettier": "prettier ./src/**/*.ts --write",
12-
"eslint": "eslint ./src/**/*.ts"
11+
"format": "biome format --write",
12+
"lint": "biome lint --write"
1313
},
14-
"keywords": [
15-
"fivem"
16-
],
14+
"keywords": ["fivem"],
1715
"repository": {
1816
"type": "git",
1917
"url": "https://github.com/unitysync/sync_reports.git"
2018
},
2119
"devDependencies": {
20+
"@biomejs/biome": "^1.9.4",
2221
"@citizenfx/client": "latest",
2322
"@citizenfx/server": "latest",
24-
"@eslint/js": "^9.13.0",
2523
"@overextended/fx-utils": "^0.0.4",
26-
"@types/eslint__js": "^8.42.3",
2724
"@types/node": "^20.17.5",
28-
"@typescript-eslint/eslint-plugin": "^8.12.2",
29-
"@typescript-eslint/parser": "^8.12.2",
3025
"esbuild": "^0.23.1",
31-
"eslint": "^9.22.0",
32-
"prettier": "^3.3.3",
33-
"typescript": "^5.6.3",
34-
"typescript-eslint": "^8.12.2"
26+
"typescript": "^5.6.3"
3527
},
3628
"dependencies": {
3729
"@jgoz/esbuild-plugin-typecheck": "^4.0.2",

0 commit comments

Comments
 (0)