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>
# Conflicts:
# project/src/callbacks/GameCallbacks.ts
# project/src/callbacks/MatchCallbacks.ts
# project/src/routers/static/GameStaticRouter.ts
Resolved by Refringe
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>
- Drops DPrint
- Drops Biome
- Adds ESList Stylistic
- Updates ESLint config to new FlatConfig format
- Removed the `dprint.dprint` and `biomejs.biome` VSC extentions from the recommendations list
- Updates README to reflect all the above changes
TODO: Import sorting & minor fixes after `npm run lint:fix`.
Curse you, Alex!
- Updates the Server project README to include additional information about installation, development, and contribuation guidelines.
- Moves the feature list to a dedicated FEATURE.md file (linked from the README.md).
- Reviewed the FEATURES.md file to clean it up a little bit.
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/306
Co-authored-by: Refringe <me@refringe.com>
Co-committed-by: Refringe <me@refringe.com>
Updates many of the out of date npm packages and brings us up to Node v20 LTS. :D
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/260
Co-authored-by: Refringe <me@refringe.com>
Co-committed-by: Refringe <me@refringe.com>