From 7de30f234651da692fc16432a4a6b866772a37fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Tue, 19 Dec 2023 14:33:35 +0100 Subject: [PATCH] Test TS ExpectType in CI --- .eslintrc.js | 5 +++++ .github/workflows/ci.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 555555964c..25cdee90e8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -123,8 +123,13 @@ module.exports = { overrides: [{ files: ['**/*.ts'], parser: '@typescript-eslint/parser', + parserOptions: { + project: ['types/tsconfig.json'], + }, + plugins: ['eslint-plugin-expect-type'], extends: [ 'plugin:@typescript-eslint/recommended', + 'plugin:expect-type/recommended', ], rules: { // https://typescript-eslint.io/rules/no-use-before-define#how-to-use diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9e6e4ab49..ac4377d32d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - name: Install dependencies - run: yarn && yarn add -D eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^46 eslint-plugin-jest@^26.9.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript + run: yarn && yarn add -D typescript eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^46 eslint-plugin-jest@^26.9.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-expect-type - name: Lint JS and LESS files run: npm run lint - name: Assert LESS files formatting using Prettier