tslint Questions
1
I'm working on a package of Angular/TypeScript components while developing in the app using that package. I've used npm link to set up the shared components. On build, it would seem that tslint kic...
Ikhnaton asked 2/6, 2017 at 20:5
2
Solved
Lets say I have the following method:
getErrorMessage(state: any, thingName?: string) {
const thing: string = state.path || thingName;
const messages: string[] = [];
if (state.errors) {
for (c...
Balling asked 30/5, 2017 at 16:8
1
Solved
We are using typescript v2.3.2 and TSLint v4.5.1 with VS Code to create a SPA. Codebase is growing and we need to modularize it someway.
I tried to do the modularization using typescript modules b...
Anissa asked 26/5, 2017 at 13:1
4
TSLint is complaining that single-quotes should be double-quotes. Our team prefers to use single-quotes to wrap string literals.
I see that TSLint is configurable to set the mode to single-quote, ...
Triennial asked 1/6, 2016 at 17:52
1
Solved
I've read the tslint rules here and while it looks like the typedef rule's call-signature option is what I want, it doesn't complain about the lack of a return type.
Anyone know the rule (f one ex...
Allowance asked 14/3, 2017 at 18:22
1
May be I am missing something but I have not found a dedicated place in WebStorm where I can see (and navigate) all errors reported by TSLint.
In the best case I can find the errors while opening ...
1
Solved
I understand this may be a classical javascript issue, but I too often found myself using :
if (!something) {
//...
}
to validate that this something is not undefined or null, in TypeScript.
T...
Violette asked 30/3, 2017 at 14:51
2
When I was using gulp in an Angular 1.x project, I can use gulp to watch files changes and run eslint continuously. In my Angular 2 project, I am using webpack and vs code, how do I make tslint con...
Cohberg asked 30/1, 2017 at 19:40
1
I'm using device plugin from cordova so I have a line like this let model = device.model || ""; which causes Cannot find name 'device'. error. I think with ESLint I would need to do
"eslintConfig"...
Aria asked 26/6, 2016 at 4:34
1
Solved
This is my tslint.json file:
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": true,
...
4
Solved
I'm building a Chrome app. The app is written with TypeScript (Angular2).
I would like to push notifications. Here's the code :
import {Injectable} from 'angular2/core';
@Injectable()
export cla...
Kandacekandahar asked 5/1, 2016 at 17:25
1
Solved
I'm using TSLint within Visual Studio Code (via the TSLint extension), and it's great for .ts files. It also runs on .js files, which is good, but it does not use the same rules, which is bad (for ...
Dovelike asked 30/12, 2016 at 14:14
1
Solved
This is our environment
> \node_modules\.bin\tslint --version
4.0.1
> npm install --save-dev tslint-microsoft-contrib
`-- [email protected]
This is our tslint.json configuration.
{...
Emilioemily asked 22/11, 2016 at 19:21
1
Solved
I'm trying to implement in my LoginService a isLoggedIn boolean value of type BehaviorSubject together with getter and setter functions to get the value as an Observable / set the variable correctl...
Emilia asked 7/10, 2016 at 10:18
1
Solved
How can I disable alphabetical ordering of members in object literal syntax?
Example:
function receiveLogin(user) {
return {
type: LOGIN_SUCCESS,
isFetching: false,
isAuthenticated: true,
id...
Lisk asked 15/9, 2016 at 13:23
1
Solved
Hey all got a issue with npm and tslint I was hoping you could help me with.
Ok here comes my situation and code:
package.json
"scripts": {
"lint": "tslint -c tslint.json 'src/app/**/*.ts'",
"p...
2
Solved
In 0.3.0, I'm seeing intellisense for typescript. However, I was also expecting to see some tslinting as I have a tslint.json. Does VSC support linting natively or do I just need to lean on gulp?
...
Scottscotti asked 3/6, 2015 at 23:23
1
Solved
I am writing a program using typescript and tslint as a linter.
My current favorite list of rules is the following (tslint.json):
{
"extends": "tslint:recommended",
"rules": {
"comment-format"...
Bomber asked 22/7, 2016 at 12:54
1
Solved
I have the below class written in type script. When I compile it, it errors out saying
"src\main\MqttClientWrapper.ts(24,2): error TS1068: Unexpected token. A construct
or, method, accessor, or p...
Homeland asked 16/5, 2016 at 11:26
1
Solved
The description found here is very short:
Disallows object access via string literals.
Is there any further documentation or example?
Diagnostic asked 18/4, 2016 at 13:37
1
I am seeking information on how exports and imports work in NodeJS using TypeScript.
My setup is:
NodeJS
Everything in Typescript
TSLint
Typings
I am messing about with exports/imports instead of...
Plus asked 17/2, 2016 at 11:41
3
Solved
I develop with Typescript in Visual Studio 2013 and always have my error list open on the bottom. TSLint tells me when my code is messy/incorrect as i'm writing it. I don't think I had to do anythi...
Birdlime asked 16/10, 2015 at 20:59
2
Solved
I prefer quotemark: [true, "single"], but for lib.core.es6.d.ts I need use "double".
I tried use comments like eslint:
/*tslint qoutemark: [true, "double"]*/
but it doesn't work.
Maybe I can i...
Lustreware asked 7/2, 2016 at 11:47
2
I'm using a gulp task in vscode (0.9) to try to get errors from both typescript and tslint.
The gulp task is watching for changes on my ts files and run both the gulp-tslint and gulp-typescript on...
Orran asked 6/11, 2015 at 9:5
1
I've configured TSLint for my TypeScript project and I don't know what does the warning forbidden var keyword mean. Here is a minimal example, which results in the TSLint warning:
var x: number = ...
Haematozoon asked 5/9, 2015 at 12:28
© 2022 - 2024 — McMap. All rights reserved.