Enhance development environment and database setup #2
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: Lint | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: null | |
| jobs: | |
| fix-lint-issues: | |
| name: Fix Lint Issues | |
| permissions: | |
| contents: write | |
| statuses: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'latest' | |
| - name: Setup Prettier config | |
| run: | | |
| echo '{ | |
| "overrides": [{ | |
| "files": ["*.yml", "*.yaml", "*.md"], | |
| "options": { "tabWidth": 2 } | |
| }], | |
| "printWidth": 80, | |
| "semi": false, | |
| "singleQuote": true, | |
| "tabWidth": 4, | |
| "trailingComma": "es5", | |
| "useTabs": false | |
| }' > .prettierrc | |
| - name: Install and run Prettier | |
| run: | | |
| npm install -g prettier | |
| prettier --write . | |
| - name: Super-linter | |
| uses: super-linter/super-linter/slim@v8 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VALIDATE_ALL_CODEBASE: false | |
| # Disable problematic validators | |
| VALIDATE_BIOME_FORMAT: false | |
| # Enable fixers for PR events | |
| FIX_JSON: true | |
| FIX_JSON_PRETTIER: true | |
| FIX_MARKDOWN: true | |
| FIX_MARKDOWN_PRETTIER: true | |
| FIX_NATURAL_LANGUAGE: ${{ github.event_name == 'pull_request' }} | |
| - name: Commit and push fixes | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.ref != github.event.repository.default_branch | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| branch: ${{ github.event.pull_request.head.ref }} | |
| commit_message: 'Super-Linter: Fix linting issues' | |
| commit_user_name: super-linter | |
| commit_user_email: super-linter@super-linter.dev |