Skip to content

Commit

Permalink
chore: Update lint.yml to include Node.js setup and run linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCoderAdi committed Oct 9, 2024
1 parent 64fff32 commit 3372cee
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
name: Lint

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install
- name: Run ESLint
run: npx eslint .
- name: Run Stylelint
run: npx stylelint "**/*.css"

- name: Run lint
run: npm run lint
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"devDependencies": {
"eslint": "^8.50.0",
"stylelint": "^15.10.0",
"stylelint-config-standard": "^30.0.0"
},
"eslintConfig": {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"rules": {}
},
"stylelint": {
"extends": "stylelint-config-standard"
}
}

0 comments on commit 3372cee

Please sign in to comment.