Charca / gulp-arialinter

Gulp plugin for the accessibility tool AriaLinter
MIT License
9 stars 1 forks source link

SyntaxError #1

Open omarmeky opened 9 years ago

omarmeky commented 9 years ago

I am getting the following when running the linter:

node_modules/gulp-arialinter/node_modules/arialinter/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js:2 const xnv = require("xml-name-validator"); ^^^^^ SyntaxError: Use of const in strict mode.

Charca commented 9 years ago

It looks like a problem with jsdom, we might need to update dependencies in arialinter. Let me see if I can reproduce it.

omarmeky commented 9 years ago

Were you able to reproduce the issue?

Charca commented 9 years ago

I'm not able to reproduce it, but it looks like the issue is that jsdom no longer supports Node.js (only io.js). More info here: http://stackoverflow.com/questions/28756230/nodejs-parsing-dom-error-with-strict-mode

We are working around the idea of replacing jsdom in arialinter, but I guess we can downgrade the jsdom version for now. I'll let you know when it's done :)

EDIT: It looks like we're using a compatible jsdom version (^0.10.4), and Node.js support was droppend in 4.0.0. Did you do anything special when installing dependencies?

oliverbenns commented 9 years ago

I get this issue when using, I believe it's related to the above comment

`jsdom 4.x onward only works on io.js, not Node.js™: https://github.com/tmpvar
^
omarmeky commented 9 years ago

@Charca This is what I see now. I did not do anything special with node dependencies and have other gulp plugins working as expected:

/Users/omeky/Projects/precheck/node_modules/gulp-arialinter/node_modules/arialinter/node_modules/jsdom/lib/jsdom.js:3 `jsdom 4.x onward only works on io.js, not Node.js™: https://github.com/tmpvar ^ SyntaxError: Unexpected token ILLEGAL at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at /Users/omeky/Projects/precheck/node_modules/gulp-arialinter/node_modules/arialinter/lib/arialinter.js:13:15 at Object. (/Users/omeky/Projects/precheck/node_modules/gulp-arialinter/node_modules/arialinter/lib/arialinter.js:152:3) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)

omarmeky commented 9 years ago

@oliverbenns I handled the jsdom issue in my fork: https://github.com/omarmeky/gulp-arialinter

tbredin commented 9 years ago

+1 same issue as oliverbenns