Skip to content

Commit 106b265

Browse files
committed
build: use npm workspaces
1 parent ab5bf6e commit 106b265

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v2
3333
- uses: actions/setup-node@v2
34+
with:
35+
node-version: '16'
3436
- run: npm install
3537
- run: npm run lint
3638

@@ -42,7 +44,7 @@ jobs:
4244
- run: npm install
4345
- run: npm install --save-dev eslint@6
4446
- run: npm test
45-
47+
4648
eslint7:
4749
runs-on: ubuntu-latest
4850
steps:

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@
1212
"eslint-plugin-node": "^11.1.0"
1313
},
1414
"scripts": {
15-
"postinstall": "npm run install:autofix && npm run install:no-autofix && npm run install:web",
16-
"install:autofix": "cd packages/autofix && npm i",
17-
"install:no-autofix": "cd packages/no-autofix && npm i",
18-
"install:web": "cd packages/web && npm i",
19-
"test": "npm run test:autofix && npm run test:no-autofix && npm run test:web",
20-
"test:autofix": "cd packages/autofix && npm t",
21-
"test:no-autofix": "cd packages/no-autofix && npm t",
22-
"test:web": "cd packages/web && npm t",
23-
"lint": "eslint packages/"
15+
"lint": "eslint packages/",
16+
"test": "npm run test --workspaces"
2417
},
2518
"license": "MIT",
2619
"repository": "https://github.com/aladdin-add/eslint-plugin",
2720
"homepage": "https://github.com/aladdin-add/eslint-plugin",
2821
"bugs": "https://github.com/aladdin-add/eslint-plugin/issues/",
2922
"engines": {
3023
"node": ">=8"
31-
}
24+
},
25+
"workspaces": [
26+
"packages/*"
27+
]
3228
}

0 commit comments

Comments
 (0)