Linting and Code Quality
Tests check if your code works. Linting checks if your code is written well.
It's best practice to run linters (like ESLint, Flake8) and formatters (like Prettier) in your CI pipeline.
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- name: Check Formatting
run: npm run format:check
- name: Run Linter
run: npm run lint
Many teams use tools like SonarQube or Snyk in their CI pipelines to automatically scan for security vulnerabilities as part of the linting process!
booting...