tslint Questions
1
Solved
I'm using TypeScript along with TSLint, and I have the following code:
var myObj = {}
var id = "key"
myObj[id] = 1
delete myObj[id]
But I receive a hint from TSLint: Do not delete dynamically co...
Thorite asked 18/2, 2018 at 13:44
2
I am facing issue when I am trying to run tslint from Angular Cli.
> ng lint
Error
Failed to load E:\Projects\lsp-ui\node_modules\ng2-slimscroll\tslint.json: Could not find custom rule directo...
2
I'm currently using WebStorm (2017.2.4) on MacOS Sierra and this pop-up shows up once in a while:
My colleagues and I have exactly the same TSLint config and code style defined in WebStorm. The pr...
Massproduce asked 16/9, 2017 at 10:14
1
Solved
I'm trying to configure the max line length (among other settings) for TS Lint in VS code but no matter what changes I make it doesn't 'take'.
So, the first strange thing is that VS code's TS Lint...
Selmaselman asked 12/2, 2018 at 10:55
1
I have found this gulp html angular validate
but I am not entirely sure if this is event for angular 2 +. Also, I was looking for something that was more like a lint, while you are working, versus...
Luminescent asked 6/7, 2017 at 18:40
1
Solved
I'm leading a team working on Angular2+/Typescript project and I just want to know if there is a way to disallow disabling any TSLint rules.
We are using VSCode and my team's developpers trend to ...
Cappella asked 8/1, 2018 at 8:39
1
I have some rules in my tslint.json that require the --type-check functionality. WebStorm doesn't give me a way to add the command-line argument and to the TSLint plugin. It also doesn't give me a ...
0
I'm trying to add precommit-hook to my project, this is my script section on package.json:
"scripts": {
...
"lint": "npm run lint:sass && npm run lint:js",
...
Labradorite asked 11/12, 2017 at 21:16
0
Angular 4+ provides a way to perform if/else logic in the template file, e.g.
<ng-container *ngIf="isSaveSuccess; else elseBlock">
Save succeeded.
</ng-container>
<ng-template #els...
Trifolium asked 8/12, 2017 at 20:44
2
Solved
When I tslint my whole project using tslint --project tsconfig.json src/**/*.ts I get lots of tslint errors like these:
Invalid 'await' of a non-Promise value.
These errors pops up in every li...
Pleuron asked 4/12, 2017 at 15:41
2
I'm using the Angular starter kit
and I'm trying to get tslint to autofix all my lint problems with the --fix flag.
I'm running the script:
npm run tslint --fix src/**/*.ts
It just generates the...
Lazare asked 15/8, 2017 at 5:40
1
Solved
When using an import such as below:
import { Component, OnInit } from "@angular/core";
Is it convention to use single or double quotes around "@angular/core"?
TSLint complians saying:
[tslint...
Sit asked 25/11, 2017 at 21:2
1
I am using TSLint with "no-any": true, "no-unsafe-any": true. It disallow:
let foo: any;
However it still allows:
let foo;
How to turn on the rule for implicit any?
Cultural asked 17/11, 2017 at 5:45
2
Solved
Typescript(tslint in atom editor) is giving me a typescript error, but i cannot figure out how to set the correct type.
Error message:
chat component:
private _chatObserver: Observable<fire...
Menjivar asked 24/10, 2017 at 9:19
2
My Angular2 project in WebStorm suddenly started to show for each TSLint .ts inspection
TSLint: error: unknown option `-t json'
Reseat asked 12/7, 2017 at 22:40
2
Solved
What exactly does this rule effectuate?
"use-life-cycle-interface": true,
Parimutuel asked 12/8, 2016 at 12:28
1
Solved
I have a component generated by angular-cli and the resulting code for the .ts file has:
ngOnInit() {
}
instead of
ngOnInit(): void {
}
My tslint is configured to always want typedefs present...
Chilton asked 4/9, 2017 at 21:50
1
So, I have my tsconfig.json and tslint.json at the root of my project. When I run tslint, it displays all of the errors in Terminal. But I do not get any hints/lines in VS Code. I'm driving myself ...
Vauban asked 29/8, 2017 at 23:24
2
Solved
I am writing a Node.js application using the tslint:recommended rule set and it warns me about the usage of console.log in my code:
src/index.ts[1, 1]: Calls to 'console.log' are not allowed.
Wh...
Pritchett asked 29/9, 2016 at 11:47
3
Solved
I have an angular2 Project that I compress/compile with webpack.
I use tslink loader with webpack so I have tslint related configuration in webpack.config.js.
module.exports = {
...
tslint: {
co...
Aurum asked 7/10, 2016 at 14:33
3
Solved
I have a TypeScript class like so:
class Foo<Props extends {}> {
public readonly props: Props;
public readonly otherStuff: string[];
constructor(properties: Props | string[], otherStuff?...
Aforetime asked 24/8, 2017 at 5:12
1
Solved
I'm using WebStorm and trying to keep such code style:
But when I do that, TSLint underlines my spaces and gives me the hint:
"Too many spaces before 'from' (import-spacing)".
My question i...
Butanone asked 22/8, 2017 at 22:33
4
TSLint requires an import like this...
import { RouterModule } from "@angular/router";
However, my IDE imports everything like this...
import {RouterModule} from "@angular/router";
Now I am sur...
Kowalewski asked 3/1, 2017 at 16:8
1
Solved
How can I fix my .ts files everytime I save a file in WebStorm?
I know that I can run tslint --fix after saving. I also know that I can ⌥⏎ + ⏎ on the current error in the file and that error will ...
Valaree asked 30/7, 2017 at 9:58
3
I am working on an angular 2 app and in one of my components I have this:
<p class="newNode">
<input [(ngModel)]="formNode.id" placeholder="id">
<input [(ngModel)]="formNode.name"...
Thrower asked 19/12, 2016 at 23:7
© 2022 - 2024 — McMap. All rights reserved.