mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
- Enables TS strict mode - Adds script to check types - Adds workflow to run check-type script - Updates the code-checking workflows to share the same set-up job This updates the `tsconfig.json` option to enable strict mode. *However*, we use TSX for development and SWC for release, which do not type-check, so this option only gives additional linting/visual-feedback in VSCode. Additionally, I've added a NPM script `npm run lint:types` and a GitHub workflow that runs it. **This depends on #1005.** --------- Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
43 lines
957 B
YAML
43 lines
957 B
YAML
name: Run Code Linter
|
|
|
|
on:
|
|
push:
|
|
branches: ["*"]
|
|
pull_request:
|
|
branches: ["*"]
|
|
|
|
jobs:
|
|
biome:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: false
|
|
|
|
- name: Checkout LFS
|
|
run: git lfs pull
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: "project/.nvmrc"
|
|
cache: "npm"
|
|
cache-dependency-path: "project/package.json"
|
|
|
|
- name: Check NPM Cache
|
|
id: cache-check
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('./project/package.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Install NPM Dependencies
|
|
if: steps.cache-check.outputs.cache-hit != 'true'
|
|
run: npm install
|
|
working-directory: ./project
|
|
|
|
- name: Run Linter
|
|
run: npm run lint
|
|
working-directory: ./project
|