[IMPROVEMENTS - PART 1] Global quality improvement #982
Workflow file for this run
This file contains 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 | |
on: [ push, pull_request ] | |
jobs: | |
stylelint_prettier: | |
name: Stylelint & Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
# Install project dependencies | |
- name: Install dependencies | |
run: npm ci | |
# Run Prettier check command | |
- name: Run Prettier check | |
run: | | |
npm run prettier || { | |
echo "::error::Prettier check failed. Run 'npm run prettier:fix' to format your code." | |
exit 1 | |
} | |
# Run Stylelint check command | |
- name: Run Stylelint check | |
run: | | |
npm run stylelint || { | |
echo "::error::Stylelint check failed. Run 'npm run stylelint:fix' to autofix issues." | |
exit 1 | |
} | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Lint js | |
run: touch ./webpack/.env && npm ci && npm run lint |