tslint Questions

1

I want to use the same style in .js files and .ts files. I know there is jsRules property in tslint.json, but I see 2 problems with it: Copying ant pasting exactly the same rules When extending ...
Amblyopia asked 18/10, 2017 at 12:44

2

I'm doing a test app with Ionic2 / Cordova / Typescript / Angular. I'm using tslint 5.6.0. I'm using the following module: https://www.npmjs.com/package/tslint Focusing on just one file... when ...
Athiste asked 21/8, 2017 at 8:39

1

I use prettier and tslint, with https://github.com/alexjoverm/tslint-config-prettier and https://github.com/ikatyang/tslint-plugin-prettier . My tslint.json is like { "defaultSeverity": "error",...
Formenti asked 15/8, 2018 at 11:27

2

I heard that good practice is to use something to check my code. I found something called Codacy. I understand everything except 'space indentation expected' from TSLint and TSLint4. Is it because ...
Sharitasharity asked 3/6, 2017 at 19:42

2

Solved

Is it possible to control which rules are auto-fixed when running tslint --fix? Ideally, I only want to autofix the whitespace and quotation rules, and I'll evaluate the rest manually. I can't seem...
Miyasawa asked 7/8, 2018 at 15:48

1

Solved

Is there a way to indicate in the tsconfig.json file the options noUnusedLocals and noUnusedParameters as warnings instead of errors that block the compilation? Currently I use them in the tsconfi...
Begrime asked 30/7, 2018 at 12:56

1

Solved

I'm using root-relative imports via the baseUrl compiler option in tsconfig.json, as per this solution, but I'm having a problem where Atom IDE is showing me linting errors that look like: Canno...
Rolandorolandson asked 11/7, 2018 at 18:32

1

Context Yarn workspaces provide for a convenient way to depend on packages in a mono-repo. When package A depends on package B, the interfaces etc. defined in package B are appropriately resolved ...
Epistrophe asked 19/7, 2018 at 19:36

1

Solved

Which rule do I need to apply to enforce spaces between curly brackets in the import statements? i.e Instead of : import {IPostService} from './api/IPostService'; I want: import { IPostServic...
Concentre asked 14/7, 2018 at 23:0

3

I added TSLint to my React/TypeScript project using the tslint VSCode extension. I also installed both typescript and tslint globally according to TSLint docs npm install -g tslint typescript This...
Bureaucratize asked 11/4, 2018 at 23:5

2

Solved

seems like I don't know the alphabet. Please tell me where this is not ordered: import * as React from 'react'; import { Badge, Button, ButtonGroup, Collapse, Dropdown, DropdownItem, Dropdo...
Ergener asked 15/6, 2018 at 12:31

2

Solved

In my typescript project I use: const program = require('commander'); const figlet = require('figlet'); const AWS = require('aws-sdk'); and I want to refactor those lines to work via import inst...
Fertilization asked 28/11, 2016 at 9:39

1

Solved

To be able to use enumerations in template, we write below codes in ts file. in workflowProgress.ts export enum WorkflowProgress { cancelled = 0, inProgress, done } in component.ts export c...
Paralyze asked 12/6, 2018 at 13:36

2

Solved

I am getting this tslint error: prefer-for-of Expected a 'for-of' loop instead of a 'for' loop with this simple iteration code: function collectItems(options) { const selected = []; for (let...
Chiquita asked 12/6, 2018 at 6:22

3

Solved

I'm using node_modules/codelyzer to analyze my source code Typescript. I define manually rules in tslint.json file. But it is possible to analyze Typescript with SonarQube?
Vitals asked 23/3, 2017 at 11:12

1

Solved

I have a React - Typescript created with: create-react-app my-app --scripts-version=react-scripts-ts It compiles fine, but every time I see this message or warning: No valid rules have been spe...
Sapless asked 24/5, 2018 at 21:18

3

Solved

Is that possible to lint entire folder using tslint? Using eslint it is possible to do eslint ./src to validate whole folder. When i try to do the same for tslint - i am getting an error Error: ...
Each asked 6/4, 2016 at 10:7

1

Solved

I used to use rxjs-tslint-rules package to be aware of RxJS-related issues in my projects. It was added to devDependencies section of my projects' package.json files. Now, there is rxjs-tslint pac...
Maratha asked 14/5, 2018 at 15:56

0

I am trying to get rid of this tslint warning: WARNING: get is deprecated: from v4.0.0 use Type or InjectionToken The way I have my code setup is like this: app.injector.ts import { Injecto...
Deadfall asked 13/4, 2018 at 14:11

1

Solved

interface obj { bar: string } function randomFunction() { let foo: obj = { bar: "" } foo.bar = "hip" } let snack: obj = { bar: "" } snack.bar = "hop" I get this warning from tslint: Ident...
Contumely asked 6/4, 2018 at 22:31

1

Solved

Is there any way to run ng lint while watching for file changes during ng serve? To encourage best practices according to the Angular 2 Style Guide our CI tool runs ng lint during the build process...
Zilpah asked 25/5, 2016 at 22:36

1

Solved

I'm using Angular Essentials by John Papa - in particular, Tslint and Prettier. For some reason, it transforms this code this.rM.hA = this.rM.startHA + 2 * diffX * 360 / size; this.rM.vA = Math.ma...
Pain asked 9/11, 2017 at 19:2

3

I am getting the following error when running tslint that I wasn't getting before.. ERROR: C:/...path..to../observable-debug-operator.ts[27, 13]: Shadowed name: 'Observable' I followed this tuto...
Tattered asked 17/10, 2017 at 15:45

3

Solved

By default with an angular-cli project the tslint settings come packed with things that go squiggle. I recently was approached by a new developer that I had configure their tslint instance in Atom....
Saintsimonianism asked 15/8, 2017 at 16:35

1

Solved

I just upgraded VS code to v1.20.1 and now I have errors everywhere telling me to replace double quotes with single quotes. First of, I'm thinking of disabling this feature, since I'm a double qu...
Middlesworth asked 4/3, 2018 at 12:12

© 2022 - 2024 — McMap. All rights reserved.