Skip to content

Commit

Permalink
add eslint ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanRHall committed Oct 6, 2021
1 parent fd7f997 commit a6ed071
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
name: Prettier
name: Code Quality
on: pull_request
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "12"
- name: Checkout the repo
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
env:
cache-name: yarn-cache
with:
path: |
~/.npm
~/.cache
**/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run yarn install
run: yarn install --frozen-lockfile
- name: Run yarn lint
run: yarn lint
prettier:
name: Prettier Formatting
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"scripts": {
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn to install dependencies\\n\\n')\"",
"lint": "eslint --ext js,jsx,ts,tsx .",
"prettier:check": "yarn prettier . --check --ignore-unknown",
"prettier:write": "yarn prettier . --write --ignore-unknown",
"setup": "wsrun -me -t setup",
Expand Down

0 comments on commit a6ed071

Please sign in to comment.