0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-12 13:50:42 -05:00
server/project/biome.jsonc
Refringe c071702851
Better Random (#972)
This started as a small update.

This pull request includes updates to the `RandomUtil` class to improve
the security and accuracy of random number generation by utilizing the
`node:crypto` module. Additionally, it enhances the documentation and
refactors several methods for clarity and performance.

Includes tests, both before and after the changes.

The only *possible* breaking change is that now the `getKey`,
`getKeyValue`, and `drawRandomFromDict` methods are typed with generics
instead of `any`. I tried to keep them as *generic* as possible, but we
should probably include this in a BE to ensure it doesn't break
anything.

No further changes are planned--Saved as a draft because it's late and I
still want to review.

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2024-12-06 16:25:44 +00:00

86 lines
2.0 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
".editorconfig",
".git/*",
".pkg-cache/*",
".vscode/*",
"build/*",
"node_modules/*",
"obj/*",
"out/*",
"src/services/ModCompilerService.ts",
"tests/__cache__/*",
"tests/__coverage__/*",
"types/*",
"user/mods/*",
"user/profiles/*",
"assets/database/*"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"useImportType": "off"
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"ignore": [
"**/.git",
"**/.pkg-cache",
"**/.vscode",
"**/build",
"**/node_modules",
"**/types",
"**/tests/__cache__",
"**/tests/__coverage__",
"**/.editorconfig"
],
"attributePosition": "auto",
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 120,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"semicolons": "always",
"trailingCommas": "all"
},
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
},
"overrides": [
{
"include": ["tests/*"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off"
}
}
}
}
]
}