Next.js Discord

Discord Forum

create-next-app@latest eslint error

Answered
Boerboel posted this in #help-forum
Open in Discord
BoerboelOP
Hey guys, when i create a new nextjs15 project, i noticed a new file eslint.config.mjs, which was created, this is happening everytime i create a new project since last week, I am getting eslint error, but when i do npm run lint it works properly, it's just that when i get a alert saying eslint not configured properly and show the errors below. please help me fix it
Error: Invalid Options:
- Unknown options: reportUnusedDisableDirectives, resolvePluginsRelativeTo, rulePaths, useEslintrc, extensions, ignorePath
- 'extensions' has been removed.
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
- 'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead.
Error: Invalid Options:
- Unknown options: reportUnusedDisableDirectives, resolvePluginsRelativeTo, rulePaths, useEslintrc, extensions, ignorePath
- 'extensions' has been removed.
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
- 'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead.
Answered by Boerboel
Yea I did, i manually install eslint and then it gave me the json file instead of the mjs
View full answer

11 Replies

BoerboelOP
Anyone please help me
West African Crocodile
excuse me, could you show me your next.config.js file?
BoerboelOP
@West African Crocodile The error shows when I initially create the project. My next.config.js is empty.
The way I am fixing it right now, I am not downloading eslint initially, I select no for eslint, then I manually install it, but the thing is when I install it manually it doesn't create a eslint.config.mjs but it creates the old eslint.json in nextjs15 project.
I looked at the package.json ad it's use eslint v9 so I believe there won't be any problem since I'm using v9 for nextjs15
West African Crocodile
I'm not sure, but I think there's something wrong with the npm version. In my case, I'm using version Node 22.11.00. But I don't have the same problem as you.
BoerboelOP
@West African Crocodile i just updated my node version and I get the same issue
It's basically the eslint v8 and v9 not being compatible
West African Crocodile
no, I just create new but have not your issue.
West African Crocodile
hello, don't you solve the issue yet?
BoerboelOP
Yea I did, i manually install eslint and then it gave me the json file instead of the mjs
Answer