Skip to content

fix codestyle basedon eslint #7

fix codestyle basedon eslint

fix codestyle basedon eslint #7

Workflow file for this run

name: Lint
on:
push:
branches:
- main
pull_request:
permissions:
checks: write
contents: write
jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Run linters
run: |
./node_modules/.bin/eslint --ext .js,.vue src --fix
# Check if there are any changes
git diff --exit-code || {
# Configure Git user
git config user.name "Lint Bot"
git config user.email "[email protected]"
# Commit the changes
git add .
git commit -m "Auto-fix linting issues"
# Push the changes back to the current branch
git push
}