Closed eventualbuddha closed 10 years ago
I get the error Invalid ~/.jshintrc file
when I have comments in my jshintrc. Although comments are technically not allowed in JSON, they are pretty standard in jshintrc files.
ping @wookiehangover.
@eventualbuddha thanks for the ping, had forgotten about this one (looking at vim-script makes me sad inside.)
This was failing with the jshintrc file from the charlatan library. Backreferences do not seem to work in character classes, so we can't collapse single and double quotes into a single test. This commit splits them out to work separately.
In the above example the first line should have returned false if backreferences worked in character classes, but it did not. The second example works as you'd think, but for the wrong reason. The third example shows what's really going on. Rather than being treated as a backreference,
\1
is being interpreted as the character code 1.