Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Template strings not properly parsed #331

Closed
arnaudpourbaix opened this issue Feb 23, 2015 · 2 comments
Closed

Template strings not properly parsed #331

arnaudpourbaix opened this issue Feb 23, 2015 · 2 comments

Comments

@arnaudpourbaix
Copy link

Template strings (new feature of TS 1.4) don't seem to be properly handled.

Working example:

throw new Error(`ruleSet "${ruleSet.description}" has no defined output tied to type: ${rule.type}`);

Not working example:

throw new Error(`ruleSet "${ruleSet.description}" has no defined output for type: ${rule.type}`);

Output:

(curly) service.ts[89, 93]: for statements must be braced
(no-unused-expression) service.ts[89, 103]: expected an assignment or function call
(no-unused-expression) service.ts[89, 103]: expected an assignment or function call
(no-unused-expression) service.ts[89, 105]: expected an assignment or function call
(no-unreachable) service.ts[89, 93]: unreachable code
(semicolon) service.ts[89, 113]: missing semicolon

In this example, for was interpreted as an instruction instead of a template string. It results in several errors.

@adidahiya
Copy link
Contributor

Which version of tslint are you using?

@arnaudpourbaix
Copy link
Author

Wrong repository: sorry, I was using gulp-tslint

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants