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.

browserslist file doesn't support comments

See original GitHub issue

Hey there, when I add a comment to the top of my browserslist file, I get the error:

BrowserslistError: Unknown browser query `# TODO: [my comment]`
    at error (/home/site/node_modules/browserslist/index.js:37:11)
    at /home/site/node_modules/browserslist/index.js:222:9
    at Array.forEach (native)
    at browserslist (/home/site/node_modules/browserslist/index.js:196:13)
    at new BrowserSelection (/home/site/node_modules/doiuse/lib/browsers.js:17:18)
    at missing (/home/site/node_modules/doiuse/lib/missing-support.js:76:18)
    at doiuse (/home/site/node_modules/doiuse/lib/doiuse.js:42:25)
    at /home/site/node_modules/stylelint/lib/rules/no-unsupported-browser-features/index.js:41:5
    at Promise.resolve.then (/home/site/node_modules/stylelint/lib/lintSource.js:122:52)

This was surprising considering the example in the README:

# Browsers that we support

> 1%
Last 2 versions
IE 10 # sorry

I’m using browserslist 1.7.7.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Apr 15, 2017

I found problem — doiuse uses Browserslist in completely wrong way. I created a issue to fix it: https://github.com/anandthakker/doiuse/issues/67

Thanks for waiting 😃.

0reactions
ch2ch3commented, Apr 6, 2017

Hi @ai, check out https://github.com/ch2ch3/browserslist-comments. Run npm install && npm run lint:css and you should see the issue. I’ve added the debug log to the repository as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When Vite ignores your Browserslist configuration
Actually, Vite doesn't support Browserslist at all: the only reason it “seems” to work well with CSS is because Vite uses PostCSS, which...
Read more >
Angular 12 warns about requested IE 11 support. Why?
If the Angular CLI compiler doesn't find a .browserslistrc file or a browserslist config in your package.json it will use the default config ......
Read more >
Angular and Internet Explorer
Supporting Internet Explorer as a browser for your Angular 8.x or Angular 9.x application. ... Open the browserslist file in your IDE or...
Read more >
Browser support [#3090862] | Drupal.org
Jump to comment: Most recent. The browsers in the browserslist in the package file don't meet the browser supported by Drupal ...
Read more >
Introducing browserslist.dev
js if a browser doesn't support WebAssembly. If your browser isn't a part of the list, it doesn't mean our SDK won't work...
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