12$: warn on combining characters in regexp character classes
https://biomejs.dev/linter/rules/no-misleading-character-class/
Hi @strager, I would be interested in tackling this issue :) Are strings within the parser encoded in any specific format (UTF-8, UTF-16**) or does it need to be able to "catch-all"?
Hi @strager, Sorry for the ping, just wondering if there was any update on this? Thanks :)
Are strings within the parser encoded in any specific format (UTF-8, UTF-16**) or does it need to be able to "catch-all"?
Within quick-lint-js's parser, source code is in UTF-8.
Here's the code which detects character classes in regexps: https://github.com/quick-lint/quick-lint-js/blob/68bd5cb4f49b847511ad7c6c09e12b5a3cb5689d/src/quick-lint-js/fe/lex.cpp#L1183 It's bare-bones because we don't do anything with the character classes currently. Feel free to rip it apart to implement this diagnostic.