Skip to content

Commit 6cfbc59

Browse files
authored
switch to pnpm (#14)
1 parent 092a97b commit 6cfbc59

File tree

21 files changed

+6640
-6354
lines changed

21 files changed

+6640
-6354
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ jobs:
99
name: "Lint and Test"
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v3
13+
- uses: pnpm/action-setup@v2
14+
- uses: actions/setup-node@v3
1415
with:
15-
node-version: "16.x"
16-
cache: "yarn"
17-
- run: yarn
18-
- run: yarn lint
19-
- run: yarn test:ci && yarn codecov --token=$CODECOV_TOKEN
16+
node-version-file: ".nvmrc"
17+
cache: "pnpm"
18+
- run: pnpm install --frozen-lockfile
19+
- run: (cd packages/eslint-react-prefer-function-component && pnpm package:build)
20+
# run again to link bin that is now available after package:build
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm lint
23+
- run: pnpm test:ci && pnpm codecov --token=$CODECOV_TOKEN
2024
env:
2125
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v2
9+
- uses: actions/checkout@v3
10+
- uses: pnpm/action-setup@v2
11+
- uses: actions/setup-node@v3
1112
with:
12-
node-version: "16.x"
13-
cache: "yarn"
13+
node-version-file: ".nvmrc"
14+
cache: "pnpm"
1415
registry-url: "https://registry.npmjs.org"
15-
- run: yarn
16-
- run: yarn package:build
17-
- run: cd dist && npm publish
16+
- run: pnpm install --frozen-lockfile
17+
- run: cp README.md LICENSE CHANGELOG.md packages/eslint-react-prefer-function-component
18+
- run: cd packages/eslint-react-prefer-function-component && pnpm package:build && npm publish
1819
env:
1920
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

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

4-
yarn lint:fix
4+
pnpm lint:fix

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.16.0
1+
18.16
File renamed without changes.

examples/custom-config/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
"author": "Tate Thurston <tatethurston@gmail.com>",
99
"license": "ISC",
1010
"main": "index.js",
11-
"dependencies": {},
1211
"devDependencies": {
13-
"eslint": "^8.7.0",
14-
"eslint-plugin-react": "^7.28.0",
15-
"eslint-plugin-react-prefer-function-component": "1.0.0"
12+
"eslint": "^8.46.0",
13+
"eslint-plugin-react": "^7.33.1",
14+
"eslint-plugin-react-prefer-function-component": "workspace:*"
1615
}
1716
}

0 commit comments

Comments
 (0)