Unknown node type ClassProperty.
kurtextrem opened this issue · 6 comments
I hope you don't get overwhelmed by my eslintrc: https://pastebin.com/mtrYnfTV
Hi, thanks for the issue.
Class properties are not implemented yet as they are not part of the current ECMAScript standard but I think it should not be too difficult.
However, I'm struggling a little with finding out which of your plugins adds this feature to ESLint. It would be really helpful if you could find out which one is necessary + what the code actually looks like that throws the error.
Thanks!
The Code is the one in the screenshot:
class XYZ {
addStorageListener = () => {
chrome.storage.onChanged.addListener(this.storageListener)
}
}
and I'm fairly sure it's enabled through one of the following:
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true,
"experimentalObjectRestSpread": true,
"allowImportExportEverywhere": true,
"sourceType": "module"
}
},
(parser "babel-eslint" and "ecmaVersion": 8)
Thanks! Yes, I think it es the babel-eslint parser. What babel plugins are you using?
No plugins for the parser, just those settings. However I'm using a pre-release version. https://github.com/babel/babel-eslint/releases/tag/v8.0.0-alpha.17
Ok, thanks for the feedback. A new release should be published any minute now. Note that there are probably a few more quirks of babel-eslint that are not properly supported yet, just file another issue if you stumble upon another one :)
Working fine, thank you :)
Will report back if I find anything else.