Mayil-AI-Sandbox / eslint-v911

Clone of eslint v9.1.1 for debugging
MIT License
0 stars 0 forks source link

Change Request: Option to allow config fallback #11

Open btmills opened 1 month ago

btmills commented 1 month ago

ESLint version

v8.25.0

What problem do you want to solve?

I usually work with files that are not part of a project. They are just files on the fly on my machine.

Since I like to use the "standard" rule, I have installed it globally and added the option "overrideConfigFile" to vscode eslint extension. This way I don't have to install "standard" and any other plugins every single time.

The problem comes when I have to work on a project with its own eslint rules. If I use "overrideConfigFile", it will cause some problems, like a plugin is not found or the project itself is not using "standard".

To solve this problem, I just have to open vscode "settings.json" file and comment out "overrideConfigFile" option.

What do you think is the correct solution?

Skip the manual process of commenting out "overrideConfigFile" in vscode settings by following the next:

If any eslint config or config file is not found on root and up directories, use the file declared in "overrideConfigFile" option (or a new option name).

Participation

Additional comments

I'm opening the request over here instead of vscode eslint extension repository because while I was looking for a solution to this problem, I found out they rely entirely on the features you add: https://github.com/microsoft/vscode-eslint/issues/482#issuecomment-395336940

So I understand if this feature is added on a new version, it would be available on vscode eslint extension as well.

mayil-ai[bot] commented 1 month ago

To implement the fallback configuration feature in ESLint, follow these steps:

Code snippets to check