Skip to content
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

Add an option to specify configuration file(s) #115

Open
spikyjt opened this issue Dec 15, 2021 · 3 comments
Open

Add an option to specify configuration file(s) #115

spikyjt opened this issue Dec 15, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@spikyjt
Copy link

spikyjt commented Dec 15, 2021

When I run esplint through lint-staged with husky, I get an error No config file found. We have a multi-package monorepo.

If we could specify the path to the esplint config file and the eslint config file, if necessary, then I think we could solve this.

@hjylewis
Copy link
Owner

Good idea!

Full transparency, I don't have a lot of time for this project.

Feel free to take a stab at this and open a PR. I don't think it will be too complex of a change. Otherwise, I'll get to it when I get to it.

This package uses cosmiconfig under the hood. https://github.com/davidtheclark/cosmiconfig. Looks like we'd just need to add a flag and call explorer.load(pathToConfig) when that flag is used.

@spikyjt
Copy link
Author

spikyjt commented Dec 15, 2021

So I discovered that this does actually work in a monorepo, we just have an extra complex setup, which currently has nested sub-packages (only temporary!)

Still it would be good to have a config file option.

I may get some time to contribute, but right now we are postponing implementing this package, as it takes longer to run than the linter. It would be ideal if it could run as part of eslint, rather than having to re-analyse.

@hjylewis
Copy link
Owner

I may get some time to contribute, but right now we are postponing implementing this package, as it takes longer to run than the linter. It would be ideal if it could run as part of eslint, rather than having to re-analyse.

Agreed. Technically you can run esplint instead of eslint since esplint runs eslint under the hood.

@hjylewis hjylewis added enhancement New feature or request help wanted Extra attention is needed labels Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants