From f4d137c459d2c7ff2532cec76d5814b9cea7158d Mon Sep 17 00:00:00 2001 From: David Brett Date: Tue, 11 Dec 2018 16:51:05 -0500 Subject: [PATCH] PR Feedback - linting and missing export --- types/multi-progress/index.d.ts | 6 +- types/multi-progress/multi-progress-tests.ts | 6 +- types/multi-progress/tsconfig.json | 2 +- types/multi-progress/tslint.json | 77 +------------------- 4 files changed, 8 insertions(+), 83 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index e1ae12a4e0..ebedcf9597 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -1,14 +1,14 @@ -// Type definitions for multi-progress v2.0.0 +// Type definitions for multi-progress 2.0 // Project: https://github.com/pitaj/multi-progress // Definitions by: David Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -import ProgressBar, { ProgressBarOptions } from '../progress' +import ProgressBar, { ProgressBarOptions } from '../progress'; import { Stream } from 'stream'; -declare class MultiProgress { +export default class MultiProgress { /** * Create a new @see MultiProgress with the given stream, or stderr by default * @param stream A stream to write the progress bars to diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts index 3397a48428..9dde27c16b 100644 --- a/types/multi-progress/multi-progress-tests.ts +++ b/types/multi-progress/multi-progress-tests.ts @@ -3,14 +3,14 @@ */ // require the library -var MultiProgress = require("multi-progress"); +import MultiProgress from 'multi-progress'; // spawn an instance with the optional stream to write to // use of `new` is optional -var multi = new MultiProgress(process.stderr); +const multi = new MultiProgress(process.stderr); // create a progress bar -var bar = multi.newBar(' downloading [:bar] :percent :etas', { +const bar = multi.newBar(' downloading [:bar] :percent :etas', { complete: '=', incomplete: ' ', width: 30, diff --git a/types/multi-progress/tsconfig.json b/types/multi-progress/tsconfig.json index 72100a32f7..3f0dc36371 100644 --- a/types/multi-progress/tsconfig.json +++ b/types/multi-progress/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/multi-progress/tslint.json b/types/multi-progress/tslint.json index a41bf5d19a..1a60b8a5dd 100644 --- a/types/multi-progress/tslint.json +++ b/types/multi-progress/tslint.json @@ -1,79 +1,4 @@ { "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "rules": { } }