Skip to content

Commit

Permalink
Merge pull request #2 from TyHil/eslint
Browse files Browse the repository at this point in the history
Eslint
  • Loading branch information
TyHil authored Mar 5, 2024
2 parents e840ec4 + b717961 commit 36d7d49
Show file tree
Hide file tree
Showing 3 changed files with 689 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: Format Check
name: Lint and Format Check

on: push

jobs:
main:
name: Prettier
name: Run ESLint and Prettier
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up pNPM
uses: pnpm/action-setup@v3
with:
version: 8

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

- name: Install ESLint and Prettier
run: pnpm install

- name: Install Prettier
run: npm install next prettier
- name: Run ESLint
run: npm run lint:check

- name: Run Prettier
run: npm run format:check
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"name": "response-display",
"scripts": {
"format": "prettier . --write",
"format:check": "prettier . --check"
"format:check": "prettier . --check",
"lint": "eslint . --fix",
"lint:check": "eslint ."
},
"dependencies": {},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.5"
},
"prettier": {
Expand All @@ -17,5 +20,13 @@
"trailingComma": "none",
"arrowParens": "avoid",
"htmlWhitespaceSensitivity": "strict"
},
"eslintConfig": {
"env": {
"es6": true
},
"extends": [
"prettier"
]
}
}
Loading

0 comments on commit 36d7d49

Please sign in to comment.