beforeDestroy(){
^
window.removeEventListener('resize', this.handleWindowResize);
}
with tslint.json configuration:
{
"defaultSeverity": "warning",
"extends": [
"tslint:recommended"
],
"linterOptions": {
"exclude": [
"node_modules/**",
"**/*.json"
]
},
"rules": {
"quotemark": false,
"indent": [true, "spaces", 2],
"interface-name": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"no-consecutive-blank-lines": false,
"whitespace": false,
"typedef-whitespace": false,
"no-trailing-whitespace": false,
"no-irregular-whitespace": false,
"space-before-function-paren": false,
"space-within-parens":false,
"prefer-const":false,
"max-line-length":false,
"comment-format":false,
"member-access":false,
"arrow-parens":false
}
}
I still get the whitespace error, I'm assuming because of the "check-preblock" check in the whitespace rule. All the other rules are correctly being turned off by the configuration, but not this one
No more whitespace errors
I think this is a 5.12.0 regression in how tslint does configuration parsing / assigns default rule options. I can repro the bug in the tslint-playground and see a similar issue for "quotemark"
I also tried 5.11.0 too, same problem. Would there be a better candidate version to try and use?
I also get a bit strange warning for a question mark with 5.11.0
@Output()` onRemove? = new EventEmitter<void>();
^---- missing whitespace
````
It goes away if I set the type as below or If I disable "check-preblock" rule
@Output() onRemove?: EventEmitter
EDIT: whitespace is set to this value in tslint.json:
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-preblock"
],
```
and we are extending "tslint-angular" set
I'm new to tslint, so I'm just checking here, should setting the entire whitespace rule to false like this:
"whitespace": false,
disable every whitespace check? Or do I need to list out the individual rules to disable them all?
Looks like the error I described before was introduced with 5.9.0 - so @chriszrc I would downgrade to 5.8.0 if you do not rely on new features
@FDIM huh, I tried downgrading all the way back to 5.6.0 but I still get the whitespace errors :(
If you want to see which rules are causing lint failures (so you can disable them), try using the "verbose" or "stylish" formatter. There are open issues to make this formatter the default (#3460) and group all formatting rules together (#3592).
+1 for it being the default, but actually I tried to change the formatter, but without luck, since it appears you can't change it from tslint.json, and I'm running tslint from the vue cli, which runs it from a webpack plugin that appears to not respect additional flags passed to it from the command line. And I haven't worked out how to run tslint from the command line, because it's a vue project, and the .vue files would need to be preprocessed first :(
But more importantly, are you saying that my tslint.json from the beginning of this issue could be missing rules or hasn't properly disabled some of the whitespace rules?
@chriszrc I'm not sure; it seems like you're correctly disabled all the right rules but I'm still seeing the lint failures reported in the tslint playground so this looks like a regression, but I haven't had time to dig into it yet:

@adidahiya ok, thanks for confirming. Not sure if this is just due to the formatter or not, but the warning I get locally is missing whitespace not the full Missing whitespace before function parens. Thanks for looking into this-
TSLint is being deprecated and no longer accepting pull requests for major new changes or features. See #4534. ๐ฑ
If you'd like to see this change implemented, you have two choices:
๐ It was a pleasure open sourcing with you!
_If you believe this message was posted here in error, please comment so we can re-open the issue!_
๐ค Beep boop! ๐ TSLint is deprecated ๐ _(#4534)_ and you should switch to typescript-eslint! ๐ค
๐ This issue is being locked to prevent further unnecessary discussions. Thank you! ๐