From afda0d525511f1a66df68e5e11a4f6ff67d35dcb Mon Sep 17 00:00:00 2001 From: Refringe Date: Mon, 22 Jul 2024 21:15:57 +0000 Subject: [PATCH] Adds Biome - Removes ESLint & Prettier (!383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/383 Co-authored-by: Refringe Co-committed-by: Refringe # Conflicts: # project/src/callbacks/GameCallbacks.ts # project/src/callbacks/MatchCallbacks.ts # project/src/routers/static/GameStaticRouter.ts Resolved by Refringe --- README.md | 52 ++++---- project/.eslintignore | 15 --- project/.eslintrc.json | 118 ------------------ project/.prettierignore | 10 -- project/.prettierrc | 3 - project/Server.code-workspace | 35 +++--- project/biome.jsonc | 61 +++++++++ project/gulpfile.mjs | 1 - project/package.json | 25 +--- project/src/callbacks/AchievementCallbacks.ts | 2 - project/src/callbacks/BuildsCallbacks.ts | 5 - project/src/callbacks/DataCallbacks.ts | 2 - project/src/callbacks/DialogueCallbacks.ts | 15 --- project/src/callbacks/GameCallbacks.ts | 1 - project/src/callbacks/MatchCallbacks.ts | 19 --- project/src/callbacks/NotifierCallbacks.ts | 4 - project/src/controllers/DialogueController.ts | 2 - project/src/controllers/HealthController.ts | 4 - project/src/controllers/HideoutController.ts | 2 - project/src/controllers/MatchController.ts | 3 - project/src/controllers/QuestController.ts | 1 - project/src/controllers/TradeController.ts | 3 - project/src/generators/BotLootGenerator.ts | 2 - project/src/generators/BotWeaponGenerator.ts | 1 - .../ExternalInventoryMagGen.ts | 1 - project/src/helpers/HttpServerHelper.ts | 1 - project/src/helpers/InventoryHelper.ts | 1 - project/src/helpers/ItemHelper.ts | 1 - project/src/loaders/PostDBModLoader.ts | 1 - project/src/loaders/PostSptModLoader.ts | 1 - project/src/loaders/PreSptModLoader.ts | 1 - project/src/models/eft/common/IGlobals.ts | 1 - .../src/models/eft/common/ILocationBase.ts | 1 - .../src/models/eft/common/tables/IBotCore.ts | 1 - .../src/models/eft/common/tables/IBotType.ts | 1 - .../eft/common/tables/IProfileTemplate.ts | 2 - .../models/eft/common/tables/ITemplateItem.ts | 4 - .../src/models/eft/common/tables/ITrader.ts | 1 - .../models/eft/dialog/IDeleteFriendRequest.ts | 1 - .../models/eft/game/IGameConfigResponse.ts | 1 - .../models/eft/game/IGameKeepAliveResponse.ts | 1 - .../src/models/eft/game/IGameStartResponse.ts | 1 - .../eft/inventory/IAddItemRequestData.ts | 1 - .../src/models/eft/match/ISessionStatus.ts | 1 - project/src/models/eft/notifier/INotifier.ts | 1 - .../profile/GetProfileStatusResponseData.ts | 1 - .../eft/trade/IProcessBuyTradeRequestData.ts | 1 - .../eft/trade/IProcessSellTradeRequestData.ts | 1 - .../src/models/eft/weather/IWeatherData.ts | 4 - project/src/models/eft/ws/IWsUserConfirmed.ts | 1 - project/src/models/enums/QuestStatus.ts | 1 - project/src/models/external/HttpFramework.ts | 1 - .../src/models/spt/config/ILocationConfig.ts | 2 - .../spt/fence/ICreateFenceAssortsResult.ts | 2 - project/src/models/spt/server/ILocations.ts | 1 - .../routers/static/AchievementStaticRouter.ts | 2 - .../src/routers/static/BuildStaticRouter.ts | 5 - .../src/routers/static/GameStaticRouter.ts | 1 - .../src/routers/static/MatchStaticRouter.ts | 1 - .../src/routers/static/ProfileStaticRouter.ts | 1 - .../src/routers/static/RagfairStaticRouter.ts | 7 -- project/src/servers/http/SptHttpListener.ts | 1 - project/src/services/ModCompilerService.ts | 1 - .../tools/ItemTplGenerator/itemOverrides.ts | 1 - project/src/utils/AsyncQueue.ts | 1 - project/src/utils/ImporterUtil.ts | 2 - .../utils/logging/AbstractWinstonLogger.ts | 1 - .../controllers/HealthController.test.ts | 1 - .../controllers/InsuranceController.test.ts | 1 - project/tests/services/PaymentService.test.ts | 1 - project/tests/services/PlayerService.test.ts | 1 - .../services/RagfairPriceService.test.ts | 1 - 72 files changed, 109 insertions(+), 346 deletions(-) delete mode 100644 project/.eslintignore delete mode 100644 project/.eslintrc.json delete mode 100644 project/.prettierignore delete mode 100644 project/.prettierrc create mode 100644 project/biome.jsonc diff --git a/README.md b/README.md index 25b1c3d1..1fee903a 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,7 @@ There are a number of VSC extensions that we recommended for this project. VSC w - [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - Editor Settings Synchronization - [Vitest](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) - Debugging Tests - [SPT ID Highlighter](https://marketplace.visualstudio.com/items?itemName=refringe.spt-id-highlighter) - Converts IDs to Names -- [Format Code Action](https://marketplace.visualstudio.com/items?itemName=rohit-gohri.format-code-action) - Custom Format-on-save Actions -- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - Code Formatting -- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Linting for Coding Issues & Naming Conventions +- [Biome](https://marketplace.visualstudio.com/items?itemName=biomejs.biome) - Automatic Formatting & Code Standards Linting ### Initial Setup @@ -53,27 +51,27 @@ To prepare the project for development you will need to: The following commands are available after the initial setup. Run them with `npm run `. -| Command | Description | -| -------------------- | ----------------------------------------------------------------------------- | -| `check:circular` | Check for circular dependencies in the project. | -| `lint` | Check the project for coding standards and post-Prettier formatting issues. | -| `lint:fix` | Automatically fix coding standard issues and post-Prettier formatting issues. | -| `style` | Check the project for coding standards and post-Prettier formatting issues. | -| `style:fix` | Automatically fix coding standard issues and post-Prettier formatting issues. | -| `format` | Run Prettier and then ESLint Stylistic to fix code formatting. | -| `test` | Run all tests. | -| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. | -| `test:coverage` | Run tests and generate a coverage report. | -| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. | -| `build:release` | Build the project for release. | -| `build:debug` | Build the project for debugging. | -| `build:bleeding` | Build the project on the bleeding edge. | -| `build:bleedingmods` | Build the project on the bleeding edge with mods. | -| `run:build` | Run the project in build mode. | -| `run:debug` | Run the project in debug mode. | -| `run:profiler` | Run the project in profiler mode. | -| `gen:types` | Generate types for the project. | -| `gen:docs` | Generate documentation for the project. | +| Command | Description | +| -------------------- | ------------------------------------------------------------------------- | +| `check:circular` | Check for circular dependencies in the project. | +| `lint` | Check the project for coding standards issues using Biome. | +| `lint:fix` | Automatically fix coding standards issues using Biome. | +| `style` | Check the project for formatting issues using Biome. | +| `style:fix` | Automatically fix formatting issues using Biome. | +| `format` | Automatically fix all coding standards and formatting issues using Biome. | +| `test` | Run all tests. | +| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. | +| `test:coverage` | Run tests and generate a coverage report. | +| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. | +| `build:release` | Build the project for release. | +| `build:debug` | Build the project for debugging. | +| `build:bleeding` | Build the project on the bleeding edge. | +| `build:bleedingmods` | Build the project on the bleeding edge with mods. | +| `run:build` | Run the project in build mode. | +| `run:debug` | Run the project in debug mode. | +| `run:profiler` | Run the project in profiler mode. | +| `gen:types` | Generate types for the project. | +| `gen:docs` | Generate documentation for the project. | ### Debugging @@ -91,9 +89,9 @@ We're really excited that you're interested in contributing! Before submitting y - **master** The default branch used for the latest stable release. This branch is protected and typically is only merges with release branches. -- **3.9.0-DEV** +- **3.9.4-DEV** Development for the next minor release of SPT. Minor releases target the latest version of EFT. Late in the minor release cycle the EFT version is frozen for stability to prepare for release. Larger changes to the project structure may be included in minor releases. -- **3.8.4-DEV** +- **3.10.0-DEV** Development for the next hotfix release of SPT. Hotfix releases include bug fixes and minor features that do not effect the coding structure of the project. Special care is taken to not break server mod stability. These always target the same version of EFT as the last minor release. ### Pull Request Guidelines @@ -111,7 +109,7 @@ We're really excited that you're interested in contributing! Before submitting y ### Style Guide -We use a combination of Prettier and ESLint Stylistic to enforce a consistent code style. Please run `npm run format` before submitting your changes. This is made easier by using the recommended VSC extensions to automatically format your code whenever you save a file. +We use Biome to enforce a consistent code style. Please run `npm run format` before submitting any changes. This is made easier by opening the VSC workspace and installing the recommended VSC extensions; this will ensure that your code is automatically formatted whenever you save a file. ### Tests diff --git a/project/.eslintignore b/project/.eslintignore deleted file mode 100644 index 607008c7..00000000 --- a/project/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -# Exclude these folders from linting -node_modules/ -out/ -obj/ -build/ -types/ -user/mods/ - -# Exclude these filetypes from linting -*.json -*.png -*.ico -*.jpg -*.txt -*.exe diff --git a/project/.eslintrc.json b/project/.eslintrc.json deleted file mode 100644 index f69b3c19..00000000 --- a/project/.eslintrc.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:@stylistic/recommended-extends", - "plugin:import/recommended", - "plugin:import/typescript", - "prettier" - ], - "plugins": ["@typescript-eslint", "@stylistic", "import", "unused-imports", "switch-allman"], - "settings": { - "import/resolver": { - "typescript": { - "project": "tsconfig.json" - }, - "node": { - "extensions": [".ts", ".mjs"] - } - } - }, - "rules": { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-dynamic-delete": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/explicit-module-boundary-types": [ - "error", - { - "allowArgumentsExplicitlyTypedAsAny": true - } - ], - "@typescript-eslint/naming-convention": [ - "error", - { - "selector": "default", - "format": ["camelCase"], - "leadingUnderscore": "allow" - }, - { - "selector": "typeLike", - "format": ["PascalCase"] - }, - { - "selector": "objectLiteralProperty", - "format": ["PascalCase", "camelCase", "snake_case"], - "leadingUnderscore": "allow" - }, - { - "selector": "typeProperty", - "format": ["PascalCase", "camelCase"], - "leadingUnderscore": "allow" - }, - { - "selector": "enumMember", - "format": ["UPPER_CASE"] - }, - { - "selector": "property", - "modifiers": ["readonly", "static"], - "format": ["UPPER_CASE"] - } - ], - "@stylistic/indent": ["error", 4, { "MemberExpression": 1, "SwitchCase": 1 }], - "@stylistic/brace-style": ["error", "allman", { "allowSingleLine": false }], - "@stylistic/semi": ["error", "always"], - "@stylistic/quotes": ["error", "double", { "avoidEscape": true }], - "@stylistic/operator-linebreak": ["error", "before"], - "@stylistic/arrow-parens": ["error", "always"], - "@stylistic/max-len": [ - "warn", - { - "code": 121, // +1 to prevent conflicts with Prettier rule. - "tabWidth": 4, - "ignoreComments": true, - "ignoreTrailingComments": true, - "ignoreUrls": true, - "ignoreStrings": true, - "ignoreTemplateLiterals": true, - "ignoreRegExpLiterals": true - } - ], - "@stylistic/multiline-ternary": ["error", "always-multiline"], - "import/order": [ - "error", - { - "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], - "pathGroups": [ - { - "pattern": "tsyringe", - "group": "builtin", - "position": "before" - } - ], - "newlines-between": "never", - "alphabetize": { - "order": "asc", - "caseInsensitive": true - } - } - ], - "unused-imports/no-unused-imports-ts": "error", - "switch-allman/case-allman": "error" - }, - "overrides": [ - { - "files": ["src/di/**/*.ts"], - "rules": { - "@typescript-eslint/no-extraneous-class": "off" - } - }, - { - "files": ["src/loaders/**/*.ts"], - "rules": { - "@typescript-eslint/no-var-requires": "off" - } - } - ] -} diff --git a/project/.prettierignore b/project/.prettierignore deleted file mode 100644 index 7b79a188..00000000 --- a/project/.prettierignore +++ /dev/null @@ -1,10 +0,0 @@ -**/.git -**/.pkg-cache -**/.vscode -**/build -**/node_modules -**/types -**/tests/__cache__ -**/tests/__coverage__ -.editorconfig -src/services/ModCompilerService.ts diff --git a/project/.prettierrc b/project/.prettierrc deleted file mode 100644 index 04ff7639..00000000 --- a/project/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "quoteProps": "consistent" -} diff --git a/project/Server.code-workspace b/project/Server.code-workspace index 74be53e7..d08a659d 100644 --- a/project/Server.code-workspace +++ b/project/Server.code-workspace @@ -1,26 +1,25 @@ { "folders": [ { - "path": ".", - }, + "path": "." + } ], "settings": { "window.title": "SPT 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, + "editor.formatOnSave": true, + "editor.defaultFormatter": "biomejs.biome", + "editor.codeActionsOnSave": { + "source.organizeImports.biome": "explicit", + "quickfix.biome": "explicit" + } }, "extensions": { "recommendations": [ - "EditorConfig.EditorConfig", // EditorConfig file format support. + "EditorConfig.EditorConfig", // EditorConfig file 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. - ], + "refringe.spt-id-highlighter", // SPT ID information of hover. + "biomejs.biome" // Biome code formatting, linting, and refactoring. + ] }, "launch": { "version": "0.2.0", @@ -35,7 +34,7 @@ "runtimeArgs": ["run", "run:debug"], "outFiles": ["!**/node_modules/**"], "cwd": "${workspaceFolder}", - "outputCapture": "std", + "outputCapture": "std" }, { "name": "Run Vitest Tests", @@ -45,8 +44,8 @@ "request": "launch", "runtimeArgs": ["run", "test"], "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen", - }, - ], - }, + "internalConsoleOptions": "neverOpen" + } + ] + } } diff --git a/project/biome.jsonc b/project/biome.jsonc new file mode 100644 index 00000000..ccf70bf7 --- /dev/null +++ b/project/biome.jsonc @@ -0,0 +1,61 @@ +{ + "$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/*" + ] + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "style": { + "useImportType": "off" + } + } + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "ignore": [], + "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" + } + } +} diff --git a/project/gulpfile.mjs b/project/gulpfile.mjs index 87ebc381..fa1d1617 100644 --- a/project/gulpfile.mjs +++ b/project/gulpfile.mjs @@ -9,7 +9,6 @@ import download from "gulp-download"; import { exec } from "gulp-execa"; import rename from "gulp-rename"; import minimist from "minimist"; -// eslint-disable-next-line @typescript-eslint/naming-convention import * as ResEdit from "resedit"; import manifest from "./package.json" assert { type: "json" }; diff --git a/project/package.json b/project/package.json index cbd8c70f..a7b4a20b 100644 --- a/project/package.json +++ b/project/package.json @@ -12,11 +12,11 @@ }, "scripts": { "check:circular": "madge --circular --ts-config tsconfig.json --extensions ts ./src/", - "lint": "eslint src", - "lint:fix": "eslint src --fix", - "style": "prettier src --check", - "style:fix": "prettier src --write", - "format": "npm run style:fix && npm run lint:fix", + "lint": "npx @biomejs/biome lint ./", + "lint:fix": "npx @biomejs/biome lint --write ./", + "style": "npx @biomejs/biome format ./", + "style:fix": "npx @biomejs/biome format --write ./", + "format": "npx @biomejs/biome check --write ./", "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", @@ -53,9 +53,8 @@ "ws": "~8.17" }, "devDependencies": { - "@eslint/js": "~9.2", + "@biomejs/biome": "1.8.3", "@pnpm/exe": "8.15.4", - "@stylistic/eslint-plugin": "~1.8", "@swc/cli": "~0.3", "@swc/core": "~1.4", "@types/i18n": "~0.13", @@ -63,20 +62,11 @@ "@types/proper-lockfile": "~4.1", "@types/semver": "~7.5", "@types/ws": "~8.5", - "@typescript-eslint/eslint-plugin": "~7.11", - "@typescript-eslint/parser": "~7.11", "@vitest/coverage-istanbul": "~1.6", "@vitest/ui": "~1.6", "@yao-pkg/pkg": "5.11.5", "@yao-pkg/pkg-fetch": "3.5.9", "cross-env": "~7.0", - "eslint": "~8.57", - "eslint-config-prettier": "~9.1", - "eslint-import-resolver-typescript": "~3.6", - "eslint-plugin-import": "~2.29", - "eslint-plugin-prettier": "~5.1", - "eslint-plugin-switch-allman": "~1.0", - "eslint-plugin-unused-imports": "~3.2", "fs-extra": "~11.2", "gulp": "~4.0", "gulp-decompress": "~3.0", @@ -85,14 +75,11 @@ "gulp-rename": "~2.0", "madge": "~6.1", "minimist": "~1.2", - "prettier": "~3.3", "resedit": "~2.0", "ts-node-dev": "~2.0", "tsconfig-paths": "~4.2", - "tslint-config-prettier": "~1.18", "typedoc": "~0.25", "typemoq": "~2.1", - "typescript-eslint": "~7.11", "vitest": "~1.6" }, "targets": { diff --git a/project/src/callbacks/AchievementCallbacks.ts b/project/src/callbacks/AchievementCallbacks.ts index a760472a..960666e6 100644 --- a/project/src/callbacks/AchievementCallbacks.ts +++ b/project/src/callbacks/AchievementCallbacks.ts @@ -20,7 +20,6 @@ export class AchievementCallbacks /** * Handle client/achievement/list */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getAchievements( url: string, info: IEmptyRequestData, @@ -33,7 +32,6 @@ export class AchievementCallbacks /** * Handle client/achievement/statistic */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public statistic( url: string, info: IEmptyRequestData, diff --git a/project/src/callbacks/BuildsCallbacks.ts b/project/src/callbacks/BuildsCallbacks.ts index f8585a28..10813db1 100644 --- a/project/src/callbacks/BuildsCallbacks.ts +++ b/project/src/callbacks/BuildsCallbacks.ts @@ -21,7 +21,6 @@ export class BuildsCallbacks /** * Handle client/builds/list */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getBuilds(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody(this.buildController.getUserBuilds(sessionID)); @@ -30,7 +29,6 @@ export class BuildsCallbacks /** * Handle client/builds/magazine/save */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public createMagazineTemplate(url: string, request: ISetMagazineRequest, sessionID: string): INullResponseData { this.buildController.createMagazineTemplate(sessionID, request); @@ -41,7 +39,6 @@ export class BuildsCallbacks /** * Handle client/builds/weapon/save */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public setWeapon(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData { this.buildController.saveWeaponBuild(sessionID, info); @@ -52,7 +49,6 @@ export class BuildsCallbacks /** * Handle client/builds/equipment/save */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public setEquipment(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData { this.buildController.saveEquipmentBuild(sessionID, info); @@ -63,7 +59,6 @@ export class BuildsCallbacks /** * Handle client/builds/delete */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public deleteBuild(url: string, info: IRemoveBuildRequestData, sessionID: string): INullResponseData { this.buildController.removeBuild(sessionID, info); diff --git a/project/src/callbacks/DataCallbacks.ts b/project/src/callbacks/DataCallbacks.ts index 7f83a9b4..24fb67ba 100644 --- a/project/src/callbacks/DataCallbacks.ts +++ b/project/src/callbacks/DataCallbacks.ts @@ -222,11 +222,9 @@ export class DataCallbacks supplyNextTime: this.traderHelper.getNextUpdateTimestamp(traderId), prices: handbookPrices, currencyCourses: { - /* eslint-disable @typescript-eslint/naming-convention */ "5449016a4bdc2d6f028b456f": handbookPrices[Money.ROUBLES], "569668774bdc2da2298b4568": handbookPrices[Money.EUROS], "5696686a4bdc2da3298b456a": handbookPrices[Money.DOLLARS], - /* eslint-enable @typescript-eslint/naming-convention */ }, }; diff --git a/project/src/callbacks/DialogueCallbacks.ts b/project/src/callbacks/DialogueCallbacks.ts index 15001d43..734cddcb 100644 --- a/project/src/callbacks/DialogueCallbacks.ts +++ b/project/src/callbacks/DialogueCallbacks.ts @@ -40,7 +40,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil"; @injectable() export class DialogueCallbacks implements OnUpdate { - // eslint-disable-next-line @typescript-eslint/no-unused-vars constructor( @inject("HashUtil") protected hashUtil: HashUtil, @inject("TimeUtil") protected timeUtil: TimeUtil, @@ -66,7 +65,6 @@ export class DialogueCallbacks implements OnUpdate * Handle client/chatServer/list * @returns IChatServer[] */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getChatServerList( url: string, info: IGetChatServerListRequestData, @@ -171,7 +169,6 @@ export class DialogueCallbacks implements OnUpdate } /** Handle client/friend/request/list/outbox */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody([]); @@ -180,7 +177,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/list/inbox */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody([]); @@ -189,7 +185,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/send */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public sendFriendRequest( url: string, request: IFriendRequestData, @@ -202,7 +197,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/accept-all */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public acceptAllFriendRequests(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); @@ -211,7 +205,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/accept */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public acceptFriendRequest( url: string, request: IAcceptFriendRequestData, @@ -224,7 +217,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/decline */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public declineFriendRequest( url: string, request: IDeclineFriendRequestData, @@ -237,7 +229,6 @@ export class DialogueCallbacks implements OnUpdate /** * Handle client/friend/request/cancel */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public cancelFriendRequest( url: string, request: ICancelFriendRequestData, @@ -248,33 +239,28 @@ export class DialogueCallbacks implements OnUpdate } /** Handle client/friend/delete */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } /** Handle client/friend/ignore/set */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } /** Handle client/friend/ignore/remove */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData { return this.httpResponse.emptyArrayResponse(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData { return this.httpResponse.emptyArrayResponse(); @@ -308,7 +294,6 @@ export class DialogueCallbacks implements OnUpdate throw new Error("Method not implemented."); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public async onUpdate(timeSinceLastRun: number): Promise { this.dialogueController.update(); diff --git a/project/src/callbacks/GameCallbacks.ts b/project/src/callbacks/GameCallbacks.ts index 82048e2d..de6d2f99 100644 --- a/project/src/callbacks/GameCallbacks.ts +++ b/project/src/callbacks/GameCallbacks.ts @@ -172,7 +172,6 @@ export class GameCallbacks implements OnLoad * Handle singleplayer/settings/getRaidTime * @returns string */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): IGetRaidTimeResponse { return this.httpResponse.noBody(this.gameController.getRaidTime(sessionID, request)); diff --git a/project/src/callbacks/MatchCallbacks.ts b/project/src/callbacks/MatchCallbacks.ts index a8b3e1a9..b4738d1a 100644 --- a/project/src/callbacks/MatchCallbacks.ts +++ b/project/src/callbacks/MatchCallbacks.ts @@ -33,21 +33,18 @@ export class MatchCallbacks {} /** Handle client/match/updatePing */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } // Handle client/match/exit - // eslint-disable-next-line @typescript-eslint/no-unused-vars public exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } /** Handle client/match/group/exit_from_menu */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); @@ -62,20 +59,17 @@ export class MatchCallbacks return this.httpResponse.getBody({ squad: [] }); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } /** Handle client/match/group/invite/send */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public sendGroupInvite( url: string, info: IMatchGroupInviteSendRequest, @@ -86,7 +80,6 @@ export class MatchCallbacks } /** Handle client/match/group/invite/accept */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public acceptGroupInvite( url: string, info: IRequestIdRequest, @@ -94,28 +87,24 @@ export class MatchCallbacks ): IGetBodyResponseData { const result = []; - // eslint-disable-next-line strict-null-checks/all result.push({}); return this.httpResponse.getBody(result); } /** Handle client/match/group/invite/decline */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData { return this.httpResponse.getBody(true); } /** Handle client/match/group/invite/cancel */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody(true); } /** Handle client/match/group/transfer */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public transferGroup( url: string, info: IMatchGroupTransferRequest, @@ -126,7 +115,6 @@ export class MatchCallbacks } /** Handle client/match/group/invite/cancel-all */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public cancelAllGroupInvite( url: string, info: IEmptyRequestData, @@ -137,14 +125,12 @@ export class MatchCallbacks } /** @deprecated - not called on raid start/end or game start/exit */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData { return this.httpResponse.nullResponse(); } // Handle client/match/available - // eslint-disable-next-line @typescript-eslint/no-unused-vars public serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData { const output = this.matchController.getEnabled(); @@ -163,7 +149,6 @@ export class MatchCallbacks } /** Handle client/getMetricsConfig */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody(this.jsonUtil.serialize(this.databaseService.getMatch().metrics)); @@ -174,7 +159,6 @@ export class MatchCallbacks * Handle client/match/group/status * @returns */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getGroupStatus( url: string, info: IMatchGroupStatusRequest, @@ -185,7 +169,6 @@ export class MatchCallbacks } /** Handle client/match/group/delete */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { this.matchController.deleteGroup(info); @@ -193,14 +176,12 @@ export class MatchCallbacks } // Handle client/match/group/leave - // eslint-disable-next-line @typescript-eslint/no-unused-vars public leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody(true); } /** Handle client/match/group/player/remove */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public removePlayerFromGroup( url: string, info: IMatchGroupPlayerRemoveRequest, diff --git a/project/src/callbacks/NotifierCallbacks.ts b/project/src/callbacks/NotifierCallbacks.ts index f7f8d58d..3eb9ab73 100644 --- a/project/src/callbacks/NotifierCallbacks.ts +++ b/project/src/callbacks/NotifierCallbacks.ts @@ -26,7 +26,6 @@ export class NotifierCallbacks * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public sendNotification(sessionID: string, req: any, resp: any, data: any): void { const splittedUrl = req.url.split("/"); @@ -45,7 +44,6 @@ export class NotifierCallbacks /** Handle push/notifier/get */ /** Handle push/notifier/getwebsocket */ // TODO: removed from client? - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData { return this.httpResponse.emptyArrayResponse(); @@ -65,7 +63,6 @@ export class NotifierCallbacks * Handle client/game/profile/select * @returns ISelectProfileResponse */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public selectProfile( url: string, info: IUIDRequestData, @@ -75,7 +72,6 @@ export class NotifierCallbacks return this.httpResponse.getBody({ status: "ok" }); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public notify(url: string, info: any, sessionID: string): string { return "NOTIFY"; diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 2e0ae4ba..e5e5f88c 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -70,7 +70,6 @@ export class DialogueController * Handle client/friend/list * @returns IGetFriendListDataResponse */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getFriendList(sessionID: string): IGetFriendListDataResponse { // Force a fake friend called SPT into friend list @@ -379,7 +378,6 @@ export class DialogueController } /** client/mail/msg/send */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public sendMessage(sessionId: string, request: ISendMessageRequest): string { this.mailSendService.sendPlayerMessageToNpc(sessionId, request.dialogId, request.text); diff --git a/project/src/controllers/HealthController.ts b/project/src/controllers/HealthController.ts index 781837af..6b5f1b45 100644 --- a/project/src/controllers/HealthController.ts +++ b/project/src/controllers/HealthController.ts @@ -172,13 +172,10 @@ export class HealthController const payMoneyRequest: IProcessBuyTradeRequestData = { Action: healthTreatmentRequest.Action, tid: Traders.THERAPIST, - // eslint-disable-next-line @typescript-eslint/naming-convention scheme_items: healthTreatmentRequest.items, type: "", - // eslint-disable-next-line @typescript-eslint/naming-convention item_id: "", count: 0, - // eslint-disable-next-line @typescript-eslint/naming-convention scheme_id: 0, }; @@ -230,7 +227,6 @@ export class HealthController * @param info Request data * @param sessionID */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void { // https://dev.sp-tarkov.com/SPT/Server/issues/2674 diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index b32a50ad..8b90f929 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -1150,7 +1150,6 @@ export class HideoutController * @param sessionId Session id * @returns IQteData array */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getQteList(sessionId: string): IQteData[] { return this.databaseService.getHideout().qte; @@ -1163,7 +1162,6 @@ export class HideoutController * @param pmcData Profile to adjust * @param request QTE result object */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public handleQTEEventOutcome( sessionId: string, pmcData: IPmcData, diff --git a/project/src/controllers/MatchController.ts b/project/src/controllers/MatchController.ts index 816a7f04..4ab32487 100644 --- a/project/src/controllers/MatchController.ts +++ b/project/src/controllers/MatchController.ts @@ -75,7 +75,6 @@ export class MatchController } /** Handle match/group/start_game */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse { const output: IProfileStatusResponse = { maxPveCountExceeded: false, profiles: [] }; @@ -93,7 +92,6 @@ export class MatchController raidMode: "Online", mode: "deathmatch", shortId: undefined, - // eslint-disable-next-line @typescript-eslint/naming-convention additional_info: undefined, }); @@ -101,7 +99,6 @@ export class MatchController } /** Handle client/match/group/status */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars public getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse { return { players: [], maxPveCountExceeded: false }; diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index d2081e85..f38be134 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -665,7 +665,6 @@ export class QuestController startTime: 0, status: QuestStatus.AvailableAfter, statusTimers: { - // eslint-disable-next-line @typescript-eslint/naming-convention 9: this.timeUtil.getTimestamp(), }, availableAfter: availableAfterTimestamp, diff --git a/project/src/controllers/TradeController.ts b/project/src/controllers/TradeController.ts index 3aa369cb..9f81f326 100644 --- a/project/src/controllers/TradeController.ts +++ b/project/src/controllers/TradeController.ts @@ -212,12 +212,9 @@ export class TradeController Action: "TradingConfirm", type: "buy_from_ragfair", tid: "ragfair", - // eslint-disable-next-line @typescript-eslint/naming-convention item_id: fleaOffer._id, // Store ragfair offerId in buyRequestData.item_id count: requestOffer.count, - // eslint-disable-next-line @typescript-eslint/naming-convention scheme_id: 0, - // eslint-disable-next-line @typescript-eslint/naming-convention scheme_items: requestOffer.items, }; diff --git a/project/src/generators/BotLootGenerator.ts b/project/src/generators/BotLootGenerator.ts index 366c9e28..044fecbb 100644 --- a/project/src/generators/BotLootGenerator.ts +++ b/project/src/generators/BotLootGenerator.ts @@ -366,7 +366,6 @@ export class BotLootGenerator { // surv12 this.addLootFromPool( - // eslint-disable-next-line @typescript-eslint/naming-convention { "5d02797c86f774203f38e30a": 1 }, [EquipmentSlots.SECURED_CONTAINER], 1, @@ -379,7 +378,6 @@ export class BotLootGenerator // AFAK this.addLootFromPool( - // eslint-disable-next-line @typescript-eslint/naming-convention { "60098ad7c2240c0fe85c570a": 1 }, [EquipmentSlots.SECURED_CONTAINER], 10, diff --git a/project/src/generators/BotWeaponGenerator.ts b/project/src/generators/BotWeaponGenerator.ts index 4ac7d670..e26843b4 100644 --- a/project/src/generators/BotWeaponGenerator.ts +++ b/project/src/generators/BotWeaponGenerator.ts @@ -478,7 +478,6 @@ export class BotWeaponGenerator // Define min/max of how many grenades bot will have const ubglMinMax: GenerationData = { - // eslint-disable-next-line @typescript-eslint/naming-convention weights: { 1: 1, 2: 1 }, whitelist: {}, }; diff --git a/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts b/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts index 6bb6797c..0722644b 100644 --- a/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts +++ b/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts @@ -29,7 +29,6 @@ export class ExternalInventoryMagGen implements IInventoryMagGen return 99; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean { return true; // Fallback, if code reaches here it means no other implementation can handle this type of magazine diff --git a/project/src/helpers/HttpServerHelper.ts b/project/src/helpers/HttpServerHelper.ts index 5c5de069..880c5348 100644 --- a/project/src/helpers/HttpServerHelper.ts +++ b/project/src/helpers/HttpServerHelper.ts @@ -56,7 +56,6 @@ export class HttpServerHelper public sendTextJson(resp: any, output: any): void { - // eslint-disable-next-line @typescript-eslint/naming-convention resp.writeHead(200, "OK", { "Content-Type": this.mime.json }); resp.end(output); } diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index 7776bdb4..4bc10e76 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -1266,7 +1266,6 @@ export class InventoryHelper } } -// eslint-disable-next-line @typescript-eslint/no-namespace namespace InventoryHelper { export interface InventoryItemHash diff --git a/project/src/helpers/ItemHelper.ts b/project/src/helpers/ItemHelper.ts index 1e6bbd3f..05a123de 100644 --- a/project/src/helpers/ItemHelper.ts +++ b/project/src/helpers/ItemHelper.ts @@ -1922,7 +1922,6 @@ export class ItemHelper } } -// eslint-disable-next-line @typescript-eslint/no-namespace namespace ItemHelper { export interface ItemSize diff --git a/project/src/loaders/PostDBModLoader.ts b/project/src/loaders/PostDBModLoader.ts index 8215e1df..c43b8537 100644 --- a/project/src/loaders/PostDBModLoader.ts +++ b/project/src/loaders/PostDBModLoader.ts @@ -52,7 +52,6 @@ export class PostDBModLoader implements OnLoad this.preSptModLoader.getImportedModDetails()[modName].main }`; const modpath = `${process.cwd()}/${filepath}`; - // eslint-disable-next-line @typescript-eslint/no-var-requires const mod = require(modpath); if (this.modTypeCheck.isPostDBLoadAsync(mod.mod)) diff --git a/project/src/loaders/PostSptModLoader.ts b/project/src/loaders/PostSptModLoader.ts index db0e6ef1..5f03b407 100644 --- a/project/src/loaders/PostSptModLoader.ts +++ b/project/src/loaders/PostSptModLoader.ts @@ -44,7 +44,6 @@ export class PostSptModLoader implements IModLoader this.preSptModLoader.getImportedModDetails()[modName].main }`; const modpath = `${process.cwd()}/${filepath}`; - // eslint-disable-next-line @typescript-eslint/no-var-requires const mod = require(modpath); if (this.modTypeCheck.isPostSptLoadAsync(mod.mod)) diff --git a/project/src/loaders/PreSptModLoader.ts b/project/src/loaders/PreSptModLoader.ts index 92a8cf2f..fa75b8c5 100644 --- a/project/src/loaders/PreSptModLoader.ts +++ b/project/src/loaders/PreSptModLoader.ts @@ -382,7 +382,6 @@ export class PreSptModLoader implements IModLoader // Import class const modFilePath = `${process.cwd()}/${filepath}`; - // eslint-disable-next-line @typescript-eslint/no-var-requires const requiredMod = require(modFilePath); if (!this.modTypeCheck.isPostV3Compatible(requiredMod.mod)) diff --git a/project/src/models/eft/common/IGlobals.ts b/project/src/models/eft/common/IGlobals.ts index e28dd64a..60b287d6 100644 --- a/project/src/models/eft/common/IGlobals.ts +++ b/project/src/models/eft/common/IGlobals.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { Ixyz } from "@spt/models/eft/common/Ixyz"; import { Item } from "@spt/models/eft/common/tables/IItem"; diff --git a/project/src/models/eft/common/ILocationBase.ts b/project/src/models/eft/common/ILocationBase.ts index bdc60388..d7fe928f 100644 --- a/project/src/models/eft/common/ILocationBase.ts +++ b/project/src/models/eft/common/ILocationBase.ts @@ -1,7 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { Ixyz } from "@spt/models/eft/common/Ixyz"; -/* eslint-disable @typescript-eslint/naming-convention */ export interface ILocationBase { AccessKeys: string[] diff --git a/project/src/models/eft/common/tables/IBotCore.ts b/project/src/models/eft/common/tables/IBotCore.ts index 7f3d3979..9e9859e5 100644 --- a/project/src/models/eft/common/tables/IBotCore.ts +++ b/project/src/models/eft/common/tables/IBotCore.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ export interface IBotCore { SAVAGE_KILL_DIST: number diff --git a/project/src/models/eft/common/tables/IBotType.ts b/project/src/models/eft/common/tables/IBotType.ts index 68b691f3..ec70e495 100644 --- a/project/src/models/eft/common/tables/IBotType.ts +++ b/project/src/models/eft/common/tables/IBotType.ts @@ -49,7 +49,6 @@ export interface EquipmentChances TacticalVest: number } -/* eslint-disable @typescript-eslint/naming-convention */ export interface ModsChances { mod_charge: number diff --git a/project/src/models/eft/common/tables/IProfileTemplate.ts b/project/src/models/eft/common/tables/IProfileTemplate.ts index eda315ff..e0b13774 100644 --- a/project/src/models/eft/common/tables/IProfileTemplate.ts +++ b/project/src/models/eft/common/tables/IProfileTemplate.ts @@ -3,7 +3,6 @@ import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { - /* eslint-disable @typescript-eslint/naming-convention */ "Standard": IProfileSides "Left Behind": IProfileSides "Prepare To Escape": IProfileSides @@ -13,7 +12,6 @@ export interface IProfileTemplates "SPT Developer": IProfileSides "SPT Easy start": IProfileSides "SPT Zero to hero": IProfileSides - /* eslint-enable @typescript-eslint/naming-convention */ } export interface IProfileSides diff --git a/project/src/models/eft/common/tables/ITemplateItem.ts b/project/src/models/eft/common/tables/ITemplateItem.ts index b7f58d41..283f3ebc 100644 --- a/project/src/models/eft/common/tables/ITemplateItem.ts +++ b/project/src/models/eft/common/tables/ITemplateItem.ts @@ -295,9 +295,7 @@ export interface Props foodUseTime?: number foodEffectType?: string StimulatorBuffs?: string - // eslint-disable-next-line @typescript-eslint/naming-convention effects_health?: IHealthEffect[] | Record> - // eslint-disable-next-line @typescript-eslint/naming-convention effects_damage?: Record MaximumNumberOfUsage?: number knifeHitDelay?: number @@ -473,7 +471,6 @@ export interface Slot _id: string _parent: string _props: SlotProps - // eslint-disable-next-line @typescript-eslint/naming-convention _max_count?: number _required?: boolean _mergeSlotWithChildren?: boolean @@ -502,7 +499,6 @@ export interface StackSlot _name?: string _id: string _parent: string - // eslint-disable-next-line @typescript-eslint/naming-convention _max_count: number _props: StackSlotProps _proto: string diff --git a/project/src/models/eft/common/tables/ITrader.ts b/project/src/models/eft/common/tables/ITrader.ts index 6d874ead..dbbe14e7 100644 --- a/project/src/models/eft/common/tables/ITrader.ts +++ b/project/src/models/eft/common/tables/ITrader.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { Item } from "@spt/models/eft/common/tables/IItem"; import { DogtagExchangeSide } from "@spt/models/enums/DogtagExchangeSide"; import { ITraderServiceModel } from "@spt/models/spt/services/ITraderServiceModel"; diff --git a/project/src/models/eft/dialog/IDeleteFriendRequest.ts b/project/src/models/eft/dialog/IDeleteFriendRequest.ts index 78074dae..89115e11 100644 --- a/project/src/models/eft/dialog/IDeleteFriendRequest.ts +++ b/project/src/models/eft/dialog/IDeleteFriendRequest.ts @@ -1,5 +1,4 @@ export interface IDeleteFriendRequest { - // eslint-disable-next-line @typescript-eslint/naming-convention friend_id: string } diff --git a/project/src/models/eft/game/IGameConfigResponse.ts b/project/src/models/eft/game/IGameConfigResponse.ts index 383f066a..011306bd 100644 --- a/project/src/models/eft/game/IGameConfigResponse.ts +++ b/project/src/models/eft/game/IGameConfigResponse.ts @@ -8,7 +8,6 @@ export interface IGameConfigResponse activeProfileId: string backend: Backend useProtobuf: boolean - // eslint-disable-next-line @typescript-eslint/naming-convention utc_time: number /** Total in game time */ totalInGame: number diff --git a/project/src/models/eft/game/IGameKeepAliveResponse.ts b/project/src/models/eft/game/IGameKeepAliveResponse.ts index fe64c747..c84b6d1f 100644 --- a/project/src/models/eft/game/IGameKeepAliveResponse.ts +++ b/project/src/models/eft/game/IGameKeepAliveResponse.ts @@ -1,6 +1,5 @@ export interface IGameKeepAliveResponse { msg: string - // eslint-disable-next-line @typescript-eslint/naming-convention utc_time: number } diff --git a/project/src/models/eft/game/IGameStartResponse.ts b/project/src/models/eft/game/IGameStartResponse.ts index e765b0fc..f5c90f67 100644 --- a/project/src/models/eft/game/IGameStartResponse.ts +++ b/project/src/models/eft/game/IGameStartResponse.ts @@ -1,5 +1,4 @@ export interface IGameStartResponse { - // eslint-disable-next-line @typescript-eslint/naming-convention utc_time: number } diff --git a/project/src/models/eft/inventory/IAddItemRequestData.ts b/project/src/models/eft/inventory/IAddItemRequestData.ts index f430ade9..4652d1c3 100644 --- a/project/src/models/eft/inventory/IAddItemRequestData.ts +++ b/project/src/models/eft/inventory/IAddItemRequestData.ts @@ -9,6 +9,5 @@ export interface AddItem { count: number sptIsPreset?: boolean - // eslint-disable-next-line @typescript-eslint/naming-convention item_id: string } diff --git a/project/src/models/eft/match/ISessionStatus.ts b/project/src/models/eft/match/ISessionStatus.ts index 0b76b4a9..16ebbaf0 100644 --- a/project/src/models/eft/match/ISessionStatus.ts +++ b/project/src/models/eft/match/ISessionStatus.ts @@ -11,6 +11,5 @@ export interface ISessionStatus raidMode?: string mode?: string shortId?: string - // eslint-disable-next-line @typescript-eslint/naming-convention additional_info?: any[] } diff --git a/project/src/models/eft/notifier/INotifier.ts b/project/src/models/eft/notifier/INotifier.ts index 86c67229..61bea63b 100644 --- a/project/src/models/eft/notifier/INotifier.ts +++ b/project/src/models/eft/notifier/INotifier.ts @@ -1,7 +1,6 @@ export interface INotifierChannel { server: string - // eslint-disable-next-line @typescript-eslint/naming-convention channel_id: string url: string notifierServer: string diff --git a/project/src/models/eft/profile/GetProfileStatusResponseData.ts b/project/src/models/eft/profile/GetProfileStatusResponseData.ts index 23bae8fe..f70e6dcb 100644 --- a/project/src/models/eft/profile/GetProfileStatusResponseData.ts +++ b/project/src/models/eft/profile/GetProfileStatusResponseData.ts @@ -17,6 +17,5 @@ export interface ProfileData raidMode?: string mode?: string shortId?: string - // eslint-disable-next-line @typescript-eslint/naming-convention additional_info?: any[] } diff --git a/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts b/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts index cbfd4879..4abe15e1 100644 --- a/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { IProcessBaseTradeRequestData } from "@spt/models/eft/trade/IProcessBaseTradeRequestData"; export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData diff --git a/project/src/models/eft/trade/IProcessSellTradeRequestData.ts b/project/src/models/eft/trade/IProcessSellTradeRequestData.ts index bdba8703..883b0fd0 100644 --- a/project/src/models/eft/trade/IProcessSellTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessSellTradeRequestData.ts @@ -13,6 +13,5 @@ export interface Item { id: string count: number - // eslint-disable-next-line @typescript-eslint/naming-convention scheme_id: number } diff --git a/project/src/models/eft/weather/IWeatherData.ts b/project/src/models/eft/weather/IWeatherData.ts index 8856070e..ac3b6c59 100644 --- a/project/src/models/eft/weather/IWeatherData.ts +++ b/project/src/models/eft/weather/IWeatherData.ts @@ -15,14 +15,10 @@ export interface IWeather pressure: number temp: number fog: number - // eslint-disable-next-line @typescript-eslint/naming-convention rain_intensity: number rain: number - // eslint-disable-next-line @typescript-eslint/naming-convention wind_gustiness: number - // eslint-disable-next-line @typescript-eslint/naming-convention wind_direction: WindDirection - // eslint-disable-next-line @typescript-eslint/naming-convention wind_speed: number cloud: number time: string diff --git a/project/src/models/eft/ws/IWsUserConfirmed.ts b/project/src/models/eft/ws/IWsUserConfirmed.ts index c08de1ae..7b2ed72c 100644 --- a/project/src/models/eft/ws/IWsUserConfirmed.ts +++ b/project/src/models/eft/ws/IWsUserConfirmed.ts @@ -15,6 +15,5 @@ export interface IWsUserConfirmed extends IWsNotificationEvent raidMode: RaidMode mode: string shortId: string - // eslint-disable-next-line @typescript-eslint/naming-convention additional_info: any[] } diff --git a/project/src/models/enums/QuestStatus.ts b/project/src/models/enums/QuestStatus.ts index bb837224..0de74a90 100644 --- a/project/src/models/enums/QuestStatus.ts +++ b/project/src/models/enums/QuestStatus.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ export enum QuestStatus { Locked = 0, diff --git a/project/src/models/external/HttpFramework.ts b/project/src/models/external/HttpFramework.ts index 24e9c273..e6d46cf7 100644 --- a/project/src/models/external/HttpFramework.ts +++ b/project/src/models/external/HttpFramework.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { IncomingMessage, ServerResponse } from "node:http"; import { injectable } from "tsyringe"; import { HttpMethods } from "@spt/servers/http/HttpMethods"; diff --git a/project/src/models/spt/config/ILocationConfig.ts b/project/src/models/spt/config/ILocationConfig.ts index ee231159..dba7b96c 100644 --- a/project/src/models/spt/config/ILocationConfig.ts +++ b/project/src/models/spt/config/ILocationConfig.ts @@ -92,9 +92,7 @@ export interface LootMultiplier { bigmap: number develop: number - // eslint-disable-next-line @typescript-eslint/naming-convention factory4_day: number - // eslint-disable-next-line @typescript-eslint/naming-convention factory4_night: number interchange: number laboratory: number diff --git a/project/src/models/spt/fence/ICreateFenceAssortsResult.ts b/project/src/models/spt/fence/ICreateFenceAssortsResult.ts index 6ccfd608..71c4239f 100644 --- a/project/src/models/spt/fence/ICreateFenceAssortsResult.ts +++ b/project/src/models/spt/fence/ICreateFenceAssortsResult.ts @@ -4,8 +4,6 @@ import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; export interface ICreateFenceAssortsResult { sptItems: Item[][] - // eslint-disable-next-line @typescript-eslint/naming-convention barter_scheme: Record - // eslint-disable-next-line @typescript-eslint/naming-convention loyal_level_items: Record } diff --git a/project/src/models/spt/server/ILocations.ts b/project/src/models/spt/server/ILocations.ts index b239c112..2abf69c5 100644 --- a/project/src/models/spt/server/ILocations.ts +++ b/project/src/models/spt/server/ILocations.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { ILocation } from "@spt/models/eft/common/ILocation"; import { ILocationsBase } from "@spt/models/eft/common/tables/ILocationsBase"; diff --git a/project/src/routers/static/AchievementStaticRouter.ts b/project/src/routers/static/AchievementStaticRouter.ts index d97d9d60..0f74267b 100644 --- a/project/src/routers/static/AchievementStaticRouter.ts +++ b/project/src/routers/static/AchievementStaticRouter.ts @@ -13,7 +13,6 @@ export class AchievementStaticRouter extends StaticRouter super([ new RouteAction( "/client/achievement/list", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -27,7 +26,6 @@ export class AchievementStaticRouter extends StaticRouter new RouteAction( "/client/achievement/statistic", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, diff --git a/project/src/routers/static/BuildStaticRouter.ts b/project/src/routers/static/BuildStaticRouter.ts index f8f52eb1..eea5619c 100644 --- a/project/src/routers/static/BuildStaticRouter.ts +++ b/project/src/routers/static/BuildStaticRouter.ts @@ -13,7 +13,6 @@ export class BuildsStaticRouter extends StaticRouter super([ new RouteAction( "/client/builds/list", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -26,7 +25,6 @@ export class BuildsStaticRouter extends StaticRouter ), new RouteAction( "/client/builds/magazine/save", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.buildsCallbacks.createMagazineTemplate(url, info, sessionID); @@ -34,7 +32,6 @@ export class BuildsStaticRouter extends StaticRouter ), new RouteAction( "/client/builds/weapon/save", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.buildsCallbacks.setWeapon(url, info, sessionID); @@ -42,7 +39,6 @@ export class BuildsStaticRouter extends StaticRouter ), new RouteAction( "/client/builds/equipment/save", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.buildsCallbacks.setEquipment(url, info, sessionID); @@ -50,7 +46,6 @@ export class BuildsStaticRouter extends StaticRouter ), new RouteAction( "/client/builds/delete", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.buildsCallbacks.deleteBuild(url, info, sessionID); diff --git a/project/src/routers/static/GameStaticRouter.ts b/project/src/routers/static/GameStaticRouter.ts index 46c0104c..2842a49d 100644 --- a/project/src/routers/static/GameStaticRouter.ts +++ b/project/src/routers/static/GameStaticRouter.ts @@ -151,7 +151,6 @@ export class GameStaticRouter extends StaticRouter ), new RouteAction( "/singleplayer/settings/getRaidTime", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.gameCallbacks.getRaidTime(url, info, sessionID); diff --git a/project/src/routers/static/MatchStaticRouter.ts b/project/src/routers/static/MatchStaticRouter.ts index 4fe378a0..477de6b5 100644 --- a/project/src/routers/static/MatchStaticRouter.ts +++ b/project/src/routers/static/MatchStaticRouter.ts @@ -265,7 +265,6 @@ export class MatchStaticRouter extends StaticRouter ), new RouteAction( "/client/raid/configuration-by-profile", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.matchCallbacks.getConfigurationByProfile(url, info, sessionID); diff --git a/project/src/routers/static/ProfileStaticRouter.ts b/project/src/routers/static/ProfileStaticRouter.ts index a4f25b50..05615464 100644 --- a/project/src/routers/static/ProfileStaticRouter.ts +++ b/project/src/routers/static/ProfileStaticRouter.ts @@ -108,7 +108,6 @@ export class ProfileStaticRouter extends StaticRouter ), new RouteAction( "/client/profile/view", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, diff --git a/project/src/routers/static/RagfairStaticRouter.ts b/project/src/routers/static/RagfairStaticRouter.ts index 25865ff6..b14df84f 100644 --- a/project/src/routers/static/RagfairStaticRouter.ts +++ b/project/src/routers/static/RagfairStaticRouter.ts @@ -15,7 +15,6 @@ export class RagfairStaticRouter extends StaticRouter super([ new RouteAction( "/client/ragfair/search", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -28,7 +27,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/ragfair/find", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -41,7 +39,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/ragfair/itemMarketPrice", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -54,7 +51,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/ragfair/offerfees", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.ragfairCallbacks.storePlayerOfferTaxAmount(url, info, sessionID); @@ -62,7 +58,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/reports/ragfair/send", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async (url: string, info: any, sessionID: string, output: string): Promise => { return this.ragfairCallbacks.sendReport(url, info, sessionID); @@ -70,7 +65,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/items/prices", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, @@ -83,7 +77,6 @@ export class RagfairStaticRouter extends StaticRouter ), new RouteAction( "/client/ragfair/offer/findbyid", - // eslint-disable-next-line @typescript-eslint/no-unused-vars async ( url: string, info: any, diff --git a/project/src/servers/http/SptHttpListener.ts b/project/src/servers/http/SptHttpListener.ts index 9253fd90..9a863ef3 100644 --- a/project/src/servers/http/SptHttpListener.ts +++ b/project/src/servers/http/SptHttpListener.ts @@ -166,7 +166,6 @@ export class SptHttpListener implements IHttpListener public sendJson(resp: ServerResponse, output: string, sessionID: string): void { - // eslint-disable-next-line @typescript-eslint/naming-convention resp.writeHead(200, "OK", { "Content-Type": "application/json", "Set-Cookie": `PHPSESSID=${sessionID}` }); resp.end(output); } diff --git a/project/src/services/ModCompilerService.ts b/project/src/services/ModCompilerService.ts index a066661e..858d59ce 100644 --- a/project/src/services/ModCompilerService.ts +++ b/project/src/services/ModCompilerService.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import fs from "node:fs"; import path from "node:path"; import { inject, injectable } from "tsyringe"; diff --git a/project/src/tools/ItemTplGenerator/itemOverrides.ts b/project/src/tools/ItemTplGenerator/itemOverrides.ts index 94c08c41..2face90a 100644 --- a/project/src/tools/ItemTplGenerator/itemOverrides.ts +++ b/project/src/tools/ItemTplGenerator/itemOverrides.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ /** * An object containing item name overrides for use with ItemTplGenerator diff --git a/project/src/utils/AsyncQueue.ts b/project/src/utils/AsyncQueue.ts index 3793b4c3..31b82631 100644 --- a/project/src/utils/AsyncQueue.ts +++ b/project/src/utils/AsyncQueue.ts @@ -17,7 +17,6 @@ export class AsyncQueue implements IAsyncQueue // Add to the queue this.commandsQueue.push(command); - // eslint-disable-next-line no-constant-condition while (this.commandsQueue[0].uuid !== command.uuid) { await new Promise((resolve) => diff --git a/project/src/utils/ImporterUtil.ts b/project/src/utils/ImporterUtil.ts index 6ea5fdbc..52e14492 100644 --- a/project/src/utils/ImporterUtil.ts +++ b/project/src/utils/ImporterUtil.ts @@ -3,8 +3,6 @@ import { Queue } from "@spt/utils/collections/queue/Queue"; import { JsonUtil } from "@spt/utils/JsonUtil"; import { VFS } from "@spt/utils/VFS"; -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable @typescript-eslint/brace-style */ @injectable() export class ImporterUtil { diff --git a/project/src/utils/logging/AbstractWinstonLogger.ts b/project/src/utils/logging/AbstractWinstonLogger.ts index 4c6101be..cac3e153 100644 --- a/project/src/utils/logging/AbstractWinstonLogger.ts +++ b/project/src/utils/logging/AbstractWinstonLogger.ts @@ -2,7 +2,6 @@ import crypto from "node:crypto"; import fs from "node:fs"; import { promisify } from "node:util"; import winston, { createLogger, format, transports, addColors } from "winston"; -// eslint-disable-next-line @typescript-eslint/naming-convention import DailyRotateFile from "winston-daily-rotate-file"; import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; diff --git a/project/tests/controllers/HealthController.test.ts b/project/tests/controllers/HealthController.test.ts index 6d403988..d7a0841b 100644 --- a/project/tests/controllers/HealthController.test.ts +++ b/project/tests/controllers/HealthController.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import "reflect-metadata"; import { container } from "tsyringe"; diff --git a/project/tests/controllers/InsuranceController.test.ts b/project/tests/controllers/InsuranceController.test.ts index 2627b4ad..bf645a33 100644 --- a/project/tests/controllers/InsuranceController.test.ts +++ b/project/tests/controllers/InsuranceController.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import "reflect-metadata"; import { container } from "tsyringe"; diff --git a/project/tests/services/PaymentService.test.ts b/project/tests/services/PaymentService.test.ts index 1c19dae2..420fdba6 100644 --- a/project/tests/services/PaymentService.test.ts +++ b/project/tests/services/PaymentService.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import "reflect-metadata"; import { container } from "tsyringe"; diff --git a/project/tests/services/PlayerService.test.ts b/project/tests/services/PlayerService.test.ts index 4f90db00..22ca696b 100644 --- a/project/tests/services/PlayerService.test.ts +++ b/project/tests/services/PlayerService.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import "reflect-metadata"; import { container } from "tsyringe"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/project/tests/services/RagfairPriceService.test.ts b/project/tests/services/RagfairPriceService.test.ts index 0dc25683..057af445 100644 --- a/project/tests/services/RagfairPriceService.test.ts +++ b/project/tests/services/RagfairPriceService.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import "reflect-metadata"; import { container } from "tsyringe"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";