microsoft / vscode-eslint

VSCode extension to integrate eslint into VSCode
MIT License
1.73k stars 334 forks source link

When the user provides eslint.options, remove the requirement for a eslint.config.js file #1859

Open John-Dean opened 3 months ago

John-Dean commented 3 months ago

Hello,

In my VSCode settings.json I have the following:

    "eslint.options": {
        "baseConfig": {
            "rules": {
                ...RULES HERE
            }
        }
    }

When I format with eslint these are added to my eslint.config.js file.

However, the file still needs to exist somewhere for this to work.

Can we add a mode that only uses the eslint.options as the config file if it doesn't exist? i.e. If the config file can not be found, make an empty one and then proceed using an empty file in combination with "eslint.options".

At the moment I know this works as I have put a dummy config file in my C: directory which is completely empty, but if I remove this file eslint refuses to format.

Thanks, John

dbaeumer commented 3 months ago

I am not really convinced since this is something eslint itself expects and nothing the extension enforces.