fix(deps): migrate ESLint tooling for Next.js 16
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals",
|
||||
"rules": {
|
||||
"@next/next/no-img-element": "off",
|
||||
"react/no-unknown-property": "error"
|
||||
|
||||
}//,
|
||||
//...your configuration
|
||||
// "overrides": [
|
||||
// //...your overrides
|
||||
// {
|
||||
// // Force the setting of a swagger description on each api endpoint
|
||||
// "files": ["pages/api/**/*.js"],
|
||||
// "plugins": ["jsdoc"],
|
||||
// "rules": {
|
||||
// "jsdoc/no-missing-syntax": [
|
||||
// "error",
|
||||
// {
|
||||
// "contexts": [
|
||||
// {
|
||||
// "comment": "JsdocBlock:has(JsdocTag[tag=swagger])",
|
||||
// "context": "any",
|
||||
// "message": "@swagger documentation is required on each API. Check this out for syntax info: https://github.com/jellydn/next-swagger-doc"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import { defineConfig } from "eslint/config";
|
||||
import nextVitals from "eslint-config-next/core-web-vitals";
|
||||
import reactPlugin from "eslint-plugin-react";
|
||||
|
||||
export default defineConfig([
|
||||
...nextVitals,
|
||||
{
|
||||
plugins: {
|
||||
react: reactPlugin
|
||||
},
|
||||
rules: {
|
||||
"@next/next/no-img-element": "off",
|
||||
"react/no-unknown-property": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["pages/api/file/**/*.js"],
|
||||
rules: {
|
||||
"react-hooks/rules-of-hooks": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts",
|
||||
"data/forms/**"
|
||||
]
|
||||
}
|
||||
]);
|
||||
Generated
+981
-796
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -18,7 +18,7 @@
|
||||
"start2": "NODE_ENV=production node ./server.js",
|
||||
"start3": "NODE_ENV=production next start",
|
||||
"start": "NODE_ENV=production node_modules/next/dist/bin/next start",
|
||||
"lint": "next lint",
|
||||
"lint": "eslint .",
|
||||
"prisma:generate": "prisma generate",
|
||||
"test": "playwright test",
|
||||
"test:reps": "playwright test pwe2e/tests/loggedin/raiserep.spec.js --headed",
|
||||
@@ -105,9 +105,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.62.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^14.2.28",
|
||||
"eslint": "9.39.5",
|
||||
"eslint-config-next": "16.4.4",
|
||||
"eslint-plugin-jsdoc": "^48.2.3",
|
||||
"prisma": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ const test = (name, fn) => tests.push({ name, fn });
|
||||
|
||||
const loadRewrites = async () => {
|
||||
const configPath = path.join(__dirname, "..", "..", "next.config.js");
|
||||
// eslint-disable-next-line global-require, import/no-dynamic-require
|
||||
const nextConfig = require(configPath);
|
||||
return nextConfig.rewrites();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user