WebStorm TSLint not reporting missing required Typescript method/function params

I just updated to the latest WebStorm (below) and TSLint is not highlighting method calls without required parameters. Is this a TSLint configuration problem or a WebStorm bug? Also, when I compile, no error is reported. What's wrong? Thanks.

 

WebStorm 2017.2
Build #WS-172.3317.70, built on July 14, 2017
Licensed to Ted Cohn
Subscription is active until June 20, 2018
JRE: 1.8.0_152-release-915-b5 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.5

2 comments

>Is this a TSLint configuration problem or a WebStorm bug?

If it's TSLint that is not reporting them, it's a TSLint issue:)  I'm, however, not aware of TSLint rules for this... Such errors are normally reported by the compiler

>Also, when I compile, no error is reported. What's wrong?

smth must be wrong with your code then. I'm not aware of any configuration for disabling TS2346 error. May be, your .ts file is excluded from compilation?

0

No, it's definitely being compiled. I see other errors reported in the file. Example, The first line should show an error since a menu param is required. The only error shown on the first line is "r is an unused variable" which is true. The second line is correct with specified param.

    const r = current.skipCurrentGroup();
    const result = current.skipCurrentGroup(as.req.menu);

Here's the signature of the method begin called:

    public skipCurrentGroup(menu: Menu): string | boolean

TSLint.json:

{
"extends": "tslint:recommended",
"rules": {
"arrow-parens": false,
"comment-format": false,
"curly": false,
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": false,
"member-ordering": false,
"no-arg": false,
"no-conditional-assignment": false,
"no-console": false,
"no-empty": false,
"no-eval": false,
"no-string-literal": false,
"no-unused-expression": false,
"no-unused-variable": true,
"no-var-requires": false,
"object-literal-shorthand": false,
"object-literal-sort-keys": false,
"one-line": false,
"only-arrow-functions": false,
"ordered-imports": false,
"quotemark": false,
"trailing-comma": false,
"variable-name": false
},
"rulesDirectory": [
]
}
TSConfig: 
{
"compilerOptions": {
"compileOnSave": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es6",
"sourceMap": true,
"inlineSources": true,
"preserveConstEnums": true,
"skipLibCheck": true, // Added to temp fix @types/lodash WeakMap bug https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14324
"removeComments": true,
"noImplicitAny": false,
"noUnusedParameters": false,
"experimentalDecorators": true,
"traceResolution": true
},
"exclude": [
"node_modules", "typings", "BotBuilder"
]
}

 

 
0

Please sign in to leave a comment.