Common lint and formatting rules for OEV Berlin projects.
yarn add -D eslint prettier eslint-plugin-oev
Extend oev/*
in your base eslint configuration:
{
"extends": "plugin:oev/next"
}
To use the prettier configuration, add the following to your package.json
:
{
"prettier": "eslint-plugin-oev/prettier"
}
or add a .prettierrc
file with the following content:
"eslint-plugin-oev/prettier"
-
oev/next
: Use for Next.js projects -
oev/react
: Use for React projects -
oev/node
: Use for Node projects
Check the overrides documentation for a list of rules we override and the rationale behind it.
Execute the linting tests with:
yarn test
Note that linting errors are expected in the test files.