tslint Questions
8
I know that it is not ideal to reload an Angular Single Page Application. However there is a place that I need to reload the full application.
TSLint says that reload is deprecated.
Is there any al...
Preston asked 12/3, 2019 at 17:42
7
Solved
I'm pretty new to TypeScript and I would like to know if there exists a good way to rewrite code to avoid TSLint error "object access via string literals is disallowed" in the following code
inter...
Padishah asked 28/10, 2015 at 9:18
1
Solved
Is it possible to write a multiline js code in JSX?
return (
<b>{
const a = props.users.find((user) => user.id === post.userId)
console.log(a) // I want to console.log
return a
}</...
Prothesis asked 9/2, 2021 at 11:53
1
Solved
typescript source code use undefined! in many places. For example, in binder.ts, from line 261 to 271:
file = undefined!;
options = undefined!;
languageVersion = undefined!;
parent = undefined!...
Pharmacy asked 17/1, 2021 at 4:11
4
Solved
I searched on Stackoverflow and on the web, I found this thread https://github.com/Microsoft/TypeScript/issues/14813 but it does not solve my problem. I run into this error while compiling my code ...
Exclusion asked 4/6, 2018 at 9:54
2
Solved
I'm using TSLint extension for VS Code. I got bunch of [tslint] misplaced 'else' (one-line) warnings. For example, at the below code sample, linter underlines else word and gives same warning:
Cod...
Mozzarella asked 17/3, 2017 at 6:33
3
Solved
I cannot figure out why my tslint even want to see the trailing comma on the end of the last line in the objects? How can I set the ignore rule for the last line of the objects for example? Thanks....
Advocate asked 7/9, 2018 at 8:16
3
Solved
I have a situation where tslint is working on SOME VS Code projects while not working on other projects. The projects where it's working are from create-react-app with TypeScript modifications.
But...
Dierdre asked 23/7, 2018 at 21:22
3
Solved
I use tslint with default config tslint:recommended and I want to adapt as less rules as possible.
Certain rules enforce that imports should be alphabetized:
src/core/task/TaskMockDecorator.ts[2,...
Cresting asked 4/12, 2016 at 17:56
3
After upgrading angular from 9 to 10 and run npm run lint, I got this
experiment
> ng lint --fix
Schema validation failed with the following errors:
Data path "" should NOT have addit...
Squarerigger asked 11/9, 2020 at 8:49
2
Solved
I have a function in my code:
networkStop = (action: string = null) => {
this.action[action] = false;
this.net = false;
this.netd = false;
}
I'm getting a TsLint error saying:
Message 4 T...
Kristynkrock asked 23/8, 2014 at 6:33
10
Solved
The IDE being used is WebStorm 11.0.3, the tslint is configured and works, but, it hangs because it tries to parse large *.d.ts library files.
Is there a way to ignore a particular file or direct...
Recidivism asked 3/1, 2016 at 16:16
3
I have some variable names starting with leading underscore , I still get this warning after updating my tslint.json
tslint.json
{
"extends": "tslint:recommended",
"rules": {
"variable-name": ...
Outdated asked 29/3, 2017 at 17:0
8
Solved
I recently updated from Angular 5 to Angular 6.
I'm getting this warning combineLatest is deprecated: resultSelector no longer supported, pipe to map instead. Rxjs is version 6.1.0, tslint is 5.10....
2
Solved
In my settings.json, I have:
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
Yet my typescript suppor...
Geriatrics asked 14/10, 2020 at 5:29
3
Solved
After reading the newest Firebase blog post Why you should use TypeScript for writing Cloud Functions, I decided to try tslint and it's amazing, though I have a problem with my types.
I have an im...
Resinate asked 21/1, 2018 at 10:54
0
Why is Angular 10 making its Default Lint Program TSLint, when its deprecated? Does Angular recommend TSLint or ESLint?
https://angular.io/cli/lint
https://palantir.github.io/tslint/
Democratic asked 5/9, 2020 at 1:38
3
I'm using VSCode with prettier plugin and typescript and also tslint.
Leaving aside the convenience to use this configuration, I get a
[tslint] Exceeds maximum line length of 120 (max-line-length...
Altdorfer asked 22/1, 2018 at 15:29
3
Solved
I like to exclude the test folder form linting with tslint in vscode. So I have placed an exclude into my tslint.json config file. Unfortunately the exclude statement is not working. Does any one k...
Titivate asked 8/9, 2016 at 10:27
6
Solved
[64, 1]: space indentation expected
[15, 27]: Missing semicolon
[109, 36]: missing whitespace
[111, 24]: missing whitespace
[70, 1]: Consecutive blank lines are forbidden
I keep getting warn...
Longhair asked 30/6, 2017 at 7:42
2
Solved
Is there a way to change in WebStorm the error red lines given by TSLint to a less alarming line (Warning or similar)?
Below is an example of what I want to avoid:
Variolite asked 31/7, 2017 at 22:49
5
In my Angular application, I have few components which are used while testing and not included in any module.
In WebStorm, it shows me a lint error saying Component is not included in any module, ...
2
Solved
I have an abstract Base Component that cleans subscriptions with oneself:
import { OnDestroy, OnInit } from '@angular/core';
import { Subject } from 'rxjs/Subject';
export abstract class N...
4
Solved
Typescript version 2.2.2
I wrote this require in my UserRoutzr.ts
const users = <IUser[]> require(path.join(process.cwd() + "/data"));
TSLint is raising the following warning:
require st...
Prostatitis asked 30/3, 2017 at 8:39
6
I'm doing some basic asynchronous operations using async/await in TypeScript but TSLint is throwing mysterious error messages for these two functions below. Has anyone encountered these errors befo...
Juryrig asked 15/5, 2017 at 12:57
© 2022 - 2024 — McMap. All rights reserved.