Closed EvHaus closed 9 years ago
Not exactly sure but you might need to update jscs to latest (master)
Yeah, it's likely due to the missing estraverse visitor keys without the latest JSCS master.
@globexdesigns still an issue?
Yes. I'm running the latest version of JSCS.
Can you provide a snippet that reproduces the error please?
Thanks in advance. On Jul 10, 2015 12:43 AM, "Globex Designs, Inc." notifications@github.com wrote:
Yes. I'm running the latest version of JSCS.
— Reply to this email directly or view it on GitHub https://github.com/jscs-dev/babel-jscs/issues/11#issuecomment-120223108.
I am seeing the same error. I believe I have setup according to instructions. Here is output: Error: Unknown node type Super.
at Controller.traverse (C:\Program Files\nodejs\node_modules\jscs\node_modules\estraverse\estrave
rse.js:517:31)
at Object.traverse (C:\Program Files\nodejs\node_modules\jscs\node_modules\estraverse\estraverse.
js:709:27)
at Object.iterate (C:\Program Files\nodejs\node_modules\jscs\lib\tree-iterator.js:9:20)
at Object.JsFile.iterate (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:359:29)
at Object.JsFile._buildNodeIndex (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:752:14
)
at Object.JsFile (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:39:28)
at StringChecker._createJsFileInstance (C:\Program Files\nodejs\node_modules\jscs\lib\string-chec
ker.js:202:16)
at StringChecker.checkString (C:\Program Files\nodejs\node_modules\jscs\lib\string-checker.js:104
:25)
at null.
Can you provide a short snippet of code that results in the error so we can look into this/reproduce it? Probably involves classes and extends I assume?
On Jul 10, 2015 9:11 AM, "Craig Klementowski" notifications@github.com wrote:
I am seeing the same error. I believe I have setup according to instructions. Here is output: Error: Unknown node type Super. at Controller.traverse (C:\Program Files\nodejs\node_modules\jscs\node_modules\estraverse\estrave rse.js:517:31) at Object.traverse (C:\Program Files\nodejs\node_modules\jscs\node_modules\estraverse\estraverse. js:709:27) at Object.iterate (C:\Program Files\nodejs\node_modules\jscs\lib\tree-iterator.js:9:20) at Object.JsFile.iterate (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:359:29) at Object.JsFile._buildNodeIndex (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:752:14 ) at Object.JsFile (C:\Program Files\nodejs\node_modules\jscs\lib\js-file.js:39:28) at StringChecker._createJsFileInstance (C:\Program Files\nodejs\node_modules\jscs\lib\string-chec ker.js:202:16) at StringChecker.checkString (C:\Program Files\nodejs\node_modules\jscs\lib\string-checker.js:104 :25) at null. (C:\Program Files\nodejs\node_modules\jscs\lib\checker.js:43:21) at Array. (C:\Program Files\nodejs\node_modules\jscs\node_modules\vow\lib\vow.js:711:3 9)
— Reply to this email directly or view it on GitHub https://github.com/jscs-dev/babel-jscs/issues/11#issuecomment-120407279.
To clarify - running the latest (master) is not the same as the latest on npm (1.13.1).
You can do npm i jscs-dev/node-jscs --save-dev
or change package.json
// package.json
{
"jscs": "jscs-dev/node-jscs#master", // master branch
"jscs": "jscs-dev/node-jscs#4d7043" // or the specific commit
}
I tried with no issues: class A extends B {}
We are using React. All our React classes extend from React.Component and look similar to this: import React from 'react'; class Navbar extends React.Component { constructor(props) { super(props); this.state = { toggled: false }; render() {} } module.exports = Navbar;
Yeah I tried that (similar to the example I posted) and have no issues. You are probably using an old jscs commit (the latest version on npm but not the latest code on github) . Can you try what I posted before?
Yep I just tried installing with jscs 1.13.1 and I get the same error. You need to install the master branch because babel-jscs
isn't officially released since we are waiting for jscs 2.0 (next week).
After upgrading to babel-jscs 2.0.0, I'm getting this error when running
grunt-jscs
:This is not an issue with babel-jscs 1.0.3.
Any ideas?