@moo-api/standards
v1.2.1
Published
Moo's coding standards (ESLint, Stylelint, Prettier)
Maintainers
Readme
@moo-api/standards
Moo's coding standards – a shared ruleset for ESLint, Stylelint, and Prettier
📦 Installation
pnpm add -D @moo-api/standards⚙️ Setup
ESLint
Create an eslint.config.js in your project root:
module.exports = {
extends: ['@moo-api/standards/eslint'],
};Stylelint
Create a stylelint.config.cjs in your project root:
module.exports = {
extends: ['@moo-api/standards/stylelint'],
};Prettier
Create a prettier.config.js in your project root:
module.exports = require('@moo-api/standards/prettier');🚀 Usage
Add the following scripts to your package.json:
{
"scripts": {
"lint": "pnpm lint:js && pnpm lint:css",
"lint:js": "eslint . --ext js,jsx,ts,tsx",
"lint:css": "stylelint '**/*.{css,scss,less}'",
"format": "prettier --write ."
}
}Then run:
pnpm lint # Lint JS/TS and CSS/SCSS files
pnpm format # Format files with Prettier🔄 Updates
To keep up to date with the latest standards, update the package:
pnpm update @moo-api/standards📄 License
MIT © Moo API
