Add linter actions
This commit is contained in:
27
.gitea/workflows/smart-clinic-lint-frontend.yml
Normal file
27
.gitea/workflows/smart-clinic-lint-frontend.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Lint Frontend
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- SmartClinicManagementSystem/**
|
||||
push:
|
||||
paths:
|
||||
- SmartClinicManagementSystem/**
|
||||
jobs:
|
||||
lint-frontend:
|
||||
runs-on: node20
|
||||
name: Lint HTML, CSS, and JS
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Install linters
|
||||
run: |
|
||||
npm install -g htmlhint stylelint eslint
|
||||
- name: Lint HTML
|
||||
run: htmlhint SmartClinicManagementSystem/app/src/main/resources/static/assets/pages//*.html || true
|
||||
- name: Lint CSS
|
||||
run: stylelint "SmartClinicManagementSystem/app/src/main/resources/static/assets/css//*.css" || true
|
||||
- name: Lint JS
|
||||
run: eslint SmartClinicManagementSystem/app/src/main/resources/static/assets/js//*.js || true
|
||||
Reference in New Issue
Block a user