Add `.eslintrc.cjs` to list of supported `next lint` config files (#35440)
The logic for finding a user's custom `.eslintrc` config file is missing a check for `.eslintrc.cjs`, which is listed as one of the valid filenames in ESLint's docs: https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats ...so this PR makes `next lint`'s list of possible config files consistent with ESLint's. I stumbled upon this when trying to rename my own config file, since I've pretty much moved completely to ESM by now... but [ESLint doesn't support modules yet](https://github.com/eslint/eslint/issues/14137#issuecomment-785421664), so renaming the file to `.cjs` just keeps things cleaner (and VS Code happier). This is my first PR here so even though I've only changed a couple of lines, please let me know if I'm overlooking something!😊 ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
Showing
Please
register
or
sign in
to comment