Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codelyzer does not work with Typescript@next (2.1.0) #72

Closed
httpdigest opened this issue Jul 25, 2016 · 7 comments
Closed

Codelyzer does not work with Typescript@next (2.1.0) #72

httpdigest opened this issue Jul 25, 2016 · 7 comments
Assignees

Comments

@httpdigest
Copy link

We currently need typescript@next to have a bug with Promise.all fixed (among others). But codelyzer does not work with that Typescript version:

The following error message is printed:

Error: Unsupported TypeScript version: 2.1.0-dev.20160725
    at Object.current (D:\...\node_modules\codelyzer\util\syntaxKind.js:1796:23)
    at ClassMetadataWalker.visitClassDeclaration (D:\...\node_modules\codelyzer\useLifeCycleInterfaceRule.js:40:37)
    at ClassMetadataWalker.SyntaxWalker.visitNode (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:264:22)
    at D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:63
    at visitEachNode (D:\...\node_modules\typescript\lib\typescript.js:8115:30)
    at Object.forEachChild (D:\...\node_modules\typescript\lib\typescript.js:8273:24)
    at ClassMetadataWalker.SyntaxWalker.walkChildren (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:12)
    at ClassMetadataWalker.SyntaxWalker.visitSourceFile (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:190:14)
    at ClassMetadataWalker.SyntaxWalker.visitNode (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:414:22)
    at ClassMetadataWalker.SyntaxWalker.walk (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:7:14)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "C:\\Users\\...\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "tslint"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! ...@...-SNAPSHOT tslint: `tslint -c ./node_modules/.../tslint.json --force ./app/**/*.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ...@...-SNAPSHOT tslint script 'tslint -c ./node_modules/.../tslint.json --force ./app/**/*.ts'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ... package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tslint -c ./node_modules/.../tslint.json --force ./app/**/*.ts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ...
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ...
npm ERR! There is likely additional logging output above.
@httpdigest
Copy link
Author

When I fix the source syntaxKind.js and simply add another case like this, it works:

else if (/2\.1\..*/.test(ts.version)) {
    cachedKinds = SyntaxKind_2_0;
}

@mgechev
Copy link
Owner

mgechev commented Jul 25, 2016

Hey @httpdigest it is kind of risky to use a fix like the one you provided because we're not sure the syntax tokens have the same values. I'll fix this issue in a couple of days.

@jppellerin
Copy link

Any news on this? (Same issue with any version >= 2.0.0)

@mgechev
Copy link
Owner

mgechev commented Aug 9, 2016

@jppellerin should be working for 2.0.0. Are you using 0.0.26? I'll fix it for >2.0.0 in the next week.

@jppellerin
Copy link

@mgechev : Yup... user error on that one. Apologies. Not sure why it didn't upgrade with ^0.0.23... but forced it to 0.0.26 and it worked. Thank you.

@httpdigest
Copy link
Author

Is this still being worked on? Using codelyzer with TypeScript 2.1.0-* does not work with the following error message (as mentioned in the first post of this issue):

Error: Unsupported TypeScript version: 2.1.0-dev.20160919
    at Object.current (D:\...\node_modules\codelyzer\util\syntaxKind.js:1796:23)
    at SelectorNameValidatorWalker.validateSelector (D:\...\node_modules\codelyzer\selectorNameBase.js:75:37)
    at SelectorNameValidatorWalker.validateDecorator (D:\...\node_modules\codelyzer\selectorNameBase.js:70:18)
    at Array.forEach (native)
    at SelectorNameValidatorWalker.visitClassDeclaration (D:\...\node_modules\codelyzer\selectorNameBase.js:58:33)
    at SelectorNameValidatorWalker.SyntaxWalker.visitNode (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:264:22)
    at D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:63
    at visitEachNode (D:\...\node_modules\typescript\lib\typescript.js:12465:30)
    at Object.forEachChild (D:\...\node_modules\typescript\lib\typescript.js:12625:24)
    at SelectorNameValidatorWalker.SyntaxWalker.walkChildren (D:\...\node_modules\tslint\lib\language\walker\syntaxWalker.js:459:12)

@mgechev mgechev added this to the Beta 1 milestone Sep 19, 2016
@mgechev mgechev self-assigned this Sep 19, 2016
@mgechev
Copy link
Owner

mgechev commented Sep 19, 2016

Should be fixed in the next a couple of days and released together with the template support.

@mgechev mgechev added the P1 label Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants