Skip to content

Commit 3ae412e

Browse files
committed
chore: switch to pnpm for development
1 parent ec278a2 commit 3ae412e

File tree

4 files changed

+9603
-20673
lines changed

4 files changed

+9603
-20673
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
# CONTRIBUTING to eslint-plugin-jsdoc
22

3+
## Installing `pnpm`
4+
5+
Development is conducted using `pnpm`. Install via `npm i -g pnpm`.
6+
37
## Testing changes locally
48

59
You might try a TDD approach and add tests within the `test` directory,
610
to try different configs you may find it easier to try out changes in
711
a separate local directory.
812

9-
You can run [`npm link`](https://docs.npmjs.com/cli/link) for this purpose,
13+
You can run [`pnpm link`](https://docs.npmjs.com/cli/link) for this purpose,
1014
pointing from your project to this project. For example, while in your project
1115
root and with `eslint-plugin-jsdoc` as a sibling, run:
1216

1317
```shell
14-
npm link ../eslint-plugin-jsdoc
18+
pnpm link ../eslint-plugin-jsdoc
1519
```
1620

1721
## Building the project
1822

19-
After running `npm install` to get the latest dependencies and devDependencies,
23+
After running `pnpm install` to get the latest dependencies and devDependencies,
2024
you can run the following command to update the `dist` files, with `dist/index.js`
2125
being the `main` entry point from `package.json`:
2226

2327
```shell
24-
npm run build
28+
pnpm build
2529
```
2630

2731
## Coding standards
2832

2933
The project follows ESLint rules from [`canonical`](https://www.npmjs.com/package/eslint-config-canonical)
3034
and testing follows its subconfig, `canonical/mocha`. You can run
31-
`npm run lint` to check the linting if your IDE is not already indicating
35+
`pnpm lint` to check the linting if your IDE is not already indicating
3236
items needing fixing.
3337

3438
## Documentation building
@@ -38,7 +42,7 @@ modify files within the `.README` directory. `.README/README.md` contains the
3842
main README skeleton and details on the project, its global `settings`, etc.,
3943
while the documentation for specific rules (that will be pulled into the
4044
README) ought to be modified within the relevant file within `.README/rules`.
41-
Once these files are modified, you can run `npm run create-readme` to have
45+
Once these files are modified, you can run `pnpm create-readme` to have
4246
these files integrated into the main `/README.md`. While you should include
4347
the built file in your PR, you will not want to make manual changes
4448
directly to this file, as they will be overwritten.
@@ -57,14 +61,14 @@ See ESLint's [RuleTester](https://eslint.org/docs/developer-guide/nodejs-api#rul
5761
for more on the allowable properties (e.g., `code`, `errors` (for invalid rules),
5862
`options`, `settings`, etc.).
5963

60-
Note that besides `npm test` there is `npm run test-cov`, which shows more
64+
Note that besides `pnpm test` there is `pnpm test-cov`, which shows more
6165
detailed coverage information. Coverage should be maintained at 100%, and
6266
if there are a few guards in place for future use, the code block in question
6367
can be ignored by being preceded by `/* istanbul ignore next */` (including
6468
for warnings where the block is never passed over (i.e., the block is always
6569
entered)). If you want to test without coverage at all, you can use
66-
`npm run test-no-cov`. To only test rules rather than other files, you
67-
can use `npm run test-index`.
70+
`pnpm test-no-cov`. To only test rules rather than other files, you
71+
can use `npm run test-index` (`pnpm` doesn't work with this script currently).
6872

6973
To test specific rules, you can supply a comma-separated list with the `--rule`
7074
flag passed to `test-index`, e.g., for `check-examples` and `require-example`:
@@ -77,7 +81,7 @@ accepts negative offsets from the end, e.g., `-1` for the last item). For
7781
example, to check the first and third invalid tests of `check-examples`
7882
along with the second valid test, you can run:
7983

80-
`npm run --rule=check-examples --invalid=0,2 --valid=1 test-index`.
84+
`npm run test-index --rule=require-example --invalid=0,2 --valid=1`.
8185

8286
## Requirements for PRs
8387

0 commit comments

Comments
 (0)