dfreeman / ember-css-modules-reporter

An ember-css-modules plugin that logs and generates lint tests for PostCSS plugin warnings and errors
MIT License
4 stars 1 forks source link

Bad character escape sequence #12

Open lolmaus opened 5 years ago

lolmaus commented 5 years ago

Dang! Looks like a Build Error.

appname/tests/lint/css-warnings-0.lint-test.js

C:\Code\appname\tests\lint\css-warnings-0.lint-test.js: Bad character escape sequence (11:18)

   9 |     // precompiled test passed
  10 |   });
> 11 |   it('appname\styles\utils\layout.scss', function() {
     |                   ^
  12 |     // precompiled test passed
  13 |   });
  14 |   it('appname\pods\index\styles.scss', function() {

Should be double slash \\, I guess.

dfreeman commented 5 years ago

Looks like ember-cli's built in generateTestFile doesn't escape the strings it's given before emitting them into the test file 🤔

I'm not likely to have a chance to fix this in the near future (my OSS time is pretty limited right now, and what I do have is mostly focused on getting ember-css-modules core more future-ready for things like Embroider and component colocation), but I'd be happy to look at a PR with a fix.