This repository contains configurations for Motion Hungry's code style policies on TypeScript projects.
- Prettier
- TypeScript
All of the configs are found in the @motionhungry/style-policy
on NPM registry.
pnpm add -D @motionhungry/style-policy
The ESLint configs are setup to be composable depending on the features of your project.
The following base configs are available. You can use one or both, but they should be first in extends
:
@motionhungry/style-policy/eslint/browser
@motionhungry/style-policy/eslint/node
The following configs are also available:
@motionhungry/style-policy/eslint/typescript
module.exports = {
extends: ['@motionhungry/style-policy/eslint/react'],
}
module.exports = {
extends: ['@motionhungry/style-policy/eslint/nextjs'],
}
To use the Prettier config, add the following line to .prettierrc
:
"@motionhungry/style-policy/prettier"
The TypeScript configs are available for general TypeScript/Node.js projects, React and Next.js.
Depending on the type of your project, add the following to tsconfig.json
.
{
"extends": "@motionhungry/style-policy/tsconfig/default.json"
}
{
"extends": "@motionhungry/style-policy/tsconfig/react.json"
}
{
"extends": "@motionhungry/style-policy/tsconfig/nextjs.json"
}