Open
Description
I have a strange behavior with the CLI and configuration file.
I have a .htmlhintrc
file at the root of my project.
When I run htmlhint src
, it finds the config file and correctly lint my html files, but when I run htmlhint src/**/*.html
I have an error saying that the configuration is not found?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mitorez commentedon Jan 31, 2017
I have a similarly related issue.
I don't receive an error that the configuration wasn't found, but if I run
htmlhint src/*.html src/**/*.html
it doesn't use my.htmlhintrc
file - it's using "something else", maybe the built-in defaults. If I runhtmlhint src/*.html src/**/*.html --config .htmlhintrc
it works as expected.This was literally working last week. HTMLHint hasn't been updated, still using
htmlhint 0.9.13
, but I did do a fresh install of my project this week so dependencies have been updated. I'm not sure how to troubleshoot the issue, so I'm continuing to specify--config
.Environment:
ianwalter commentedon Feb 1, 2017
@mitorez You could do
htmlhint ./src/**/*.html
adding the./
fixes the issue for me. Should we just add some code that prepends it tobase
in thegetConfig
function?mitorez commentedon Feb 1, 2017
@ianwalter Unfortunately pre-pending
./
didn't work for me. I ranhtmlhint ./src/*.html ./src/**/*.html
just now and it still failed to load the.htmlhint
.htmlhintrc
at the root of the project.ianwalter commentedon Feb 1, 2017
@mitorez Do you mean
.htmlhintrc
? Or did you name it incorrectly?mitorez commentedon Feb 1, 2017
@ianwalter You had me second-guessing myself there for a second 😉 That was a typo on my part. My configuration file is named correctly (
.htmlhintrc
) at the project root.sinedied commentedon May 4, 2017
On windows platforms,
.htmlhintrc
is not found whatever I try.htmlhint src
orhtmlhint ./src
fails, buthtmlhint src --config .htmlhintrc
works.mitorez commentedon May 5, 2017
This has been working for me on Windows:
htmlhint src/**/*.html --config .htmlhintrc
sinedied commentedon May 5, 2017
@mitorez yes using the
--config
option works, but it misses the point.You shouldn't have to add this option in the first place, that's the issue.
stale commentedon May 14, 2020
sinedied commentedon May 15, 2020
Not sure using a stale bot will help resolution ongoing bugs :/
stale commentedon Jul 14, 2020
7 remaining items