Yard Toolkit centralizes configuration files for building, formatting and linting, among other things. It is used by the WordPress team for sites and packages.
- @yardinternet/prettier-config
- @yardinternet/eslint-config
- @yardinternet/stylelint-config
- @yardinternet/postcss-config
- @yardinternet/toolkit
- @yardinternet/ts-config
- @yardinternet/vite-config
Register package: pnpm init (inside ./packages/[packagename])
Install dependencies in package: pnpm --filter [packagename] add [depname]
ℹ️ Note on dependencies
pnpm does not hoist undeclared dependencies. Every package must explicitly declare all its dependencies. More details in the README of the toolkit package.
lerna publish --no-privatepnpm dep:check # List mismatched versions across workspaces
pnpm dep:fix # Fix mismatched versions
pnpm dep:outdated # Check for outdated dependencies across workspaces
pnpm dep:update # Update all dependenciespnpm testAdded to catch two types of problems:
- Dependency updates silently changing rules
- Our own config edits disabling or weakening rules
Each package has two test files:
config.snapshot.test.js— snapshots the full config and fails on a changerules.test.js/format.test.js— behavioral tests that lint/format real code snippets
Tests run on pre-push and in GitHub Actions on every pull request.
The linting in this monorepo uses the settings defined in the child packages. Husky ensures that all files are automatically formatted and linted with each commit.