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

Turn all paths cwd-relative before linting #372

Merged
merged 2 commits into from Apr 29, 2019

Conversation

futpib
Copy link
Contributor

@futpib futpib commented Jan 20, 2019

fix #223

@sindresorhus
Copy link
Member

It feels weird to turn paths relative. What if the overrides specify absolute paths? Wouldn't it make more sense to make the overrides paths absolute instead?

@futpib
Copy link
Contributor Author

futpib commented Apr 29, 2019

What if the overrides specify absolute paths?

Should overrides even support absolute paths? If you put an absolute path override in you package.json it probably won't work on anyone else's setup or in CI. For instance /Users/zanona/Developer/my-app/packages/shop-app/** (from #223 (comment)) clearly won't work for anyone else (username is in the path, the path is Mac-specific, etc.)

Wouldn't it make more sense to make the overrides paths absolute instead?

Would be hard to do this correctly since override paths are minimatch globs.

@sindresorhus
Copy link
Member

That's a good point.

@sindresorhus sindresorhus merged commit 3033fcd into xojs:master Apr 29, 2019
@sindresorhus
Copy link
Member

You need to add this PR to https://issuehunt.io/r/xojs/xo/issues/223 to get the bounty.

@niftylettuce
Copy link

@sindresorhus Can you please release a new version to NPM? The last release was January and this fix resolves issues with people using lint-staged.

@okanthony
Copy link

okanthony commented Aug 26, 2019

@sindresorhus ditto ^^ 🙏

@niftylettuce in the meantime you could always use a git URL to point to this specific commit in your package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overrides not working when calling xo with absolute paths
4 participants