-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
no-undef error for 'module' in created .eslintrc.js when using ESM and not-Node #59
Comments
I don't think so. Unless someone explicitly says that the JavaScript is intended to run on Node.js, adding a whole environment might cause problems. We could add
I'm not sure I understand the context of this comment. Soon, we'll switch |
Oh, is it not the case that An example target project could be no environment for source files in general but still Node for
I was worried that you / the ESLint team would see that this issue is for the legacy config and wontfix it because
...huh. I find that to be a surprising comment. Given that Edit: added clarification to the OP |
Fair point, got my wires crossed a bit. Still, we are phasing out the use of environments, so don't want to start introducing them in new places.
Most people don't start projects from scratch. They end up joining a project already in progress or, if they actually are starting from scratch, they tend to just copy over existing configuration rather than running |
TIL. Are there discussion notes somewhere explaining more on that? Any formal plans around deprecation?
Just making sure we're talking about the same thing: I'm attempting to report a seeming-bug in Taking a step back from Note that in typescript-eslint/typescript-eslint#6825 -> typescript-eslint/typescript-eslint#6918 we added |
TSC meeting transcripts and notes are available here: https://github.com/eslint/tsc-meetings
Yes. I'm just saying that because environments are going away, I'd prefer the fix to just add the missing global rather than adding in the environment. |
Oops, also announced that environments are going away here: https://eslint.org/blog/2022/08/new-config-system-part-2/#goodbye-environments%2C-hello-globals |
see the discussion: #59 (comment)
see the discussion: #59 (comment)
I ran this creator with as few plugins / extra points as possible, with
esm
as the module selection:The config file itself not following the linted rules is something that I've seen confuse newcomers repeatedly. Example: typescript-eslint/typescript-eslint#6825
Since
no-undef
will hit roughly every project that uses ESM, is putting an/* eslint-env node */
on top of the config (if it would violateno-undef
formodule.exports = ...
) reasonable?I also understand the new flat config is going to take over within the next 1-5 years. A lot of people still use the current config, so it'd be nice to have it be less confusing to them in the interim.
Edit: to be clear, what I found confusing is that this ESLint error is caused by running ESLint with the config generated by init:
The text was updated successfully, but these errors were encountered: