-
-
Notifications
You must be signed in to change notification settings - Fork 929
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 '--absolute-config' for an absolute config path #5692
Comments
I don't think we need this, something wrong in your environments, |
Here is an example of the command I'm running and the output: # ~/project
❯ echo public/css/slider.css | stylelint --fix --config='/home/user/.config/.stylelintrc' --stdin-filename='public/css/slider.css'
Error: ENOENT: no such file or directory, open '/home/user/project/home/user/.config/.stylelintrc' |
would this be linked to #4521 ? |
@JacobTravers I am wondering if your reproduction code should be the following: 🤔
cat public/css/slider.css | stylelint --config ~/.config/.stylintrc --stdin --stdin-filename public/css/slider.css |
Sorry my mistake, I was using $ cat public/css/slider.css | stylelint --config ~/.config/.stylintrc --stdin --stdin-filename public/css/slider.css
Error: ENOENT: no such file or directory, open '/home/user/project/home/user/.config/.stylintrc' (edit: sorry for the accidental close/reopen) |
@JacobTravers Umm..., I cannot reproduce the error still. 🤔 My code: $ node_modules/.bin/stylelint --version
14.0.1
$ cat /tmp/a.css
a{}
$ cat ~/.config/.stylelintrc
rules:
block-no-empty: true
$ cat /tmp/a.css | node_modules/.bin/stylelint --config ~/.config/.stylelintrc --stdin --stdin-filename a.c
ss
a.css
1:2 ✖ Unexpected empty block block-no-empty
|
Sorry i'm dislexic, it looks like the command i was using this whole time had |
What is the problem you're trying to solve?
--config
seems to always use a relative path for the config file, so if you want to do something like--config='~/.config/.stylintrc'
you will get an error because the filecurrentWorkingDirectory/~/.config/.stylintrc
could not be found.What solution would you like to see?
I want to be able to use a an absolute path for the config file from the cli with
--absolute-config='~/.config/.stylintrc'
The text was updated successfully, but these errors were encountered: