-
Notifications
You must be signed in to change notification settings - Fork 342
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
options.overrideConfigFile
looks in subfolder if eslint.config.mjs
and linted file are in the same directory
#1966
Comments
options.overrideConfigFile
a linted file at cwd/config/a.txt
looks for cwd/config/conig/a.txt
for a file.options.overrideConfigFile
in settings.json
looks for subfolder if config file and linted file are in the same directory
options.overrideConfigFile
in settings.json
looks for subfolder if config file and linted file are in the same directoryoptions.overrideConfigFile
looks in subfolder if config file and linted file are in the same directory
options.overrideConfigFile
looks in subfolder if config file and linted file are in the same directoryoptions.overrideConfigFile
looks in subfolder if eslint.config.mjs
and linted file are in the same directory
@SedrickHeiniger does the same happen when you lint the file in the terminal specify the config file as a command line option. If so, can you please provide me with a GitHub repository I can clone with a minimal setup that demos what you are seeing. Thanks! |
@dbaeumer When moving |
So., can you please provide me with a GitHub repository I can clone with a minimal setup that demos what you are seeing. Thanks |
@dbaeumer Well, I've just made a new minimal project and there everything worked as it should. Then I've uncommented my old ESLint extensions settings in my actual project for reproducing the bug and now this also works fine! 🙂 I'm new in software development and not very experienced. Maybe (hopefully) I've just made a stupid mistake. I'm not able to reproduce it anymore so I think you can close this issue. I'll make a new issue if it should happen again. |
Summary
The issue in a short sentence:
Some Points to Mention
eslint.config.mjs
andsomeFile.mjs
are in the same directory.eslint.config.mjs
has nothing exceptexport default {}
in it (tested).eslint.config.mjs
intooptions.overrideConfigFile
(insettings.json
) (tested).Currently I've just moved my
eslint.config.mjs
to my root because of this.Thank you so much for fixing this! (If I'm not the one doing something wrong 🙂).
Reproducing this Bug
Setup:
eslint.config.mjs
:settings.json
(Snippet)File System: (
eslint.config.mjs
anddev-server.mjs
are both in${workspaceFolder}/config/
)Output:
When updating
settings.json
ESLint will start linting and you'll get the following error in the ESLint console in the VS Code "output" panel.The text was updated successfully, but these errors were encountered: