question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add option to use relative paths in commands

See original GitHub issue

currently lint-staged will pass absolute paths of every file matched file to the defined command in some cases resulting in unexpected results for commands, for example.

xo expects its configuration under package.json of the cwd in order to apply correct rules but when using xo /Users/foo/app/lib/path.js rather than lib/path.js it will ignore package.json some of its configuration (i.e: the overrides option).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zanonacommented, Jan 2, 2018

Thanks for replying @okonet. I understand it may be something that can also be defined in xo (I actually did let them know) but thought it could be a helpful feature to have under lint-staged as well with a --relative flag or something so it could be more flexible.

Would you feel that adding this feature could benefit other users or does it feels out of scope for you? Please let me know and I could try to send a PR if you believe it’s a good idea or would like to discuss further.

Thanks in advance

0reactions
buszucommented, Nov 16, 2018

@jeznag and others: you may be interested in this PR: https://github.com/okonet/lint-staged/pull/534.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use relative paths on windows CMD? - Super User
Start a process using the file my_executable.exe found (with starting point in the current directory (relative path)) by going two directories ...
Read more >
Is there a way to use Relative Path in "Command line ...
I am trying to figure out if it's possible to use a Relative Path in the "Command line arguments" start option setting in...
Read more >
Using relative paths in Linux scripts - Tjelvar Olsson
This post will show you how create scripts that have a clear separation between raw and derived data using relative paths.
Read more >
How Linux Relative Path Works with examples? - eduCBA
The Linux relative path the path is defined with the current working directory (for a present relative path, we can use the “pwd”...
Read more >
File path formats on Windows systems | Microsoft Learn
As result, the first is an absolute path from the root directory of drive C: , whereas the second is a relative path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found