From b86b6c6f5ee39e57490277420d0fc2a20f741444 Mon Sep 17 00:00:00 2001 From: Platinum Date: Mon, 5 Aug 2024 20:35:09 +1000 Subject: [PATCH] Update dev configs --- .eslintignore | 9 +++++---- .eslintrc.json | 28 ++++++++++++++-------------- tsconfig.json | 21 +++++++-------------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/.eslintignore b/.eslintignore index 9922d9a..f7dd9e1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,9 +1,10 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json *.txt -*.exe \ No newline at end of file +*.exe diff --git a/.eslintrc.json b/.eslintrc.json index 1deee58..281c644 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,9 +1,7 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], + "plugins": ["@typescript-eslint"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", @@ -17,10 +15,7 @@ "@typescript-eslint/comma-dangle": 1, "@typescript-eslint/func-call-spacing": 2, "@typescript-eslint/quotes": 1, - "@typescript-eslint/brace-style": [ - "warn", - "1tbs" - ], + "@typescript-eslint/brace-style": ["warn", "1tbs"], "@typescript-eslint/naming-convention": [ "warn", { @@ -47,13 +42,10 @@ "format": ["UPPER_CASE"] } ], - "@typescript-eslint/indent": [ - "warn", - 2 - ], + "@typescript-eslint/indent": ["warn", 2], "@typescript-eslint/no-unused-expressions": [ "warn", - { + { "allowShortCircuit": false, "allowTernary": false } @@ -71,5 +63,13 @@ "allowArgumentsExplicitlyTypedAsAny": true } ] - } -} \ No newline at end of file + }, + "overrides": [ + { + "files": ["*.mjs", "*.ts"], + "env": { + "node": true + } + } + ] +} diff --git a/tsconfig.json b/tsconfig.json index 8151310..7d2e93d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,18 @@ { "compilerOptions": { "allowJs": true, - "module": "CommonJS", - "target": "es2020", - "moduleResolution": "node", + "module": "NodeNext", + "target": "ES2022", + "moduleResolution": "NodeNext", "esModuleInterop": true, "downlevelIteration": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "resolveJsonModule": true, "outDir": "tmp", - "baseUrl": ".", "paths": { - "@spt-aki/*": ["./types/*"] - } + "@spt/*": ["./types/*"], + }, }, - "lib": [ - "es2020" - ], - "include": [ - "src/*", - "src/**/*" - ] -} \ No newline at end of file + "exclude": ["node_modules", "dist", "tmp"], +}