-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Find XO config based on linted file path #425
Conversation
Yay! This is really awesome 🙌
Can we make it:
And maybe drop |
Hmm, I guess it can be useful if you want to hide it. But should be |
🎉 Could you add a short readme example to show the user that this is possible? |
That's really common among JS projects to have the config files being based on the package name (without a It would also create a discrepancy between the |
Added a Tips |
And it's still based on the package name. We're just replacing I just don't like the
I honestly think the convention with
The package.json property is |
Made the change for config file name |
There's a slight regression in the code coverage: https://coveralls.io/builds/28770195/source?filename=lib/options-manager.js#L261 Otherwise, this looks good to me. When merged, should I do a new release or do you plan other changes soon? |
That was on line 303 before and wasn't tested either. |
I'm working on the Typescript support today. Not sure if I'll finish by the end of day. If I don't open the PR today, it will probably take a few days. |
031ec8b
to
51dae6c
Compare
Weird, not sure why Coveralls said the coverage fell on that line then 🤷♂️ |
Sounds good. Then I'll wait. Take your time. I was really just wondering whether anything would happen in the next few weeks for it to be worth waiting for. |
Thank you so much for working on this. This is such a great improvement 🙌 |
fix #331, fix #279, fix #330, fix #420, fix #65
This change the way to load the XO config files. Instead of looking for the config in directly
cwd
we now search for a config file starting from the directory of each linted and by walking up parent directories.The config files supported are now:
pacakge.json
,.xorc
(JSON only),.xorc.json
,.xorc.js
,xo.config.js
This PR will help to implement #373 as we can now build a different config per file mode easily. That will allow us to apply the Typescript rules only to the
.ts
/.tsx
files.A few other things incidentally added by the PR:
vscode-linter-xo
lintFiles
is now completely async allowing to parallelise looking for config files (async) with building/merginf config (sync)multimatch
withmicromatch
as it's the library used byglobby
which is already in the dependency treeIssueHunt Summary
Referenced issues
This pull request has been submitted to:
IssueHunt has been backed by the following sponsors. Become a sponsor