Install the package and its peer dependencies with npm
or your favorite package manager as dev dependencies:
npm install -D eslint@^8 prettier @siriusbeck/eslint-config
Inside the .eslintrc
file, extend @siriusbeck/eslint-config
:
{
"extends": "@siriusbeck/eslint-config"
}
{
"extends": "@siriusbeck/eslint-config/react"
}
{
"extends": "@siriusbeck/eslint-config/next"
}
Add @siriusbeck/eslint-config/prettier
to your package.json
file:
{
"prettier": "@siriusbeck/eslint-config/prettier"
}
Or create a prettier configuration file in the project root:
// .prettierrc.js
module.exports = require('@siriusbeck/eslint-config/prettier')
Create a prettier configuration file in the root of the project and add the code below:
// .prettierrc.js
const defaultConfig = require('@siriusbeck/eslint-config/prettier')
/** @type {import('prettier').Config} */
module.exports = {
...defaultConfig
// Add your custom config here
}
Just create a prettier configuration file at the root of the project.
- Standard config
- TypeScript (optional)
- Prettier
- React plugin + config
- React Hooks - plugin
- JSX a11y - plugin
- Import plugin
- Import Helpers plugin
- NextJs