Skip to content

Commit

Permalink
Add pre commit hooks and fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgerth committed Mar 25, 2022
1 parent 0300a59 commit 83c8508
Show file tree
Hide file tree
Showing 16 changed files with 2,016 additions and 239 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
};
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]
on: [push]

jobs:
build:
Expand All @@ -20,6 +16,8 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm test
run: |
npm install
npm run eslint
npm run build
npm test
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

npm test
npm run pretty
npm run pretty
npm run eslint
Loading

0 comments on commit 83c8508

Please sign in to comment.