ed8dbbd195
Boogidy, boogidy, boogidy. Let's go racing! 🏎️ Removes the over-complicated and super-slow setup we had with ESLint & Prettier in favour of Biome. The largest change with the formatting is moving from Allman braces to 1TBS braces. Other than that, it's *pretty much* the same. Ah, and that Biome runs formatting and linting on the entire project about x10 faster than the old system ran formatting on one file. Seriously, the guy who came up with that last solution should be fired. :runs: I've kept all of the formatting and linting commands the same as before, with the main mamma-jamma being: `npm run format`, which applies formatting and linting changes to the entire project. Formatting-on-save works (quickly!) by (1) ensuring that you're working within the VSC workspace (as you should be), and (2) have the recommended Biome VSC extension installed. The link to the Biome extension is in the README. This limits our options on code formatting going forward; Biome, like prettier, is very opinionated with very few formatting options available. But I see this as a good thing. I'd rather spend my time arguing about which gun in Tarkov is the best, rather than coding brace styles... ...It's the TOZ, and it always will be. Don't DM me. Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/383 Co-authored-by: Refringe <me@refringe.com> Co-committed-by: Refringe <me@refringe.com>
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
{
|
|
"folders": [
|
|
{
|
|
"path": "."
|
|
}
|
|
],
|
|
"settings": {
|
|
"window.title": "SPT Server",
|
|
"editor.formatOnSave": true,
|
|
"editor.defaultFormatter": "biomejs.biome",
|
|
"editor.codeActionsOnSave": {
|
|
"source.organizeImports.biome": "explicit",
|
|
"quickfix.biome": "explicit"
|
|
}
|
|
},
|
|
"extensions": {
|
|
"recommendations": [
|
|
"EditorConfig.EditorConfig", // EditorConfig file support.
|
|
"vitest.explorer", // ViTest test runner.
|
|
"refringe.spt-id-highlighter", // SPT ID information of hover.
|
|
"biomejs.biome" // Biome code formatting, linting, and refactoring.
|
|
]
|
|
},
|
|
"launch": {
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "Debug",
|
|
"type": "node",
|
|
"runtimeVersion": "20.11.1",
|
|
"runtimeExecutable": "npm",
|
|
"request": "launch",
|
|
"sourceMaps": true,
|
|
"runtimeArgs": ["run", "run:debug"],
|
|
"outFiles": ["!**/node_modules/**"],
|
|
"cwd": "${workspaceFolder}",
|
|
"outputCapture": "std"
|
|
},
|
|
{
|
|
"name": "Run Vitest Tests",
|
|
"type": "node",
|
|
"runtimeVersion": "20.11.1",
|
|
"runtimeExecutable": "npm",
|
|
"request": "launch",
|
|
"runtimeArgs": ["run", "test"],
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen"
|
|
}
|
|
]
|
|
}
|
|
}
|