Skip to content

Commit 84ef9d8

Browse files
authored
chore: yarn to pnpm (#477)
1 parent 46cea9e commit 84ef9d8

37 files changed

+203
-199
lines changed

.codesandbox/ci.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.commitlintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// "forwardPorts": [],
2727

2828
// Use 'postCreateCommand' to run commands after the container is created.
29-
"postCreateCommand": "yarn install",
29+
"postCreateCommand": "pnpm install",
3030

3131
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3232
"remoteUser": "node"

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ module.exports = {
7474
js: "espree",
7575
},
7676
},
77+
rules: {
78+
"no-use-before-define": "off",
79+
},
7780
},
7881
{
7982
files: ["*.ts", "*.mts"],

.github/workflows/GHPages.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v3
28+
- uses: pnpm/action-setup@v2
2829
- uses: actions/setup-node@v3
2930
- name: Install And Build
3031
run: |+
31-
yarn install
32-
yarn update
33-
yarn build
32+
pnpm install
33+
pnpm run update
34+
pnpm run build
3435
export NODE_OPTIONS="--max-old-space-size=8192"
35-
yarn docs:build
36+
pnpm run docs:build
3637
- name: Setup Pages
3738
uses: actions/configure-pages@v3
3839
- name: Upload artifact

.github/workflows/NodeCI.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,26 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14+
- uses: pnpm/action-setup@v2
1415
- uses: actions/setup-node@v3
1516
- name: Install Packages
16-
run: yarn install
17+
run: pnpm install
1718
- name: Lint
1819
run: |+
19-
yarn build
20-
yarn lint
20+
pnpm run build
21+
pnpm run lint
2122
build:
2223
runs-on: ubuntu-latest
2324
steps:
2425
- uses: actions/checkout@v3
26+
- uses: pnpm/action-setup@v2
2527
- uses: actions/setup-node@v3
2628
- name: Install Packages
27-
run: yarn install
29+
run: pnpm install
2830
- name: Build
2931
run: |+
30-
yarn update
31-
yarn build
32+
pnpm run update
33+
pnpm run build
3234
test:
3335
name: "Test for ESLint ${{ matrix.eslint }} on ${{ matrix.node }} OS: ${{matrix.os}}"
3436
runs-on: ${{ matrix.os }}
@@ -40,38 +42,39 @@ jobs:
4042
steps:
4143
- name: Checkout
4244
uses: actions/checkout@v3
45+
- uses: pnpm/action-setup@v2
4346
- name: Setup Node.js ${{ matrix.node }}
4447
uses: actions/setup-node@v3
4548
with:
4649
node-version: ${{ matrix.node }}
4750
- name: Remove @sveltejs/kit # Remove @sveltejs/kit because postinstall fails on old node.
48-
# Use npm because yarn remove needs the lock file.
4951
run: |+
50-
npm uninstall @sveltejs/kit --legacy-peer-deps
52+
pnpm rm @sveltejs/kit
5153
rm -rf node_modules
5254
- name: Install ESLint ${{ matrix.eslint }}
5355
run: |+
54-
yarn add -D eslint@${{ matrix.eslint }} --ignore-engines
56+
pnpm install -D eslint@${{ matrix.eslint }}
5557
rm -rf node_modules
56-
rm -rf yarn.lock
58+
rm -rf pnpm-lock.yaml
5759
if: matrix.eslint != 8
5860
- name: Install Packages
59-
run: yarn install --ignore-engines
61+
run: pnpm install
6062
- name: Test
61-
run: yarn test
63+
run: pnpm run test
6264
- name: Type Coverage
63-
run: yarn typecov
65+
run: pnpm run typecov
6466
update-resources:
6567
runs-on: ubuntu-latest
6668
steps:
6769
- uses: actions/checkout@v3
70+
- uses: pnpm/action-setup@v2
6871
- uses: actions/setup-node@v3
6972
with:
7073
node-version: 18
7174
- name: Install Packages
72-
run: yarn install --ignore-engines
75+
run: pnpm install
7376
- name: Update resources
74-
run: yarn update
77+
run: pnpm run update
7578
- name: Check changes
7679
run: |
7780
git add --all && \

.github/workflows/Release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,25 @@ jobs:
2121
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2222
fetch-depth: 0
2323

24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v2
26+
2427
- name: Setup Node.js 16
2528
uses: actions/setup-node@v3
2629
with:
2730
node-version: 16
2831

2932
- name: Install Dependencies
30-
run: yarn
33+
run: pnpm install
3134

3235
- name: Create Release Pull Request or Publish to npm
3336
id: changesets
3437
uses: changesets/action@v1
3538
with:
3639
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
37-
version: yarn version:ci
40+
version: pnpm run version:ci
3841
# This expects you to have a script called release which does a build for your packages and calls changeset publish
39-
publish: yarn release
42+
publish: pnpm run release
4043
commit: "chore: release eslint-plugin-svelte"
4144
title: "chore: release eslint-plugin-svelte"
4245
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ dist
102102

103103
## repo
104104
/yarn.lock
105+
/pnpm-lock.yaml
105106
/lib
106107
/.svelte-kit
107108
/.type-coverage

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
package-lock=false
1+
package-lock=false
2+
enable-pre-post-scripts=true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.type-coverage
33
build
44
/lib
5+
.npmrc

0 commit comments

Comments
 (0)