diff --git a/.github/workflows/frontend_lint_and_test.yml b/.github/workflows/frontend_lint_and_test.yml index 97abc1379..3f7624128 100644 --- a/.github/workflows/frontend_lint_and_test.yml +++ b/.github/workflows/frontend_lint_and_test.yml @@ -64,3 +64,15 @@ jobs: run: yarn - name: Run ESLint run: npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=0 + + check_exports: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + steps: + - uses: actions/checkout@v4 + - name: Install modules + run: yarn + - name: Run Unused Exports Check + run: ./node_modules/.bin/ts-unused-exports tsconfig.json diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d322a1759..e7576287e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -44,7 +44,8 @@ "@types/ovenplayer": "^0.10.10", "@types/react-modal": "^3.16.3", "@types/styled-components": "^5.1.34", - "@types/video.js": "^7.3.57" + "@types/video.js": "^7.3.57", + "ts-unused-exports": "^10.1.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -15165,6 +15166,30 @@ "version": "0.1.13", "license": "Apache-2.0" }, + "node_modules/ts-unused-exports": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ts-unused-exports/-/ts-unused-exports-10.1.0.tgz", + "integrity": "sha512-QA11Dpwkm5Apfe9s/UkFzHEpbiBxKy0VQ72YRAoqq9VgNbxvvIOcS5Kgm1MCitOec9YU6nf51DEWnmL6jkP2Yg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "tsconfig-paths": "^3.9.0" + }, + "bin": { + "ts-unused-exports": "bin/ts-unused-exports" + }, + "funding": { + "url": "https://github.com/pzavolinsky/ts-unused-exports?sponsor=1" + }, + "peerDependencies": { + "typescript": ">=3.8.3" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": false + } + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "license": "MIT", diff --git a/frontend/package.json b/frontend/package.json index 9b61c2255..8dea0d2e7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -65,6 +65,7 @@ "@types/ovenplayer": "^0.10.10", "@types/react-modal": "^3.16.3", "@types/styled-components": "^5.1.34", - "@types/video.js": "^7.3.57" + "@types/video.js": "^7.3.57", + "ts-unused-exports": "^10.1.0" } }