This is the first pass of ESLint on the codebase.
ESLint formatting is less strict when it comes to line-length and line-breaks then dprint/biome, so if you see formatting that you don't like... fix it! It shouldn't require a configuration change.
- This should merge clean into master (when the time comes).
- This will not merge clean into `3.9.0-DEV`, but the conflicts aren't that bad.
The built-in ESLint import settings will lint the imports, but not fix them, as that's concidered stylistic. The ESLint Stylistic package doesn't currently support sorting. We have to use the ESLint Import plugin to force import sorting. This Import plugin doesn't yet support the new ESLint flat-configuration file format so we've had to convert back to the old no-flat format.
Now has a chance to not pick any to remove (default 10%)
Now only removes attachments that are above a rouble price (default 2000)
Stores attachments in a dictionary weighted by rouble price
Picks random amount of attachments to remove and then picks from pool by price, removing items from pool as they're picked
Fixed cases for modded items causing problems with Commando.
Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/325
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.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!
- Added 2 methods that expose the websocket server and each session's websocket
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/321
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
This PR updates a few interfaces and consequently a few functions returned data,
it also handles 2 new routes:
`/client/friend/request/decline`
`/client/friend/request/accept-all`
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/320
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Fixed ragfair memory leak where NPC player ids would continuously get added into the cache map, when those offers expire the entry on the dictionary would be left empty but the string allocation on the key would remain in memory, overtime it would stack up to massive amounts of memory usage
Co-authored-by: clodan <clodan@clodan.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/319
Co-authored-by: Alex <clodan@noreply.dev.sp-tarkov.com>
Co-committed-by: Alex <clodan@noreply.dev.sp-tarkov.com>
This functionality is currently not in use and would be nice to have for mod developers. There have been 'seasonal' quests in the past that had stash rows as a reward but this was never implemented in SPT.
Co-authored-by: acidphantasm <127812106+acidphantasm@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/316
Co-authored-by: acidphantasm <acidphantasm@noreply.dev.sp-tarkov.com>
Co-committed-by: acidphantasm <acidphantasm@noreply.dev.sp-tarkov.com>