@swarmmachina/standards
v1.0.3
Published
Shared code style, linting rules, git conventions and project standards for SwarmMachina projects.
Readme
@swarmmachina/standards
Shared code style, linting rules, git conventions and project standards for all SwarmMachina projects.
Includes
- ESLint flat config with:
- JavaScript + Vue 3 support
- JSDoc rules
- Prettier integration
- Prettier formatting rules
- Git commit message convention (Conventional Commits)
- Git hook for auto-formatting commit messages
- Editor & tool configs:
.editorconfig,.prettierignore,.gitignore
Installation
Install as a dev dependency:
npm i -D @swarmmachina/standardsUsage
ESLint (flat config)
In your project root, create eslint.config.js:
import config from '@swarmmachina/standards/eslint.config.mjs'
export default configLint your code:
npm run check
npm run fixPrettier
Uses built-in .prettierrc, .prettierignore, and .editorconfig.
You can override them in your project if needed.
Git commit convention
See git/commit-convention.md for the format.
To enable automatic commit prefixing, link the hook:
chmod +x git/hooks/pre-commit
chmod +x git/hooks/prepare-commit-msg
ln -sf ../../git/hooks/pre-commit .git/hooks/pre-commit
ln -sf ../../git/hooks/prepare-commit-msg .git/hooks/prepare-commit-msgIf commit doesn't match the convention, chore: will be auto-prepended.
Directory structure
standards/
├── code-style/
│ ├── .editorconfig
│ ├── .prettierrc
│ ├── .prettierignore
│ └── eslint.mjs
├── git/
│ ├── .gitignore
│ ├── commit-convention.md
│ └── hooks/
│ ├── pre-commit
│ └── prepare-commit-msgLicense
Licensed under the Apache-2.0 License. Copyright © 2025 SwarmMachina
