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

next build does not lint .mjs files #36819

Open
1 task done
stefanprobst opened this issue May 10, 2022 · 0 comments · May be fixed by #37389
Open
1 task done

next build does not lint .mjs files #36819

stefanprobst opened this issue May 10, 2022 · 0 comments · May be fixed by #37389
Labels
area: ESLint good first issue

Comments

@stefanprobst
Copy link
Contributor

@stefanprobst stefanprobst commented May 10, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #202204271406 SMP PREEMPT Wed Apr 27 16:11:45 UTC 2022
Binaries:
  Node: 16.14.0
  npm: 8.3.1
  Yarn: 1.22.17
  pnpm: 7.0.0
Relevant packages:
  next: 12.1.6
  react: 18.1.0
  react-dom: 18.1.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

next/lint by default does not lint .mjs files (see here), but it is possible to pass --ext .mjs.

when next build runs the linter, it uses the same default file extensions (see here), however there is no way to provide custom file extensions like with the --ext CLI option.

Expected Behavior

see above

To Reproduce

  1. git clone git@github.com:stefanprobst/issue-next-lint-mjs.git
  2. yarn run lint shows no error
  3. yarn run lint:ext shows error because it passes --ext .mjs
  4. yarn run build shows no error
@stefanprobst stefanprobst added the template: bug label May 10, 2022
@balazsorban44 balazsorban44 added the area: ESLint label May 11, 2022
@balazsorban44 balazsorban44 added good first issue and removed template: bug labels May 31, 2022
@vitalybaev vitalybaev linked a pull request Jun 2, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ESLint good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants