Fix Webpack conf#3690
Conversation
+ conform to a bit more eslint (IDE makes my eyes hurt) + specify windows-specific copies of noParse regexes to stop the olm error Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
|
hm, by switching forward slashes for backwards slashes, doesn't this break things on unix in favour of working on windows? or is there some voodoo happening to make it work on unix too that i'm missing? also, i'm not keen on some of the formatting changes here (or mixing them together with the functional bit of the commit) - the long lines have been deliberately broken up in places for aesthetic clarity. (or has eslint bullied you into this?) |
|
It isn't switching forward slashes for backwards slashes, its providing a regex for each, so one would trigger on *nix and the other on Windows. If any regex trips then that file won't be parsed. ESLint very much bullied me complaining about a lacking trailing comma if its split across multiple lines, I trusted its false positives in the first commit and thus the test failed spectacularly. |
|
though the more readable approach is probably to use a character class with both forward and backward slashes and an appropriate comment its more readable than: new RegExp(path.join('highlight\.js', 'lib', 'languages')) |
add a comment so this madness has meaning Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
|
oh, sorry - i completely missed that it was adding the backslash regexp rather than replacing the fwdslash one. The character class feels miles better and is more DRYing- thanks. |
Fixes: