diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5d12c71..43bfafd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,14 +2,37 @@ name: Lint files on: push: - branches: [main] + # branches: [main] pull_request: - branches: [main] + # branches: [main] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: lint files - run: yarn install && yarn lint \ No newline at end of file + + - name: Cache node modules + id: cache-yarn + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.cache/yarn + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + name: List the state of node modules + continue-on-error: true + run: yarn list + + - name: Install dependencies + run: yarn install + + - name: Lint files + run: yarn lint \ No newline at end of file diff --git a/apps/snakecode-webapp/tsconfig.json b/apps/snakecode-webapp/tsconfig.json index 4cdf37b..6cc77a7 100644 --- a/apps/snakecode-webapp/tsconfig.json +++ b/apps/snakecode-webapp/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -14,11 +18,29 @@ "jsx": "preserve", "incremental": true, "paths": { - "@/*": ["./src/*"], - "@public/*": ["./public/*"], - "@root/*": ["./*"] - } + "@/*": [ + "./src/*" + ], + "@public/*": [ + "./public/*" + ], + "@root/*": [ + "./*" + ] + }, + "plugins": [ + { + "name": "next" + } + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }