Skip to content

Commit 1fbec09

Browse files
author
Joel Denning
authored
Add github workflow and linter (#3)
* Add github workflow and linter * Try again * Try again
1 parent d4f0ce9 commit 1fbec09

File tree

5 files changed

+858
-1
lines changed

5 files changed

+858
-1
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "node-important-stuff"
3+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: pnpm/action-setup@v2.0.1
11+
with:
12+
version: 6.11.5
13+
run_install: |
14+
- recursive: true
15+
args: [--frozen-lockfile, --strict-peer-dependencies]
16+
- run: pnpm run lint
17+
- run: pnpm run test

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
pnpm exec pretty-quick --staged
4+
pnpm run lint && pnpm exec pretty-quick --staged

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@
99
},
1010
"devDependencies": {
1111
"cross-env": "^7.0.2",
12+
"eslint": "^7.32.0",
13+
"eslint-config-node-important-stuff": "^1.1.0",
1214
"husky": "^7.0.0",
1315
"mocha": "^9.0.3",
1416
"prettier": "^2.1.1",
1517
"pretty-quick": "^3.0.0"
1618
},
19+
"engines": {
20+
"node": ">= 12.0.0"
21+
},
1722
"scripts": {
1823
"test": "cross-env node --experimental-loader ./lib/node-loader-http.js ./test/run-tests.js",
24+
"lint": "eslint lib",
1925
"prepare": "husky install"
2026
},
2127
"repository": {

0 commit comments

Comments
 (0)