diff --git a/packages/imperative/.eslintrc.js b/packages/imperative/.eslintrc.js index fa630b127c..01fe3c5774 100644 --- a/packages/imperative/.eslintrc.js +++ b/packages/imperative/.eslintrc.js @@ -5,8 +5,7 @@ module.exports = { "sourceType": "module", "project": [ "./tsconfig.json", - "./__tests__/tsconfig.json", - "./tsconfig-tests.json" + "./__tests__/tsconfig.json" ] } } \ No newline at end of file diff --git a/packages/imperative/__tests__/config/jest.preset.json b/packages/imperative/__tests__/config/jest.preset.json index 80286a736d..e718090405 100644 --- a/packages/imperative/__tests__/config/jest.preset.json +++ b/packages/imperative/__tests__/config/jest.preset.json @@ -2,7 +2,7 @@ "globals": { "ts-jest": { "diagnostics": false, - "tsconfig": "tsconfig-tests.json" + "tsconfig": "./__tests__/tsconfig.json" } }, "moduleFileExtensions": ["ts","js"], diff --git a/packages/imperative/__tests__/tsconfig.json b/packages/imperative/__tests__/tsconfig.json index c4d748311b..e15ba062f9 100644 --- a/packages/imperative/__tests__/tsconfig.json +++ b/packages/imperative/__tests__/tsconfig.json @@ -19,10 +19,17 @@ "include": [ "**/*.test.ts", "**/*.subtest.ts", - "**/__tests__/**/*" + "**/__tests__/**/*", + "../**/*.test.ts", + "../**/*.subtest.ts", + "../**/__tests__/**/*" ], "exclude": [ "lib", "node_modules" - ] + ], + "files": [ + "../../__types__/wontache.d.ts" + ], + "allowJs": true } \ No newline at end of file diff --git a/packages/imperative/package.json b/packages/imperative/package.json index cf9ee079c3..5da51d73d5 100644 --- a/packages/imperative/package.json +++ b/packages/imperative/package.json @@ -30,9 +30,9 @@ "scripts": { "build:packages": "tsc --pretty", "build": "npm run build:packages && npm run build:webHelp", - "lint": "eslint \"src/**/*.ts\" \"**/__tests__/**/*.ts\"", - "lint:packages": "eslint \"src/**/*.ts\" --ignore-pattern \"**/__tests__/**/*.ts\"", - "lint:tests": "eslint \"./__tests__/**/*.ts\"", + "lint": "eslint \"src/**/*.ts\" \"**/__tests__/**/*.ts\" --ignore-pattern \"**/__mocks__/*.ts\"", + "lint:packages": "eslint \"src/**/*.ts\" --ignore-pattern \"**/__tests__/**/*.ts\" --ignore-pattern \"**/__mocks__/*.ts\"", + "lint:tests": "eslint \"**/__tests__/**/*.ts\"", "circularDependencyCheck": "madge -c lib", "watch": "concurrently \"tsc --pretty --watch\" \"npm run watch:webHelp\"", "build:webHelp": "cd web-help && npm run build", diff --git a/packages/imperative/src/utilities/src/TextUtils.ts b/packages/imperative/src/utilities/src/TextUtils.ts index 3cbbc7c3a4..dd59bc4631 100644 --- a/packages/imperative/src/utilities/src/TextUtils.ts +++ b/packages/imperative/src/utilities/src/TextUtils.ts @@ -39,7 +39,7 @@ export class TextUtils { public static getRecommendedWidth(preferredWidth: number = TextUtils.DEFAULT_WRAP_WIDTH): number { const widthSafeGuard = 8; // prevent partial words from continuing over lines const yargs = require("yargs"); - const maxWidth = !((yargs.terminalWidth() && yargs.terminalWidth() > 0) == null) ? + const maxWidth = (!(yargs.terminalWidth() == null) && yargs.terminalWidth() > 0) ? (yargs.terminalWidth() - widthSafeGuard) : preferredWidth; return Math.min(preferredWidth, maxWidth); } diff --git a/packages/imperative/tsconfig-tests.json b/packages/imperative/tsconfig-tests.json deleted file mode 100644 index 3485999e7b..0000000000 --- a/packages/imperative/tsconfig-tests.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "compilerOptions": { - "types": [ - "node", - "jest" - ], - "lib": [ - "esnext" - ], - "experimentalDecorators": true, - "target": "es2015", - "module": "commonjs", - "noEmit": true, - "declaration": true, - "moduleResolution": "node", - "noImplicitAny": true, - "outDir": "./lib", - "preserveConstEnums": true, - "removeComments": false, - "pretty": true, - "sourceMap": true, - "newLine": "lf" - }, - "typeRoots": [ - "./node_modules/@types" - ], - "include": [ - "**/__tests__/*", - "**/__tests__/**/*", - "**/__mocks__/*" - ], - "exclude": [ - "lib", - "node_modules" - ], - "files": [ - "../../__types__/wontache.d.ts" - ], - "allowJs": true -}