Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (37 loc) · 2.01 KB

DEVELOPMENT.md

File metadata and controls

54 lines (37 loc) · 2.01 KB

Development

After forking the repo from GitHub and installing pnpm:

git clone https://github.com/<your-name-here>/expect-no-axe-violations
cd expect-no-axe-violations
pnpm install

This repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.

Building

Run TypeScript locally to type check and build source files from src/ into output files in lib/:

pnpm build --watch

You should also see suggestions from TypeScript in your editor.

Formatting

Prettier is used to format code. It should be applied automatically when you save files in VS Code or make a Git commit.

Linting

This package includes several forms of linting to enforce consistent code quality and styling. Each should be shown in VS Code, and can be run manually on the command-line:

  • pnpm lint:knip (knip): Detects unused files, dependencies, and code exports
  • pnpm lint:md (Markdownlint): Checks Markdown source files
  • pnpm lint:package (npm-package-json-lint): Lints the package.json file
  • pnpm lint:packages (pnpm-deduplicate): Deduplicates packages in the pnpm-lock.yml file
  • pnpm lint:spelling (cspell): Spell checks across all source files
  • pnpm lint (ESLint with typescript-eslint): Lints JavaScript and TypeScript source files

Testing

Vitest is used for tests. You can run it locally on the command-line:

pnpm run test

Add the --coverage flag to compute test coverage and place reports in the coverage/ directory:

pnpm run test --coverage