Skip to content

yardinternet/toolkit

Repository files navigation

Yard Toolkit

Yard Toolkit centralizes configuration files for building, formatting and linting, among other things. It is used by the WordPress team for sites and packages.

Packages

👷‍♀️ Package Development

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.

🚀 Releasing packages

lerna publish --no-private

📦 Dependency Management

pnpm 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 dependencies

📝 Testing

pnpm test

Added 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 change
  • rules.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.

🎨 Formatting & Linting

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.

About us

banner

About

Yard Toolkit monorepo

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors