tslint Questions

2

I have a line in code that looks like this: const [full, text, url] = markdownLink.exec(match) || [null, null, ''] However I am not using full and the linter is giving me a warning. Line 28: ...
Langlois asked 27/8, 2019 at 14:6

2

Solved

I use react-scripts-ts to generate React App and it supplies TSLint. It seems like there's no option to tell react-scripts-ts to exclude TSLint from the build pipeline. Is it possible to disable ...
Orvieto asked 31/1, 2017 at 8:22

2

I'm trying to configure my TSLint rule ordered-imports to get the import order looking like this: // React import React from 'react'; import { View } from 'react-native'; // Libs import * as _ fr...
Disunite asked 4/6, 2019 at 10:17

2

Solved

I am using webpack 2, and it will tell me if there are compile issues with my typescript code. However, I have not figured out a way to run tslint through it and have it run with every change detec...
Immunology asked 28/2, 2017 at 17:52

1

I am trying to import Google Storage node.js module into my Firebase Cloud functions. I am using TypeScript. //myfile.ts import { Storage } from '@google-cloud/storage'; const storageInstance = ...
Strath asked 10/8, 2018 at 7:38

2

Currently eslint/tslint highlighting for issues/errors is super invisible (comparing, for example, to Atom). Its almost impossible to catch the issue - find the small green highlight zone (see scre...
Mudlark asked 27/6, 2016 at 14:58

4

I'm running TSLint (v5.3.2) with my typescript project. I'm getting Forbidden 'var' keyword, use 'let' or 'const' instead but I'm not using 'var' and it points to my use of 'let' or 'const'. For e...
Frontier asked 27/9, 2017 at 14:47

2

Solved

I upgraded tslint and now it complains about: ERROR: src/Metronome/JobFetcher.ts[13, 32]: Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead. The offending code...
Disclosure asked 26/5, 2017 at 13:1

3

Solved

I have a custom rule written for TSlint in TypeScript that I can run using ts-node in a script I'm using on my Linux VM: #!/bin/bash set -e ROOT_DIR=$(dirname $(dirname $0)) cd $ROOT_DIR find "$RO...
Canalize asked 10/6, 2019 at 10:37

2

Solved

I want my tslint to ignore semicolons. I would like to keep the rule "extends": "tslint:recommended". Right now, I just can´t follow this rule, which forces me to use semicolon always, or use this...
Borchert asked 12/6, 2019 at 20:19

1

Solved

I loaded an angular project in ItelliJ and all the files have some code underlined in red. The same red colour is on the scrollbar on the right. It seems the code is full of errors, but they are ju...
Aargau asked 21/5, 2019 at 9:44

2

What is the purpose of tslint no-var-keyword ("forbidden 'var' keyword")? tslint appears to log an error for every occurence of the var keyword in my code. Is tslint stating that the var keyword sh...
Beuthen asked 12/10, 2017 at 0:0

1

Solved

I recently got a legacy .ts-file and want to update it. Two of the warnings say: 'namespace' and 'module' are disallowed and The internal 'module' syntax is deprecated, use the 'namespace' keyw...
Afrikander asked 9/5, 2019 at 12:22

4

Solved

I have tried to install this plugin: Web Analyzer, but unfortunately it can not be installed in VS 2017. It showed: VSIXInstaller.NoApplicableSKUsException: This extension is not installable on ...
Susurrate asked 16/3, 2017 at 3:24

3

I have this basic model. const stuff = types.model({ term: types.string, excludeTerm: types.string, stores: types.array(types.string) }).actions(self => ({ setTerm(term: string) { self.term...
Leighton asked 15/4, 2019 at 12:33

4

Solved

My organization uses TSLint pretty heavily for quality-checking our Typescript code, and it provides a valuable service to us! However, we use Visual Studio 2015 & 2017 as our main IDE and the ...
Flophouse asked 10/4, 2017 at 12:30

7

Solved

I have installed TSLint in VSCode and created a tslint.json file next to tsconfig.json. But TSLint is not working. For example, I added "curly": true to tslint.json, but when I write a if statement...
Canvas asked 22/4, 2016 at 5:45

1

Solved

What is the actual impact of putting void before promise? async function doAsyncStuff(){ ... } function nonAsyncFunction(){ void doAsyncStuff(); } I couldn't find any official documentation fo...
Outstrip asked 7/4, 2019 at 12:10

1

Solved

Something simple that will cause this to happen. let _tick = 0; this.app.ticker.add( () => { moveSprites(dots); _tick += .2; return; }); Tslint options are set to the following: "rules": ...
Frightfully asked 3/4, 2019 at 4:54

2

Solved

everybody. I am building an Ionic app over this boilerplate. Right now, I am building the tests for a specific page and I am using jasmine to mock the providers and set the expected behavior for th...
Awake asked 7/4, 2017 at 14:29

3

Solved

Is it possible to import formatting settings (Settings => Editor => Code Style => Typescript) from my tslint.json file in webstorm? I use rules directory "node_modules/codelyzer" in my tsl...
Scrutable asked 19/6, 2016 at 18:42

2

Solved

I'm getting the following TsLint message in my project: TsLint: comment must start with lowercase letter Is there any grounding behind this? I agree with most of what I've come across in TsLin...
Sunstroke asked 15/12, 2014 at 6:22

1

Solved

so now that we cant use the hooks as old style of event functions beside disabling the warning what is the best way to call event function that does not violate the rule import React, { useState }...
Anywise asked 4/3, 2019 at 12:45

4

Solved

I currently have an issue with tslint and was hoping someone could point me in the right direction. I'm trying to send an HTTP GET request using HTTP provided by the Angular2 framework. With this ...
Kingsly asked 4/4, 2017 at 11:11

3

Solved

On my project tslint's "import-ordering" rule is used import CopyLensModal from './CopyLensModal'; import FetchStatus from '../../../../../state/generic/models/FetchStatus'; import FlexRow from '....
Albumen asked 23/1, 2017 at 11:49

© 2022 - 2024 — McMap. All rights reserved.