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

Move from custom eslint to Next11's eslint-plugin-next #394

Open
1 task
kalvinwang opened this issue Aug 18, 2021 · 1 comment
Open
1 task

Move from custom eslint to Next11's eslint-plugin-next #394

kalvinwang opened this issue Aug 18, 2021 · 1 comment
Labels
Engineering Technology and Development Track Type: Developer Experience Tickets that improve the developer environment or development process
Milestone

Comments

@kalvinwang
Copy link
Contributor

kalvinwang commented Aug 18, 2021

Description

Since we updated to Next 11.1, we now have the ability to make use of eslint-plugin-next and its default configuration to catch common issues with Next.js applications. However, following the documentation here, which is basically:

  1. In package.json:
-    "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
+    "lint": "next lint",
  1. Adding the @next/eslint-plugin-next package
  2. Adding plugin:plugin:@next/next/recommended to the list of extends in .eslintrc.js

Results in the following error while running yarn lint (aka next lint):

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Acceptance Criteria

  • Make use of Next's new integrated eslint
@kalvinwang kalvinwang added the Engineering Technology and Development Track label Aug 18, 2021
@rocketnova
Copy link
Contributor

@kalvinwang Thanks for finding this and making the ticket! Can you clarify the ticket description? I'm not sure what this portion of the description means:

Results in the following error while running yarn lint (aka next lint):
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Is this an example of what expected lint checking is? Or are you saying that you tried to follow the directions and ran into this error and therefore put the work on pause for now?

@rocketnova rocketnova added this to the Low Priority milestone Sep 14, 2021
@lomky lomky changed the title Use eslint-plugin-next Move from custom eslint to Next11's eslint-plugin-next Dec 21, 2021
@lomky lomky added the Type: Developer Experience Tickets that improve the developer environment or development process label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Technology and Development Track Type: Developer Experience Tickets that improve the developer environment or development process
Projects
None yet
Development

No branches or pull requests

3 participants