Use Prettier to format almost everything (#229) #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI checks for the frontend | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/*.{py,md,txt,toml}" | |
| - "{.vscode,deploy/cron_scripts,public}/**/*" | |
| - ".editorconfig" | |
| - "pylintrc" | |
| - ".gitignore" | |
| - ".prettierignore" | |
| - "scrapers/overrides.toml.d/override-schema.json" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/*.{py,md,txt,toml}" | |
| - "{.vscode,deploy/cron_scripts,public}/**/*" | |
| - ".editorconfig" | |
| - "pylintrc" | |
| - ".gitignore" | |
| - ".prettierignore" | |
| - "scrapers/overrides.toml.d/override-schema.json" | |
| env: | |
| node-version: 20.x | |
| jobs: | |
| prettier: | |
| name: Prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ env.node-version }} | |
| cache: "npm" | |
| - name: Install node dependencies | |
| run: npm install | |
| - name: Run Prettier | |
| run: npm run ci-prettier | |
| lint: | |
| name: Lint + Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ env.node-version }} | |
| cache: "npm" | |
| - name: Install node dependencies | |
| run: npm install | |
| - name: Check types | |
| run: npm run typecheck | |
| - name: Run ESLint | |
| run: npm run ci-eslint |