Closed screendriver closed 7 years ago
if (process.env.NODE_ENV !== 'production') { import('my-dev-package'); }
with tslint.json configuration:
tslint.json
{ "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"] }
In Visual Studio Code I get following error: [tslint] unused expression, expected an assignment or function call (no-unused-expression)
[tslint] unused expression, expected an assignment or function call (no-unused-expression)
Strangely if I run tslint from the command line I don't get this error
tslint
No error should be shown.
Nevermind. I forgot to change the TypeScript language level in my VSCode workspace to 2.4.1 🙄
2.4.1
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
In Visual Studio Code I get following error:
[tslint] unused expression, expected an assignment or function call (no-unused-expression)
Strangely if I run
tslint
from the command line I don't get this errorExpected behavior
No error should be shown.