-
-
Notifications
You must be signed in to change notification settings - Fork 239
TypeError: Cannot read property 'match' of undefined #242
Comments
Are you getting this issue with 5.0.0-beta6? (I just want to know if this to due to the beta7 changes) |
Going back to |
Ah yeah beta7 was an acorn-to-esprima update so that must be the issue. cc @jmm it looks like the directive change caused this issue since this rule is checking all literals.. https://github.com/eslint/eslint/blob/master/lib/rules/no-irregular-whitespace.js#L124 https://github.com/babel/acorn-to-esprima/pull/5/files Just gotta add the node.raw value to literal since you changed it - code is above that if (!node.raw) {
if (node.extra && node.extra.raw) {
node.raw = node.extra.raw;
} else {
node.raw = source.slice(node.start, node.end);
}
} |
@hzoo Thanks for the links, I'll have to take a look. I'm not sure off the top of my head what would cause the difference from if Espree parsed the code to it's directive representation (which would have |
Should be good on beta8 |
Thanks @hzoo! |
We are getting this error after the latest
babel-eslint
5.0.0-beta7
. We are using the latests stableeslint
release1.10.3
and node4.2.6
Our
eslintConfig
in ourpackage.json
is as follow:The stack trace seems to point towards this
if
statement:If we remove
"extends": "airbnb"
from oureslintConfig
then the lint runs successfully (albeit with hundreds of linting errors, of course.)The text was updated successfully, but these errors were encountered: