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

TS6133: 'args' is declared but never used. #325

Open
phil123456 opened this issue Mar 30, 2017 · 8 comments
Open

TS6133: 'args' is declared but never used. #325

phil123456 opened this issue Mar 30, 2017 · 8 comments

Comments

@phil123456
Copy link

Hi,

I tried to put my code in that seed, but I keep getting these although I set "no-unused-expression": false, in tslint.json (not sure this suffice or is related)

these errors are all over the place, I tried commenting and removing unused stuffs, but here in a pipe, I dont need to use args parameter

can you hint me how to sort this ? why does it stop compilation at all ?

thanks

@maxx0r
Copy link

maxx0r commented Mar 30, 2017 via email

@phil123456
Copy link
Author

phil123456 commented Mar 30, 2017

I commented the args, but I dont like that, they are default pie transform args, thought it would be better to leave them in case I want to use them

no there is no no-unused-var setting, I'll give it a try

actually it would be better to leave that on and ignore some cases

@maxx0r
Copy link

maxx0r commented Mar 30, 2017 via email

@phil123456
Copy link
Author

phil123456 commented Mar 30, 2017

I tried tslint ignore with no luck

btw I get tons of

[42, 9]: if statements must be braced
[44, 9]: else statements must be braced
[50, 9]: if statements must be braced
[52, 9]: else statements must be braced
[26, 23]: " should be '
[26, 61]: " should be '
[5, 31]: Missing semicolon
[45, 40]: Missing semicolon

in chrome console, I think it's a nice feature, but is there no way to disable some of these ?
like having to put ' instead of " is really not my cup of tea and I am not sure it is really necessary

@maxx0r
Copy link

maxx0r commented Mar 30, 2017

Thats all configurable in the TSHint json file. That's no issue from this starter

On a personal note, it's better to follow the conventions in the long run.

@phil123456
Copy link
Author

ok, thanks
nice seed so far ;-)

@GaryB432
Copy link
Contributor

The noUnusedLocals and noUnusedParameters rules are not in tslint anymore but are now part of the TypeScript transpiler itself, both are set to true in tsconfig.json. You can prefix the name of an unused arg with an underscore to exempt it from the rule.

@phil123456
Copy link
Author

nice, thanks

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

No branches or pull requests

3 participants