eslint-config-flat-gitignore icon indicating copy to clipboard operation
eslint-config-flat-gitignore copied to clipboard

Allow override of some paths

Open joshbmarshall opened this issue 1 year ago • 2 comments

Clear and concise description of the problem

I have some vitesse projects where there is common code I keep in a separate git repository. So I have that as a subfolder of the projects and git clone there.

So that folder is in the .gitignore file as I wasn't going to add it as a submodule.

Because it's in the .gitignore file it's not running eslint on that common code.

Suggested solution

Would be great if we could somehow configure an override to allow some paths so they don't get ignored even though they are in the gitignore file

Alternative

I've currently disabled gitignore being used in the eslint.config.js but that means having to explicitly enter the paths to ignore and missing out on the goodness :)

Also considered using the common files as a git submodule but it comes with other complexities and git noise on the parent as it's the common repository that has the most dev activity.

Additional context

No response

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

joshbmarshall avatar Dec 10 '23 23:12 joshbmarshall

How would you like to see the API? A custom filter function allowing you to decided programmatically?

antfu avatar Dec 11 '23 16:12 antfu

In reality for me it would just be hard-coded configuration. Although a function may work well for other developers who have more complex requirements than I do.

To be honest I wasn't wanting to dictate how it should be done - you've got a better idea on how the code all fits together and I'm more than happy to follow your guidance :-)

joshbmarshall avatar Dec 11 '23 22:12 joshbmarshall