diff --git a/package.json b/package.json index 3239cdefafc09..89ce8842c3cc5 100644 --- a/package.json +++ b/package.json @@ -226,7 +226,7 @@ "@types/has-ansi": "^3.0.0", "@types/jest": "^23.3.1", "@types/joi": "^10.4.4", - "@types/jquery": "3.3.1", + "@types/jquery": "^3.3.6", "@types/js-yaml": "^3.11.1", "@types/listr": "^0.13.0", "@types/lodash": "^3.10.1", @@ -324,11 +324,11 @@ "tree-kill": "^1.1.0", "ts-jest": "^23.1.4", "ts-loader": "^3.5.0", - "ts-node": "^6.0.3", - "tslint": "^5.10.0", - "tslint-config-prettier": "^1.12.0", + "ts-node": "^7.0.1", + "tslint": "^5.11.0", + "tslint-config-prettier": "^1.15.0", "tslint-plugin-prettier": "^1.3.0", - "typescript": "^2.9.2", + "typescript": "^3.0.3", "vinyl-fs": "^3.0.2", "xml2js": "^0.4.19", "xmlbuilder": "9.0.4", diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json index 53b72582981a1..ada22294060cd 100644 --- a/packages/kbn-pm/package.json +++ b/packages/kbn-pm/package.json @@ -60,7 +60,7 @@ "strong-log-transformer": "^1.0.6", "tempy": "^0.2.1", "ts-loader": "^3.5.0", - "typescript": "^2.9.2", + "typescript": "^3.0.3", "webpack": "^3.11.0", "wrap-ansi": "^3.0.1", "write-pkg": "^3.1.0" diff --git a/packages/kbn-pm/yarn.lock b/packages/kbn-pm/yarn.lock index a19ebad9dfb01..abbc780efcc1f 100644 --- a/packages/kbn-pm/yarn.lock +++ b/packages/kbn-pm/yarn.lock @@ -3592,9 +3592,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" uglify-js@^2.8.29: version "2.8.29" diff --git a/packages/kbn-system-loader/package.json b/packages/kbn-system-loader/package.json index 55c65747c9fd4..55c0a860c08c0 100644 --- a/packages/kbn-system-loader/package.json +++ b/packages/kbn-system-loader/package.json @@ -11,6 +11,6 @@ }, "devDependencies": { "@types/jest": "^23.3.1", - "typescript": "^2.9.2" + "typescript": "^3.0.3" } } diff --git a/packages/kbn-system-loader/yarn.lock b/packages/kbn-system-loader/yarn.lock index 4b0f2d57d94d5..c20eb45a4d0a9 100644 --- a/packages/kbn-system-loader/yarn.lock +++ b/packages/kbn-system-loader/yarn.lock @@ -6,6 +6,6 @@ version "23.3.1" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf" -typescript@^2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" diff --git a/src/core/server/logging/appenders/console/console_appender.test.ts b/src/core/server/logging/appenders/console/console_appender.test.ts index fc885e5f58a11..fe5602a809699 100644 --- a/src/core/server/logging/appenders/console/console_appender.test.ts +++ b/src/core/server/logging/appenders/console/console_appender.test.ts @@ -82,8 +82,10 @@ test('`append()` correctly formats records and pushes them to console.', () => { for (const record of records) { appender.append(record); + // tslint:disable-next-line no-console expect(console.log).toHaveBeenCalledWith(`mock-${JSON.stringify(record)}`); } + // tslint:disable-next-line no-console expect(console.log).toHaveBeenCalledTimes(records.length); }); diff --git a/src/core/utils/url.test.ts b/src/core/utils/url.test.ts index f890b2ec13db3..3c35ba44455bc 100644 --- a/src/core/utils/url.test.ts +++ b/src/core/utils/url.test.ts @@ -52,7 +52,7 @@ describe('modifyUrl()', () => { test('supports changing port', () => { expect( modifyUrl('http://localhost:5601', parsed => { - parsed.port = (Number.parseInt(parsed.port!) + 1).toString(); + parsed.port = (Number(parsed.port!) + 1).toString(); return parsed; }) ).toEqual('http://localhost:5602/'); diff --git a/tsconfig.json b/tsconfig.json index 5a804d5bb96be..da6008a67d849 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -42,7 +42,10 @@ "forceConsistentCasingInFileNames": true, // Disable the breaking keyof behaviour introduced in TS 2.9.2 until EUI is updated to support that too - "keyofStringsOnly": true + "keyofStringsOnly": true, + + // Forbid unused local variables as the rule was deprecated by ts-lint + "noUnusedLocals": true, }, "include": [ "src/**/*" diff --git a/tslint.yaml b/tslint.yaml index 629b48b6e8c43..e65bb1e931aa7 100644 --- a/tslint.yaml +++ b/tslint.yaml @@ -8,7 +8,6 @@ rulesDirectory: rules: prettier: true - no-unused-variable: true object-literal-sort-keys: false interface-name: false no-default-export: true diff --git a/x-pack/package.json b/x-pack/package.json index fed84badfa99c..a6cd1cddf6c56 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -69,7 +69,7 @@ "supertest-as-promised": "^4.0.2", "tmp": "0.0.31", "tree-kill": "^1.1.0", - "typescript": "^2.9.2", + "typescript": "^3.0.3", "vinyl-fs": "^3.0.2", "xml-crypto": "^0.10.1", "xml2js": "^0.4.19", diff --git a/x-pack/yarn.lock b/x-pack/yarn.lock index f4fc8b3fae93e..f6df4368f51d5 100644 --- a/x-pack/yarn.lock +++ b/x-pack/yarn.lock @@ -7854,9 +7854,9 @@ typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" ua-parser-js@^0.7.9: version "0.7.17" diff --git a/yarn.lock b/yarn.lock index 6050e14540324..59e12f7346d81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -406,9 +406,9 @@ version "10.6.2" resolved "https://registry.yarnpkg.com/@types/joi/-/joi-10.6.2.tgz#0e7d632fe918c337784e87b16c7cc0098876179a" -"@types/jquery@3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.1.tgz#55758d44d422756d6329cbf54e6d41931d7ba28f" +"@types/jquery@^3.3.6": + version "3.3.6" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.6.tgz#5932ead926307ca21e5b36808257f7c926b06565" "@types/js-yaml@^3.11.1": version "3.11.2" @@ -2243,6 +2243,10 @@ buffer-from@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" +buffer-from@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -12225,13 +12229,6 @@ source-map-support@^0.4.15, source-map-support@^0.4.2: dependencies: source-map "^0.5.6" -source-map-support@^0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@^0.5.6: version "0.5.9" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" @@ -13189,7 +13186,7 @@ ts-jest@^23.1.4: ts-loader@^3.5.0: version "3.5.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-3.5.0.tgz#151d004dcddb4cf8e381a3bf9d6b74c2d957a9c0" + resolved "http://registry.npmjs.org/ts-loader/-/ts-loader-3.5.0.tgz#151d004dcddb4cf8e381a3bf9d6b74c2d957a9c0" dependencies: chalk "^2.3.0" enhanced-resolve "^3.0.0" @@ -13197,17 +13194,17 @@ ts-loader@^3.5.0: micromatch "^3.1.4" semver "^5.0.1" -ts-node@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.3.tgz#28bf74bcad134fad17f7469dad04638ece03f0f4" +ts-node@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" dependencies: arrify "^1.0.0" - chalk "^2.3.0" + buffer-from "^1.1.0" diff "^3.1.0" make-error "^1.1.1" minimist "^1.2.0" mkdirp "^0.5.1" - source-map-support "^0.5.3" + source-map-support "^0.5.6" yn "^2.0.0" tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1: @@ -13218,9 +13215,9 @@ tslib@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" -tslint-config-prettier@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.12.0.tgz#bc8504f286ecf42b906f3d1126a093114f5729cc" +tslint-config-prettier@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz#76b9714399004ab6831fdcf76d89b73691c812cf" tslint-plugin-prettier@^1.3.0: version "1.3.0" @@ -13229,9 +13226,9 @@ tslint-plugin-prettier@^1.3.0: eslint-plugin-prettier "^2.2.0" tslib "^1.7.1" -tslint@^5.10.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3" +tslint@^5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" @@ -13244,11 +13241,11 @@ tslint@^5.10.0: resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.12.1" + tsutils "^2.27.2" -tsutils@^2.12.1: - version "2.27.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.0.tgz#9efb252b188eaa0ca3ade41dc410d6ce7eaab816" +tsutils@^2.27.2: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" dependencies: tslib "^1.8.1" @@ -13305,9 +13302,9 @@ typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8" ua-parser-js@^0.7.9: version "0.7.17"