From 03eadf028840b0b9f75eb284743b77a14875371c Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Tue, 31 May 2022 15:21:16 -0700 Subject: [PATCH] Add separate yarn lint command --- client/tsconfig.json | 3 ++- package.json | 1 + src/command-line/uninstall.ts | 1 - src/plugins/auth/local.ts | 1 + test/fixtures/.thelounge/sts-policies.json | 2 +- test/tsconfig.json | 3 ++- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/tsconfig.json b/client/tsconfig.json index a5c20c62..7b5a9b6a 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -7,7 +7,8 @@ "../package.json", "../src/types/socket-events.d.ts", "./js/helpers/fullnamemap.json", - "./js/helpers/simplemap.json" + "./js/helpers/simplemap.json", + "../src/helper.ts" ] /* If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included. */, // "exclude": [], "compilerOptions": { diff --git a/package.json b/package.json index cd06e0f4..20489e11 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "lint:eslint": "eslint . --report-unused-disable-directives --color", "lint:prettier": "prettier --list-different \"**/*.*\"", "lint:stylelint": "stylelint --color \"client/**/*.css\"", + "lint": "run-p --aggregate-output --continue-on-error lint:*", "start": "node src/dist/src/index start", "test": "run-p --aggregate-output --continue-on-error lint:* test:*", "test:mocha": "NODE_ENV=test webpack --mode=development && NODE_ENV=test TS_NODE_PROJECT='./test/tsconfig.json' nyc --nycrc-path=test/.nycrc-mocha.json mocha --require ts-node/register --colors --config=test/.mocharc.yml", diff --git a/src/command-line/uninstall.ts b/src/command-line/uninstall.ts index 9a8631ba..6732814f 100644 --- a/src/command-line/uninstall.ts +++ b/src/command-line/uninstall.ts @@ -23,7 +23,6 @@ program !packages.dependencies || !Object.prototype.hasOwnProperty.call(packages.dependencies, packageName) ) { - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions log.warn(`${colors.green(packageName)} is not installed.`); process.exit(1); } diff --git a/src/plugins/auth/local.ts b/src/plugins/auth/local.ts index c061b528..70162016 100644 --- a/src/plugins/auth/local.ts +++ b/src/plugins/auth/local.ts @@ -40,6 +40,7 @@ const localAuth: AuthHandler = (manager, client, user, password, callback) => { callback(matching); }) .catch((error) => { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions log.error(`Error while checking users password. Error: ${error}`); }); }; diff --git a/test/fixtures/.thelounge/sts-policies.json b/test/fixtures/.thelounge/sts-policies.json index b046f95a..29f79be8 100644 --- a/test/fixtures/.thelounge/sts-policies.json +++ b/test/fixtures/.thelounge/sts-policies.json @@ -3,6 +3,6 @@ "host": "irc.example.com", "port": 7000, "duration": 3600, - "expires": 1654038111401 + "expires": 1654038438022 } ] diff --git a/test/tsconfig.json b/test/tsconfig.json index adf4bc76..6e1cc07c 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -7,7 +7,8 @@ ] /* Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later. */, "files": [ "../babel.config.cjs", - "../src/helper.ts" + "../src/helper.ts", + "../src/index.d.ts" ] /* If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included. */, "ts-node": { "files": true