Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Next.js default eslint rulesets (e.g. 'plugin:react-hooks/recommended') #31

Open
jnachtigall opened this issue Feb 25, 2025 · 2 comments

Comments

@jnachtigall
Copy link

Running npm run lint (just after cloning this repo) results in

⚠ The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config

Is there a reason why the Mantine Next.js template does not use eslint-plugin-next or eslint-config-next ?

If this is deliberate then maybe disable the above warning - or add some information in the Readme.

I guess that extending from Next.js default eslint rules would benefit the user. For instance, I noticed that with the default eslint setup from this template 'plugin:react-hooks/recommended' does not show errors/warnings (maybe not included in Mantine preset?).

@rtivital
Copy link
Member

eslint-plugin-next was not used because at the time of this repository development it was not compatible with ESLint 9. It might be compatible now, I did not check.

@jnachtigall
Copy link
Author

I see. In the end it does not matter if the mantine ruleset is based on eslint-plugin-next as long as the number of eslint rules and settings is what you'd expect for a React/Next.js project. (Ok, maybe the warning is really misleading, too, then). But I just noticed that something is missing, because I did not get warnings for missing variables in the dependency arrays for useEffect or useCallback (which are from plugin:react-hooks/recommended).

Thanks for this template ❤ Saves a lot of time bootstrapping a project. Sorry, that I do not have time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants