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

Closed
1 task done
stefanprobst opened this issue May 10, 2022 · 3 comments · Fixed by #40879
Closed
1 task done

next build does not lint .mjs files #36819

stefanprobst opened this issue May 10, 2022 · 3 comments · Fixed by #40879
Labels
good first issue Easy to fix issues, good for newcomers Linting Related to `next lint` or ESLint with Next.js.

Comments

@stefanprobst
Copy link
Contributor

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 [email protected]: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 bug Issue was opened via the bug report template. label May 10, 2022
@balazsorban44 balazsorban44 added the Linting Related to `next lint` or ESLint with Next.js. label May 11, 2022
@balazsorban44 balazsorban44 added good first issue Easy to fix issues, good for newcomers and removed bug Issue was opened via the bug report template. labels May 31, 2022
@caioluis
Copy link

Changes proposed to #37389

@rubytree33
Copy link
Contributor

@vitalybaev Are you still working on #37389? If not I'd like to try this issue.

@kodiakhq kodiakhq bot closed this as completed in #40879 Oct 3, 2022
kodiakhq bot pushed a commit that referenced this issue Oct 3, 2022
…40879)

## Feature

Fixes #36819. Closes #37389.

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
BowlingX pushed a commit to BowlingX/next.js that referenced this issue Oct 5, 2022
…ercel#40879)

## Feature

Fixes vercel#36819. Closes vercel#37389.

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
Kikobeats pushed a commit to Kikobeats/next.js that referenced this issue Oct 24, 2022
…ercel#40879)

## Feature

Fixes vercel#36819. Closes vercel#37389.

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers Linting Related to `next lint` or ESLint with Next.js.
Projects
None yet
4 participants