These conventions keep the Accessibility Devkit packages consistent and easy to maintain.
- Core Toolkit:
accessibility-devkit - Extensions:
accessibility-devkit-<area>(e.g.,accessibility-devkit-llm,accessibility-devkit-mobile)
Packages use the @accessibility-devkit scope.
- Packages:
@accessibility-devkit/<name>(for example,audit,components, andaccommodations)
pnpm manages the monorepo.
accessibility-devkit/
├── CONVENTIONS.md # This file
├── README.md # High-level project overview
├── LICENSE # MIT License
├── package.json # Root package.json for the workspace
├── .eslintrc.cjs # Base ESLint config
├── .prettierrc.json # Prettier config
├── tsconfig.base.json # Base TypeScript config
├── packages/ # Directory for all individual NPM packages
│ ├── audit/ # Example: @accessibility-devkit/audit
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── src/
│ │ └── README.md
│ └── components/ # Example: @accessibility-devkit/components
│ └── ...
├── examples/ # Reviewed usage examples
└── docs/ # Conceptual documentation
├── 01-philosophy.md
├── 02-why-not-overlays.md
└── 03-layered-approach.md
- Language: Packages use TypeScript.
- Style: Prettier formats source and test files from the root
.prettierrc.json. - Linting: ESLint runs from
.eslintrc.cjs. - Build:
tsupproduces CommonJS, ECMAScript module, and TypeScript declaration output. - Tests: Vitest runs package tests; jsdom supplies browser APIs where needed.
- Root
README.md: Explains installation, the plugin workflow, and the package map. - Package
README.md: Documents each package's purpose, API, and examples. docs/: Holds the project philosophy and architectural decisions.- Code examples: Keep examples executable or pair them with an explicit verification procedure.
Commit messages follow Conventional Commits so Changesets can produce useful release history.
feat:A new featurefix:A bug fixdocs:Documentation only changesstyle:Changes that do not affect the meaning of the code (white-space, formatting, etc)refactor:A code change that neither fixes a bug nor adds a featureperf:A code change that improves performancetest:Adding missing tests or correcting existing testschore:Changes to the build process or auxiliary tools and libraries
- Tool: Changesets manages package versions and release notes.
- Process: Run
pnpm changesetfor changes that require a package release. Commit the generated file with the implementation.