From 2f795b9d38d9594f655788cc9e3041206a9f1072 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:20:24 +0200 Subject: [PATCH] Fix/tools scripts tsconfig and linting (#406) * [Tools] Fix linting * [Tools] Fix yargs tsc issue --- .eslintrc.js | 11 ++++++----- tools/scripts/tsconfig.json | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 01389e3e..29228c2e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { extends: ['airbnb', 'airbnb-typescript', 'prettier'], plugins: ['@typescript-eslint', 'no-relative-import-paths', 'prettier', 'header'], parserOptions: { - project: './tsconfig.json', + project: ['./tsconfig.json', './tools/scripts/tsconfig.json'], }, overrides: [ { @@ -30,8 +30,8 @@ module.exports = { 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], // just why - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off", + 'react/jsx-uses-react': 'off', + 'react/react-in-jsx-scope': 'off', 'react/jsx-no-bind': 'off', 'react/jsx-props-no-spreading': 'off', 'react/require-default-props': 'off', @@ -57,9 +57,10 @@ module.exports = { }, }, { - files: ['tools/script/.*'], + files: ['tools/scripts/*'], rules: { - 'no-relative-import-paths/no-relative-import-paths': 'off' + 'no-relative-import-paths/no-relative-import-paths': 'off', + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], }, }, ], diff --git a/tools/scripts/tsconfig.json b/tools/scripts/tsconfig.json index c3e4fc43..9ad84a1c 100644 --- a/tools/scripts/tsconfig.json +++ b/tools/scripts/tsconfig.json @@ -3,6 +3,9 @@ "include": [ "./*" ], + "compilerOptions": { + "moduleResolution": "node" + }, "ts-node": { // these options are overrides used only by ts-node // same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable