@opencreek/eslint-plugin-nextjs
Opinionated linting rules for nextjs Apps
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @opencreek/eslint-plugin-nextjs
:
npm install @opencreek/eslint-plugin-nextjs --save-dev
yarn add --dev @opencreek/eslint-plugin-nextjs
Usage
Add @opencreek/nextjs
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@opencreek/nextjs"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@opencreek/nextjs/no-literal-hrefs": "error",
"@opencreek/nextjs/pages-need-getLink-export": "error"
}
}