I have named exports disabled in NextJS' pages/
and (now) app/
folders. If it is relevant. I have a root config that disabled default exports for the entire application. Then those two folders have an .eslintrc
to override and flip the relevant rules.
Root .eslintrc
rules
{
"root": true,
"rules": {
"import/no-default-export": "error",
"import/prefer-default-export": "off",
"import/no-named-export": "off"
}
}
app/
and pages/
.eslintrc
rules
{
"ignorePatterns": ["middleware.ts", "./**/middleware.ts"],
"rules": {
"import/no-default-export": "off",
"import/prefer-default-export": "error",
"import/no-named-export": "error"
},
"root": false
}
Is there a way to create an exception for their known valid exports? i.e. getServerSideProps