You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- \`pnpm lint:package-json\` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the \`package.json\` file
82
92
- \`pnpm lint:packages\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \`pnpm-lock.yml\` file
83
93
- \`pnpm lint:spelling\` ([cspell](https://cspell.org)): Spell checks across all source files
- \`pnpm lint:package-json\` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the \`package.json\` file
329
+
- \`pnpm lint:packages\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \`pnpm-lock.yml\` file
330
+
- \`pnpm lint:spelling\` ([cspell](https://cspell.org)): Spell checks across all source files
331
+
332
+
Read the individual documentation for each linter to understand how it can be configured and used best.
333
+
334
+
For example, ESLint can be run with \`--fix\` to auto-fix some lint rule complaints:
335
+
336
+
\`\`\`shell
337
+
pnpm run lint --fix
338
+
\`\`\`
339
+
340
+
Note that you'll likely need to run \`pnpm build\` before \`pnpm lint\` so that lint rules which check the file system can pick up on any built files.
341
+
342
+
## Testing
343
+
344
+
[Vitest](https://vitest.dev) is used for tests.
345
+
You can run it locally on the command-line:
346
+
347
+
\`\`\`shell
348
+
pnpm run test
349
+
\`\`\`
350
+
351
+
Add the \`--coverage\` flag to compute test coverage and place reports in the \`coverage/\` directory:
352
+
353
+
\`\`\`shell
354
+
pnpm run test --coverage
355
+
\`\`\`
356
+
357
+
Note that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.
358
+
Calls to \`console.log\`, \`console.warn\`, and other console methods will cause a test to fail.
359
+
360
+
### Debugging Tests
361
+
362
+
This repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.
363
+
To launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).
364
+
365
+
## Type Checking
366
+
367
+
You should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.
368
+
369
+
However, it can be useful to run the TypeScript command-line (\`tsc\`) to type check all files in \`src/\`:
370
+
371
+
\`\`\`shell
372
+
pnpm tsc
373
+
\`\`\`
374
+
375
+
Add \`--watch\` to keep the type checker running in a watch mode that updates the display as you save files:
0 commit comments