From 07711d923e20cedf3d123ccd12af19eeefd9c791 Mon Sep 17 00:00:00 2001 From: Dominik Zogg Date: Thu, 20 Jun 2024 15:31:34 +0200 Subject: [PATCH] eslint upgrade --- .eslintrc.cjs | 10 +++++++++- package.json | 2 +- tests/handler.test.ts | 2 +- tsconfig.eslint.json | 7 +++++++ 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 tsconfig.eslint.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 144ae5c..ee9d6dc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1 +1,9 @@ -module.exports = require('@chubbyts/chubbyts-eslint/dist/eslintrc').default; +const config = require('@chubbyts/chubbyts-eslint/dist/eslintrc').default; + +module.exports = { + ...config, + parserOptions: { + ...config.parserOptions, + project: './tsconfig.eslint.json', + }, +}; diff --git a/package.json b/package.json index 4d6a803..f5e4287 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@chubbyts/chubbyts-http-types": "^1.2.3" }, "devDependencies": { - "@chubbyts/chubbyts-eslint": "^2.0.3", + "@chubbyts/chubbyts-eslint": "^2.0.7", "@chubbyts/chubbyts-function-mock": "^1.4.2", "@chubbyts/chubbyts-packaging": "^2.0.7", "@stryker-mutator/core": "^8.2.6", diff --git a/tests/handler.test.ts b/tests/handler.test.ts index 2d36ef9..e69883b 100644 --- a/tests/handler.test.ts +++ b/tests/handler.test.ts @@ -61,7 +61,7 @@ const readStream = async (stream: Stream) => { stream.on('data', (chunk) => (data += chunk)); stream.on('end', () => resolve(data)); - stream.on('error', (error) => reject(error)); + stream.on('error', reject); }); }; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..524af35 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src", + "tests" + ], +}