ls-lint icon indicating copy to clipboard operation
ls-lint copied to clipboard

--config option does not work under Windows

Open countzero opened this issue 1 year ago • 2 comments

Referencing a valid .ls-lint.yml results in an error:

ls-lint --config '../../.ls-lint.yml'

2024/03/14 11:56:55 open '../../.ls-lint.yml': The system cannot find the file specified.

The only workaround is executing the ls-lint command in the same directory where the .ls-lint.yml resides and using the -workdir option to reference the target 😉

countzero avatar Mar 14 '24 11:03 countzero

For now its not intended to go "backwards" from the workdir - therefore the workdir option exists

loeffel-io avatar Mar 15 '24 08:03 loeffel-io

@loeffel-io That is not my problem. The defect is, that the behaviour of the --config option is not cross-platform compatible.

In a Unix system ls-lint --config '../.ls-lint.yml' correctly resolves a configuration file in a parent directory. This fails in Windows.

Our use-case is to globally enforce one specific configuration in a npm workspaces monorepository project context.

countzero avatar Mar 22 '24 11:03 countzero

as i said, .. is currently not supported by ls-lint. Please reopen the issue if a path without .. is not working

more infos here: https://ls-lint.org/blog/announcements/v2.3.0.html#extending-configurations

loeffel-io avatar Apr 02 '25 12:04 loeffel-io