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

The recommended configuration doesn't set sourceType #514

Open
Zwyx opened this issue Mar 19, 2025 · 1 comment · May be fixed by #515
Open

The recommended configuration doesn't set sourceType #514

Zwyx opened this issue Mar 19, 2025 · 1 comment · May be fixed by #515

Comments

@Zwyx
Copy link

Zwyx commented Mar 19, 2025

In the ReadMe, we can read that the recommended configuration sets sourceType to script.

However, I believe it doesn't actually do that. I had to do it myself in my plugin, and not doing it result in a silent fail where no rules are enforced, as mentioned in #483.

I'd be happy to make a PR, if we decide what we should do first:

  • remove the mention in the doc that the config sets sourceType, and guide the user to set sourceType themselves?
  • or, actually make the config set sourceType?
@bmish
Copy link
Member

bmish commented Mar 19, 2025

I believe we're omitting it from the config since some plugins are using ESM/TypeScript now.

Sets sourceType to script for CJS plugins (most users) (use module for ESM/TypeScript)

Zwyx added a commit to Zwyx/eslint-plugin-eslint-plugin that referenced this issue Mar 27, 2025
The recommended configuration doesn't set `sourceType` to `script` anymore. See eslint-community#514
@Zwyx Zwyx linked a pull request Mar 27, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants