79781ab8bb
This update now runs Prettier before ESLint (with the Stylistic plugin) for code formatting. This takes care of a lot of the edge cases that ESLint doesn't touch by itself. Also adds the `eslint-plugin-unused-imports` ESLint plugin to remove unused imports and the `eslint-plugin-switch-allman` ESLint plugin to enforce Allman braces on case declarations. The VSCode format-on-save function now requires two additional extentions to be installed: Prettier and Format Code Action. Links can be found in the README and in the recommended extentions section of VSCode when the workspace is open. Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/336 Co-authored-by: Refringe <me@refringe.com> Co-committed-by: Refringe <me@refringe.com>
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
{
|
|
"folders": [
|
|
{
|
|
"path": ".",
|
|
},
|
|
],
|
|
"settings": {
|
|
"window.title": "SPT-AKI Server",
|
|
"editor.formatOnSave": false, // We use an extension to format on save.
|
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
"editor.codeActionsOnSave": ["source.formatDocument", "source.fixAll.eslint"],
|
|
"eslint.debug": false,
|
|
"eslint.experimental.useFlatConfig": false,
|
|
},
|
|
"extensions": {
|
|
"recommendations": [
|
|
"EditorConfig.EditorConfig", // EditorConfig file format support.
|
|
"vitest.explorer", // ViTest test runner.
|
|
"refringe.spt-id-highlighter", // Highly SPT IDs.
|
|
"rohit-gohri.format-code-action", // Custom format on save actions.
|
|
"esbenp.prettier-vscode", // Prettier code formatter.
|
|
"dbaeumer.vscode-eslint", // ESLint code linter and formatter.
|
|
],
|
|
},
|
|
"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",
|
|
},
|
|
],
|
|
},
|
|
}
|