eslint-config-moneyforward
This package provides moneyforward's .eslintrc as an extensible shared config.
Usage
npm install --save-dev eslint eslint-config-moneyforward
Ex. Using Next.js, TypeScript, Jest in your repository,
.eslintrc.json
{
"extends": [
"moneyforward",
"moneyforward/rules/next",
"moneyforward/rules/typescript",
"moneyforward/rules/jest"
]
}
Support rules
moneyforward
- Contains ESLint recommended rule
moneyforward/rules/node
- Contains Node.js recommended rule (
eslint-plugin-node
)
- Contains Node.js recommended rule (
moneyforward/rules/typescript
- Contains TypeScript recommended rule (
@typescript-eslint/eslint-plugin
)
- Contains TypeScript recommended rule (
moneyforward/rules/react
- Contains React recommended rule (
eslint-plugin-react
,eslint-plugin-react-hooks
)
- Contains React recommended rule (
moneyforward/rules/next
- Contains React and Next.js recommended rule (
eslint-plugin-react
,eslint-plugin-react-hooks
,eslint-plugin-next
)
- Contains React and Next.js recommended rule (
moneyforward/rules/jest
- Contains Jest recommended rule (
eslint-plugin-jest
)
- Contains Jest recommended rule (
moneyforward/rules/testing-library/react
- Contains React Testing Library recommended rule (
eslint-plugin-testing-library
,eslint-plugin-jest-dom
)
- Contains React Testing Library recommended rule (
Prettier support
Using prettier, extend moneyforward/prettier
- Using eslint-config-prettier.
Turns off all rules that are unnecessary or might conflict with Prettier.
Make sure to put it last, so it gets the chance to override other configs.
{
"extends": ["some-other-config-you-use", "moneyforward/rules/prettier"]
}
Versioning
- Increment major version: Changed error rules.
- Increment minor version: Changed warn rules.
- Increment patch version: Not changed error and warn rules.