Skip to content

Commit 33ff6b7

Browse files
author
Joel Denning
authored
Add github workflow (#4)
* Add github workflow * Eslint
1 parent 65370b2 commit 33ff6b7

File tree

6 files changed

+1504
-1311
lines changed

6 files changed

+1504
-1311
lines changed

.eslintrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["node-important-stuff"],
3+
"parserOptions": {
4+
"ecmaVersion": 2020
5+
},
6+
"rules": {
7+
"node/no-unsupported-features/es-syntax": "off",
8+
"node/no-missing-import": "off",
9+
"node/no-unpublished-import": "off"
10+
}
11+
}

.github/workflows/build_and_test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: "16.12"
20+
- uses: pnpm/[email protected]
21+
with:
22+
version: 6.20.3
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm test
25+
- run: pnpm run check-format
26+
- run: pnpm run lint

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"type": "module",
66
"main": "lib/node-import-map-loader.js",
77
"scripts": {
8-
"test": "cross-env node --experimental-loader ./lib/node-import-map-loader.js ./test/run-tests.js"
8+
"test": "cross-env node --experimental-loader ./lib/node-import-map-loader.js ./test/run-tests.js",
9+
"lint": "eslint lib",
10+
"check-format": "prettier --check ."
911
},
1012
"husky": {
1113
"hooks": {
@@ -16,6 +18,9 @@
1618
"type": "git",
1719
"url": "git+https://github.com/node-loader/node-loader-import-maps.git"
1820
},
21+
"engines": {
22+
"node": ">=14"
23+
},
1924
"author": "",
2025
"license": "MIT",
2126
"bugs": {
@@ -27,6 +32,8 @@
2732
},
2833
"devDependencies": {
2934
"cross-env": "^7.0.2",
35+
"eslint": "^8.2.0",
36+
"eslint-config-node-important-stuff": "^2.0.0",
3037
"husky": "^4.3.0",
3138
"left-pad": "^1.3.0",
3239
"mocha": "^8.1.3",

0 commit comments

Comments
 (0)