0.4.1-canary.15.1565281924.0 • Published 2 years ago
@opencreek/eslint-plugin-nextjs v0.4.1-canary.15.1565281924.0
@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"
}
}
Supported Rules
@opencreek/nextjs/no-literal-hrefs
Do not allow literal hrefs to nextjs pages
@opencreek/nextjs/pages-need-getLink-export
Every nextjs page needs to export a getXYZLink function
0.5.0-canary.15.1573405567.0
2 years ago
0.5.0-canary.15.1572636036.0
2 years ago
0.5.0-canary.15.1572499547.0
2 years ago
0.5.0-canary.15.1565568458.0
2 years ago
0.5.0-canary.15.1565435955.0
2 years ago
0.5.0-canary.15.1565410357.0
2 years ago
0.4.1-canary.15.1565281924.0
2 years ago