This GitHub Action generates an ESLint score for your JavaScript codebase.
Here's an example workflow file to use the ESLint Score GitHub Action:
name: ESLint Score
on:
push:
branches:
- master
jobs:
eslint-score:
runs-on: ubuntu-latest
steps:
- name: Install Node.js
uses: actions/[email protected]
with:
node-version: '16.x'
- name: Checkout repository
uses: actions/checkout@v3
- name: Install ESLint
run: npm install eslint
- name: Setup ESLint Score
uses: suryaumapathy2812/ESlint-score@v1
with:
action: "SETUP"
start-point: './'
- name: run ESlint
run: npx eslint -c ./.eslintrc.custom.json --ext .js --output-file eslint-results.json --format json ./ || true
- name: Run ESLint Score
uses: suryaumapathy2812/ESlint-score@v1
with:
action: "SCORE"
start-point: './'
- name: Display ESLint Score
run: |
echo "ESLint Score: ${{ steps.eslint-score.outputs.score }}"