[BUG] webhint ignores .browserslistrc in subfolder
See original GitHub issueEnvironment (please complete the following information):
- OS: Windows 10
- Extension version: 2.0.0
- Angular application (13.1.0)
Describe the bug:
I have an angular application and browsers are restricted to last 2 Edge versions
in .browserslistrc
. There are still hints (warnings/errors) about browser compatability.
E.g. scss width: fit-content
produces
width: fit-content’ is not supported by Firefox, Firefox for Android. Add ‘width: -moz-fit-content’ to support Firefox 3+, Firefox for Android 4+.Microsoft Edge Tools compat-api/css
Adding a .hintrc
with
{
"browserslist": [
"last 2 Edge versions"
]
}
didn’t help either.
(When I open a folder with only a scss file with such a property and the .hintrc it does work as expected.)
Repro steps:
- Create new angular application
- Restrict
.browserslistrc
tolast 2 Edge versions
(or major) - Add
.test { width: fit-content; }
toapp.component.scss
Expected behavior:
Only hint warnings/errors for browsers supported by the application.
Additional context:
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Browser configuration | webhint documentation
If you need to configure browsers for webhint without affecting other tools, you can specify a browserslist property in your .hintrc file using...
Read more >vscode-edge-devtools - bytemeta
Unable to start webhint. Ensure you are using the latest version of the `hint` ... [BUG] webhint ignores .browserslistrc in subfolder. Lakshmikanth2001.
Read more >open column ranges for more commands - Shenwei356/Csvtk
[BUG] webhint ignores .browserslistrc in subfolder, 7, 2022-06-08, 2022-08-29. Support optional YAML per AppConfigStore instance for feature_flags ...
Read more >Can the grid template columns of internet explorer be compatible ...
#663 opened this issue Nov 18, 2021 · 10 comments Assignees Labels bug Something isn't working tracked Comments Copy link commented • edited....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@antross Sorry for the late reply. I got sick and will only be able to check on this next week again on work. I didn’t update the
.browserslistrc
for this originally though. I just switched from the deprecated edge debugger to the new extension.I did a quick test on my home machine and it seems to work fine here (not my work projekt though). Maybe I have some other conflicting extension installed on my work machine.
Thanks @gunnarburmeister for the additional detail. Indeed, webhint only currently looks in the root of the workspace which seems to be the problem. I updated the issue title slightly to reflect this.
A full fix here likely involves having webhint lookup configs on a per-file basis (so it can look up the ancestor folder hierarchy of each given file for relevant configs rather than assuming the configs live at the workspace level).
FYI @vidorteg