From 000d26dad13dbfe9faf4a6c6bbf76deb214485fc Mon Sep 17 00:00:00 2001 From: maryia-lapata Date: Tue, 18 Sep 2018 16:28:56 +0300 Subject: [PATCH 1/8] Update versions of @babel/parser and @babel/types --- package.json | 4 ++-- yarn.lock | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 12d4e44adb920..e3e4a0609e1d0 100644 --- a/package.json +++ b/package.json @@ -201,8 +201,8 @@ "yauzl": "2.7.0" }, "devDependencies": { - "@babel/parser": "7.0.0-beta.52", - "@babel/types": "7.0.0-beta.31", + "@babel/parser": "7.1.0", + "@babel/types": "7.0.0", "@elastic/eslint-config-kibana": "link:packages/eslint-config-kibana", "@elastic/eslint-plugin-kibana-custom": "link:packages/eslint-plugin-kibana-custom", "@kbn/es": "link:packages/kbn-es", diff --git a/yarn.lock b/yarn.lock index a4cbc2881bd75..6664c73964cb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,9 +39,9 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/parser@7.0.0-beta.52": - version "7.0.0-beta.52" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.52.tgz#4e935b62cd9bf872bd37bcf1f63d82fe7b0237a2" +"@babel/parser@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" "@babel/runtime@7.0.0-beta.54": version "7.0.0-beta.54" @@ -72,6 +72,14 @@ invariant "^2.2.0" lodash "^4.2.0" +"@babel/types@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + "@babel/types@7.0.0-beta.31": version "7.0.0-beta.31" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" @@ -8721,10 +8729,14 @@ lodash@^4.0.0, lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.0.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1, lodash@^4.8.2, lodash@~4.17.4, lodash@~4.17.5: +lodash@^4.0.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1, lodash@^4.8.2, lodash@~4.17.4, lodash@~4.17.5: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" +lodash@^4.2.0: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + lodash@~4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.3.0.tgz#efd9c4a6ec53f3b05412429915c3e4824e4d25a4" From 681cd91ec0389115918a054fb5a0046f47eb58d4 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 18 Sep 2018 07:47:40 -0700 Subject: [PATCH 2/8] use ^ ranges --- package.json | 4 ++-- yarn.lock | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index e3e4a0609e1d0..daecc0e59a4e8 100644 --- a/package.json +++ b/package.json @@ -201,8 +201,8 @@ "yauzl": "2.7.0" }, "devDependencies": { - "@babel/parser": "7.1.0", - "@babel/types": "7.0.0", + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", "@elastic/eslint-config-kibana": "link:packages/eslint-config-kibana", "@elastic/eslint-plugin-kibana-custom": "link:packages/eslint-plugin-kibana-custom", "@kbn/es": "link:packages/kbn-es", diff --git a/yarn.lock b/yarn.lock index 6664c73964cb5..a988b17ab8919 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,7 +39,7 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/parser@7.1.0": +"@babel/parser@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" @@ -72,14 +72,6 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - "@babel/types@7.0.0-beta.31": version "7.0.0-beta.31" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" @@ -88,6 +80,14 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@babel/types@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + "@elastic/datemath@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@elastic/datemath/-/datemath-4.0.2.tgz#91417763fa4ec93ad1426cb69aaf2de2e9914a68" From 2f3eeb751a4073f601de7be4c6430b874b416acd Mon Sep 17 00:00:00 2001 From: Pavel Date: Fri, 21 Sep 2018 11:37:01 +0300 Subject: [PATCH 3/8] update eslint --- package.json | 4 +- packages/eslint-config-kibana/jest.js | 2 +- yarn.lock | 303 ++++++++++++++++---------- 3 files changed, 192 insertions(+), 117 deletions(-) diff --git a/package.json b/package.json index daecc0e59a4e8..8836895a89494 100644 --- a/package.json +++ b/package.json @@ -248,7 +248,7 @@ "@types/type-detect": "^4.0.1", "@types/uuid": "^3.4.4", "angular-mocks": "1.4.7", - "babel-eslint": "8.1.2", + "babel-eslint": "^9.0.0", "babel-jest": "^23.4.2", "backport": "4.4.1", "chai": "3.5.0", @@ -261,7 +261,7 @@ "enzyme": "3.2.0", "enzyme-adapter-react-16": "^1.1.1", "enzyme-to-json": "3.3.1", - "eslint": "4.14.0", + "eslint": "^5.6.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-babel": "4.1.2", "eslint-plugin-import": "2.8.0", diff --git a/packages/eslint-config-kibana/jest.js b/packages/eslint-config-kibana/jest.js index 8c34fb00a000c..c28a9c48c6826 100644 --- a/packages/eslint-config-kibana/jest.js +++ b/packages/eslint-config-kibana/jest.js @@ -7,7 +7,7 @@ module.exports = { ], env: { - 'jest/globals': true, + 'jest': true, }, rules: { diff --git a/yarn.lock b/yarn.lock index a988b17ab8919..175f9e335ad2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,11 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + "@babel/highlight" "^7.0.0" "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.42" @@ -16,20 +14,35 @@ dependencies: "@babel/highlight" "7.0.0-beta.42" -"@babel/helper-function-name@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz#afe63ad799209989348b1109b44feb66aa245f57" +"@babel/generator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" + dependencies: + "@babel/types" "^7.0.0" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.31" - "@babel/template" "7.0.0-beta.31" - "@babel/traverse" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" + "@babel/types" "^7.0.0" -"@babel/helper-get-function-arity@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz#1176d79252741218e0aec872ada07efb2b37a493" +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" dependencies: - "@babel/types" "7.0.0-beta.31" + "@babel/types" "^7.0.0" "@babel/highlight@7.0.0-beta.42": version "7.0.0-beta.42" @@ -39,7 +52,15 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/parser@^7.1.0": +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" @@ -50,35 +71,27 @@ core-js "^2.5.7" regenerator-runtime "^0.12.0" -"@babel/template@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.31.tgz#577bb29389f6c497c3e7d014617e7d6713f68bda" - dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" - lodash "^4.2.0" - -"@babel/traverse@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.31.tgz#db399499ad74aefda014f0c10321ab255134b1df" +"@babel/template@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/helper-function-name" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" - debug "^3.0.1" - globals "^10.0.0" - invariant "^2.2.0" - lodash "^4.2.0" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/types@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" - dependencies: - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^2.0.0" +"@babel/traverse@^7.0.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.10" "@babel/types@^7.0.0": version "7.0.0" @@ -686,11 +699,11 @@ acorn-globals@^4.1.0: dependencies: acorn "^5.0.0" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +acorn-jsx@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" dependencies: - acorn "^3.0.4" + acorn "^5.0.3" acorn@4.X, acorn@^4.0.3, acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" @@ -700,14 +713,18 @@ acorn@^2.1.0, acorn@^2.4.0: version "2.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" -acorn@^3.0.4, acorn@^3.1.0: +acorn@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0: +acorn@^5.0.0, acorn@^5.3.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" +acorn@^5.0.3, acorn@^5.6.0: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + adm-zip@0.4.7: version "0.4.7" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" @@ -747,7 +764,7 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.3.0: +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -773,6 +790,15 @@ ajv@^6.1.0: json-schema-traverse "^0.4.1" uri-js "^4.2.1" +ajv@^6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -1270,15 +1296,15 @@ babel-core@^6.0.0, babel-core@^6.18.0, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-eslint@8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.1.2.tgz#a39230b0c20ecbaa19a35d5633bf9b9ca2c8116f" +babel-eslint@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-9.0.0.tgz#7d9445f81ed9f60aff38115f838970df9f2b6220" dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/traverse" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" - eslint-scope "~3.7.1" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + eslint-scope "3.7.1" eslint-visitor-keys "^1.0.0" babel-generator@^6.18.0, babel-generator@^6.21.0, babel-generator@^6.26.0: @@ -1901,10 +1927,6 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.21. lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@7.0.0-beta.31: - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.31.tgz#7ec10f81e0e456fd0f855ad60fa30c2ac454283f" - babylon@^6.11.0, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -3116,7 +3138,7 @@ concat-stream@1.6.2, concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concat-stream@^1.4.7, concat-stream@^1.6.0, concat-stream@~1.6.0: +concat-stream@^1.4.7, concat-stream@~1.6.0: version "1.6.1" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26" dependencies: @@ -3359,7 +3381,7 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -3813,7 +3835,7 @@ debug@2.6.9, debug@2.X, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, dependencies: ms "2.0.0" -debug@3.1.0, debug@^3.0.1, debug@^3.1.0: +debug@3.1.0, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: @@ -4076,7 +4098,7 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.0.0, doctrine@^2.0.2: +doctrine@^2.0.0, doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: @@ -4704,65 +4726,77 @@ eslint-plugin-react@7.5.1: jsx-ast-utils "^2.0.0" prop-types "^15.6.0" -eslint-scope@^3.7.1, eslint-scope@~3.7.1: +eslint-scope@3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@4.14.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.14.0.tgz#96609768d1dd23304faba2d94b7fefe5a5447a82" +eslint@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.6.0.tgz#b6f7806041af01f71b3f1895cbb20971ea4b6223" dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" + cross-spawn "^6.0.5" debug "^3.1.0" - doctrine "^2.0.2" - eslint-scope "^3.7.1" + doctrine "^2.1.0" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.2" - esquery "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" glob "^7.1.2" - globals "^11.0.1" - ignore "^3.3.3" + globals "^11.7.0" + ignore "^4.0.6" imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" + inquirer "^6.1.0" + is-resolvable "^1.1.0" + js-yaml "^3.12.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" + lodash "^4.17.5" + minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" + regexpp "^2.0.0" require-uncached "^1.0.3" - semver "^5.3.0" + semver "^5.5.1" strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" + strip-json-comments "^2.0.1" + table "^4.0.3" + text-table "^0.2.0" -espree@^3.5.2: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" +espree@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" + acorn "^5.6.0" + acorn-jsx "^4.1.1" esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" @@ -4784,9 +4818,9 @@ esprima@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.2.0.tgz#4292c1d68e4173d815fa2290dc7afc96d81fcd83" -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" dependencies: estraverse "^4.0.0" @@ -5772,13 +5806,9 @@ global@^4.3.1, global@~4.3.0: min-document "^2.19.0" process "~0.5.1" -globals@^10.0.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7" - -globals@^11.0.1: - version "11.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" +globals@^11.1.0, globals@^11.7.0: + version "11.7.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" globals@^9.18.0: version "9.18.0" @@ -6552,10 +6582,14 @@ iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" -ignore@^3.3.3, ignore@^3.3.5: +ignore@^3.3.5: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + image-diff@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/image-diff/-/image-diff-1.6.0.tgz#d07d1311dd0468491245cff7824ba87fe4b19fdc" @@ -6676,7 +6710,7 @@ inquirer@^0.11.1: strip-ansi "^3.0.0" through "^2.3.6" -inquirer@^3.0.6, inquirer@^3.2.3: +inquirer@^3.2.3: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: @@ -6713,6 +6747,24 @@ inquirer@^6.0.0: strip-ansi "^4.0.0" through "^2.3.6" +inquirer@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.0" + figures "^2.0.0" + lodash "^4.17.10" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.1.0" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + insane@2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/insane/-/insane-2.5.0.tgz#3252baec85c53b108cdf731e7962b7ce9c5cff1f" @@ -7120,7 +7172,7 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-resolvable@^1.0.0: +is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -7783,6 +7835,10 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + js-yaml@3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.4.1.tgz#7183990c62f646369eaa04675b2d5f1e71d62b8b" @@ -7790,13 +7846,20 @@ js-yaml@3.4.1: argparse "~1.0.2" esprima "~2.2.0" -js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.7.0: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@~3.4.3: version "3.4.6" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.4.6.tgz#6be1b23f6249f53d293370fd4d1aaa63ce1b4eb0" @@ -7883,6 +7946,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -11697,6 +11764,10 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexpp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -12289,6 +12360,10 @@ semver@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.1.0.tgz#85f2cf8550465c4df000cf7d86f6b054106ab9e5" +semver@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + semver@~4.3.3: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" @@ -13141,9 +13216,9 @@ tabbable@^1.0.3, tabbable@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-1.1.2.tgz#b171680aea6e0a3e9281ff23532e2e5de11c0d94" -table@^4.0.1: +table@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" + resolved "http://registry.npmjs.org/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" dependencies: ajv "^6.0.1" ajv-keywords "^3.0.0" @@ -13262,7 +13337,7 @@ text-encoding@^0.6.4: version "0.6.4" resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" -text-table@^0.2.0, text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -13946,7 +14021,7 @@ update-notifier@^2.2.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" -uri-js@^4.2.1: +uri-js@^4.2.1, uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" dependencies: From a748b8d8194ae4702f9e8a5bd62803dbc2ba101d Mon Sep 17 00:00:00 2001 From: Pavel Date: Fri, 21 Sep 2018 13:39:40 +0300 Subject: [PATCH 4/8] fix eslint code style issues --- .eslintrc.js | 6 +- .../mode/input_highlight_rules.js | 2 +- .../public/discover/controllers/discover.js | 72 +++++++++---------- .../coordinate_maps_visualization.js | 1 + src/fixtures/require_from.js | 19 +++++ .../fixtures/test_app/public/index.js | 19 +++++ src/ui/public/private/private.js | 2 +- .../vislib/lib/layout/types/map_layout.js | 19 +++++ .../functional/page_objects/visualize_page.js | 2 +- x-pack/plugins/canvas/tasks/plugins.js | 1 + .../__mocks__/brace/ext/language_tools.js | 6 ++ .../public/store/reducers/row_status.js | 1 + .../jobs_list_old/jobs_list_controller.js | 4 +- .../new_job/advanced/new_job_controller.js | 4 +- .../server/browsers/safe_child_process.js | 2 +- .../public/filters/ns_to_pretty.js | 3 +- .../security/public/views/management/roles.js | 2 +- .../api/settings/register_load_route.js | 2 +- .../action/register_acknowledge_route.js | 2 +- .../api/watch/register_activate_route.js | 2 +- .../api/watch/register_deactivate_route.js | 2 +- .../routes/api/watch/register_delete_route.js | 2 +- .../api/watch/register_execute_route.js | 2 +- .../routes/api/watch/register_load_route.js | 2 +- .../routes/api/watch/register_save_route.js | 2 +- .../api/watch/register_visualize_route.js | 2 +- .../routes/api/watches/register_list_route.js | 2 +- 27 files changed, 126 insertions(+), 59 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 27e18d74aecc4..ad86cde9dc52c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -398,7 +398,7 @@ module.exports = { 'import/no-extraneous-dependencies': [ 'error', { - packageDir: resolve(__dirname, 'x-pack/package.json'), + packageDir: './x-pack/', }, ], }, @@ -417,7 +417,7 @@ module.exports = { { devDependencies: true, peerDependencies: true, - packageDir: resolve(__dirname, 'x-pack/package.json'), + packageDir: './x-pack/', }, ], }, @@ -429,7 +429,7 @@ module.exports = { 'import/no-extraneous-dependencies': [ 'error', { - packageDir: resolve(__dirname, 'x-pack/package.json'), + packageDir: './x-pack/', }, ], 'import/no-unresolved': [ diff --git a/src/core_plugins/console/public/src/sense_editor/mode/input_highlight_rules.js b/src/core_plugins/console/public/src/sense_editor/mode/input_highlight_rules.js index 2cac57df4cd43..9ef1a8f31ac72 100644 --- a/src/core_plugins/console/public/src/sense_editor/mode/input_highlight_rules.js +++ b/src/core_plugins/console/public/src/sense_editor/mode/input_highlight_rules.js @@ -47,7 +47,7 @@ export function InputHighlightRules() { { token: 'paren.lparen', regex: '{', next: 'json', push: true } ], addEOL(['method'], /([a-zA-Z]+)/, 'start', 'method_sep') - , + , [ { token: 'whitespace', diff --git a/src/core_plugins/kibana/public/discover/controllers/discover.js b/src/core_plugins/kibana/public/discover/controllers/discover.js index f62ea2794d386..45ec15e1179f5 100644 --- a/src/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/core_plugins/kibana/public/discover/controllers/discover.js @@ -422,45 +422,45 @@ function discoverController( 'rows', 'fetchStatus' ], (function updateResultState() { - let prev = {}; - const status = { - LOADING: 'loading', // initial data load - READY: 'ready', // results came back - NO_RESULTS: 'none' // no results came back - }; - - function pick(rows, oldRows, fetchStatus) { - // initial state, pretend we are loading - if (rows == null && oldRows == null) return status.LOADING; - - const rowsEmpty = _.isEmpty(rows); - // An undefined fetchStatus means the requests are still being - // prepared to be sent. When all requests are completed, - // fetchStatus is set to null, so it's important that we - // specifically check for undefined to determine a loading status. - const preparingForFetch = _.isUndefined(fetchStatus); - if (preparingForFetch) return status.LOADING; - else if (rowsEmpty && fetchStatus) return status.LOADING; - else if (!rowsEmpty) return status.READY; - else return status.NO_RESULTS; - } + let prev = {}; + const status = { + LOADING: 'loading', // initial data load + READY: 'ready', // results came back + NO_RESULTS: 'none' // no results came back + }; + + function pick(rows, oldRows, fetchStatus) { + // initial state, pretend we are loading + if (rows == null && oldRows == null) return status.LOADING; + + const rowsEmpty = _.isEmpty(rows); + // An undefined fetchStatus means the requests are still being + // prepared to be sent. When all requests are completed, + // fetchStatus is set to null, so it's important that we + // specifically check for undefined to determine a loading status. + const preparingForFetch = _.isUndefined(fetchStatus); + if (preparingForFetch) return status.LOADING; + else if (rowsEmpty && fetchStatus) return status.LOADING; + else if (!rowsEmpty) return status.READY; + else return status.NO_RESULTS; + } - return function () { - const current = { - rows: $scope.rows, - fetchStatus: $scope.fetchStatus - }; + return function () { + const current = { + rows: $scope.rows, + fetchStatus: $scope.fetchStatus + }; - $scope.resultState = pick( - current.rows, - prev.rows, - current.fetchStatus, - prev.fetchStatus - ); + $scope.resultState = pick( + current.rows, + prev.rows, + current.fetchStatus, + prev.fetchStatus + ); - prev = current; - }; - }())); + prev = current; + }; + }())); if ($scope.opts.timefield) { setupVisualization(); diff --git a/src/core_plugins/tile_map/public/__tests__/coordinate_maps_visualization.js b/src/core_plugins/tile_map/public/__tests__/coordinate_maps_visualization.js index 426c2c37a08ed..a74811d471b2b 100644 --- a/src/core_plugins/tile_map/public/__tests__/coordinate_maps_visualization.js +++ b/src/core_plugins/tile_map/public/__tests__/coordinate_maps_visualization.js @@ -36,6 +36,7 @@ function mockRawData() { do { node = stack.pop(); if (typeof node === 'object') { + // eslint-disable-next-line guard-for-in for (const key in node) { if (node.hasOwnProperty(key)) { if (key === 'aggConfig') { diff --git a/src/fixtures/require_from.js b/src/fixtures/require_from.js index e69de29bb2d1d..ce99d4cac3017 100644 --- a/src/fixtures/require_from.js +++ b/src/fixtures/require_from.js @@ -0,0 +1,19 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + diff --git a/src/ui/__tests__/fixtures/test_app/public/index.js b/src/ui/__tests__/fixtures/test_app/public/index.js index e69de29bb2d1d..ce99d4cac3017 100644 --- a/src/ui/__tests__/fixtures/test_app/public/index.js +++ b/src/ui/__tests__/fixtures/test_app/public/index.js @@ -0,0 +1,19 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + diff --git a/src/ui/public/private/private.js b/src/ui/public/private/private.js index 38e4a79348c01..ef5c59c21dd7a 100644 --- a/src/ui/public/private/private.js +++ b/src/ui/public/private/private.js @@ -138,7 +138,7 @@ uiModules.get('kibana/private') provider.$get = ['$injector', function PrivateFactory($injector) { - // prevent circular deps by tracking where we came from + // prevent circular deps by tracking where we came from const privPath = []; const pathToString = function () { return privPath.map(name).join(' -> '); diff --git a/src/ui/public/vislib/lib/layout/types/map_layout.js b/src/ui/public/vislib/lib/layout/types/map_layout.js index e69de29bb2d1d..ce99d4cac3017 100644 --- a/src/ui/public/vislib/lib/layout/types/map_layout.js +++ b/src/ui/public/vislib/lib/layout/types/map_layout.js @@ -0,0 +1,19 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index aa2a0b17e38f3..41e2da7270451 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -870,7 +870,7 @@ export function VisualizePageProvider({ getService, getPageObjects }) { // 2). get the minimum chart Y-Axis marker value and Y position const minYAxisChartMarker = await - find.byCssSelector('div.y-axis-col.axis-wrapper-left > div > div > svg:nth-child(2) > g > g:nth-child(1).tick'); + find.byCssSelector('div.y-axis-col.axis-wrapper-left > div > div > svg:nth-child(2) > g > g:nth-child(1).tick'); const minYLabel = (await minYAxisChartMarker.getVisibleText()).replace(',', ''); const minYLabelYPosition = (await minYAxisChartMarker.getPosition()).y; return ((maxYLabel - minYLabel) / (minYLabelYPosition - maxYLabelYPosition)); diff --git a/x-pack/plugins/canvas/tasks/plugins.js b/x-pack/plugins/canvas/tasks/plugins.js index e60cc41577c65..dd2dcabf23972 100644 --- a/x-pack/plugins/canvas/tasks/plugins.js +++ b/x-pack/plugins/canvas/tasks/plugins.js @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +// eslint-disable-next-line import/no-extraneous-dependencies import webpack from 'webpack'; import webpackConfig from './helpers/webpack.plugins'; diff --git a/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js b/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js index e69de29bb2d1d..7efa73559306d 100644 --- a/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js +++ b/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js @@ -0,0 +1,6 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + diff --git a/x-pack/plugins/index_management/public/store/reducers/row_status.js b/x-pack/plugins/index_management/public/store/reducers/row_status.js index 7c1574c50e5de..5a7b6397770b0 100644 --- a/x-pack/plugins/index_management/public/store/reducers/row_status.js +++ b/x-pack/plugins/index_management/public/store/reducers/row_status.js @@ -121,6 +121,7 @@ export const rowStatus = handleActions({ }, {}); const newState = { ...state }; + // eslint-disable-next-line guard-for-in for (const indexName in state) { if (state[indexName] === INDEX_CLOSING && indicesByName[indexName].status === INDEX_CLOSED) { delete newState[indexName]; diff --git a/x-pack/plugins/ml/public/jobs/jobs_list_old/jobs_list_controller.js b/x-pack/plugins/ml/public/jobs/jobs_list_old/jobs_list_controller.js index 1f73b27c95dd5..98022ccc8abe0 100644 --- a/x-pack/plugins/ml/public/jobs/jobs_list_old/jobs_list_controller.js +++ b/x-pack/plugins/ml/public/jobs/jobs_list_old/jobs_list_controller.js @@ -293,7 +293,7 @@ module.controller('MlJobsList', job.job_id.match(filterRegexp) || jobDescription.match(filterRegexp)) { - // long string moved to separate variable to allow it to be broken in two + // long string moved to separate variable to allow it to be broken in two let iconTxt = ' childProcess.kill(signal)) diff --git a/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js b/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js index 467e8ad99dc3d..6ed2bebb27120 100644 --- a/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js +++ b/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js @@ -11,6 +11,7 @@ export function nsToPretty(ns, precision) { precision = 1; } const units = ['ns', 'µs']; + // eslint-disable-next-line guard-for-in for (const i in units) { if (ns < 1000) { return ns.toFixed(precision) + units[i]; @@ -18,4 +19,4 @@ export function nsToPretty(ns, precision) { ns /= 1000; } return msToPretty(ns, precision); -} \ No newline at end of file +} diff --git a/x-pack/plugins/security/public/views/management/roles.js b/x-pack/plugins/security/public/views/management/roles.js index b7d7f3e898f63..c60b9905ea68f 100644 --- a/x-pack/plugins/security/public/views/management/roles.js +++ b/x-pack/plugins/security/public/views/management/roles.js @@ -50,7 +50,7 @@ routes.when(ROLES_PATH, { }; confirmModal(` Are you sure you want to delete the selected role(s)? This action is irreversible!`, - confirmModalOptions + confirmModalOptions ); }; diff --git a/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.js b/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.js index e4f55ac7344e8..9180a7b28f30d 100644 --- a/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.js +++ b/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.js @@ -32,7 +32,7 @@ export function registerLoadRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { return reply(wrapEsError(err)); } diff --git a/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.js b/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.js index 608def39aefe6..94689ea2d4f76 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.js @@ -36,7 +36,7 @@ export function registerAcknowledgeRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { const statusCodeToMessageMap = { 404: `Watch with id = ${watchId} not found` diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.js index 85011745d08d0..8858650e6c286 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.js @@ -43,7 +43,7 @@ export function registerActivateRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { const statusCodeToMessageMap = { 404: `Watch with id = ${watchId} not found` diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.js index c14c115f558ab..e08dae4700528 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.js @@ -43,7 +43,7 @@ export function registerDeactivateRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { const statusCodeToMessageMap = { 404: `Watch with id = ${watchId} not found` diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.js index 425284ee62e45..7c823e24dbcfe 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.js @@ -32,7 +32,7 @@ export function registerDeleteRoute(server) { .then(() => reply().code(204)) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { const statusCodeToMessageMap = { 404: `Watch with id = ${watchId} not found` diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.js index b18d42a432d8f..765ca7ec05c4d 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.js @@ -51,7 +51,7 @@ export function registerExecuteRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { return reply(wrapEsError(err)); } diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.js index c090cdf79e180..f225169ac25a7 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.js @@ -44,7 +44,7 @@ export function registerLoadRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { const statusCodeToMessageMap = { 404: `Watch with id = ${id} not found` diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.js index 5cbcec21b342c..6a2247408b529 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.js @@ -34,7 +34,7 @@ export function registerSaveRoute(server) { .then(reply) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { return reply(wrapEsError(err)); } diff --git a/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.js b/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.js index 695940e928936..782f72f7ab451 100644 --- a/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.js @@ -44,7 +44,7 @@ export function registerVisualizeRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { return reply(wrapEsError(err)); } diff --git a/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.js b/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.js index a56fd4963f3ea..a1a29cca4cd8d 100644 --- a/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.js +++ b/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.js @@ -57,7 +57,7 @@ export function registerListRoute(server) { }) .catch(err => { - // Case: Error from Elasticsearch JS client + // Case: Error from Elasticsearch JS client if (isEsError(err)) { return reply(wrapEsError(err)); } From fe8774961c6b51b456e6500ec8f8544b36acd092 Mon Sep 17 00:00:00 2001 From: Pavel Date: Fri, 21 Sep 2018 15:51:39 +0300 Subject: [PATCH 5/8] add updated eslint versions to all package.json files --- packages/eslint-config-kibana/package.json | 4 ++-- packages/kbn-eslint-plugin-license-header/package.json | 4 ++-- .../kbn-plugin-generator/sao_template/template/package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/eslint-config-kibana/package.json b/packages/eslint-config-kibana/package.json index 19574bb2df058..6c02d7579de76 100644 --- a/packages/eslint-config-kibana/package.json +++ b/packages/eslint-config-kibana/package.json @@ -15,8 +15,8 @@ }, "homepage": "https://github.com/elastic/eslint-config-kibana#readme", "peerDependencies": { - "babel-eslint": "^8.0.0", - "eslint": "^4.1.0", + "babel-eslint": "^9.0.0", + "eslint": "^5.6.0", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-import": "^2.6.0", "eslint-plugin-jest": "^21.22.0", diff --git a/packages/kbn-eslint-plugin-license-header/package.json b/packages/kbn-eslint-plugin-license-header/package.json index 1cd9fbc364a66..2c62a4232cf18 100644 --- a/packages/kbn-eslint-plugin-license-header/package.json +++ b/packages/kbn-eslint-plugin-license-header/package.json @@ -4,8 +4,8 @@ "private": true, "license": "Apache-2.0", "peerDependencies": { - "eslint": ">=4.0.0", - "babel-eslint": "^8.2.1" + "eslint": "^5.6.0", + "babel-eslint": "^9.0.0" }, "dependencies": { "dedent": "^0.7.0" diff --git a/packages/kbn-plugin-generator/sao_template/template/package.json b/packages/kbn-plugin-generator/sao_template/template/package.json index f61e589960cd8..2e26cc70a8f9f 100755 --- a/packages/kbn-plugin-generator/sao_template/template/package.json +++ b/packages/kbn-plugin-generator/sao_template/template/package.json @@ -20,8 +20,8 @@ "@elastic/eslint-config-kibana": "link:../../kibana/packages/eslint-config-kibana", "@elastic/eslint-import-resolver-kibana": "link:../../kibana/packages/kbn-eslint-import-resolver-kibana", "@kbn/plugin-helpers": "link:../../kibana/packages/kbn-plugin-helpers", - "babel-eslint": "^8.0.2", - "eslint": "^4.11.0", + "babel-eslint": "^9.0.0", + "eslint": "^5.6.0", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-import": "^2.3.0", "eslint-plugin-jest": "^21.22.0", From 85dd232962996d71f053db020e76b6a578ca3075 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 24 Sep 2018 19:03:21 +0300 Subject: [PATCH 6/8] remove unused files fix formatting --- src/fixtures/require_from.js | 19 ------------------- .../fixtures/test_app/public/index.js | 19 ------------------- .../vislib/lib/layout/types/map_layout.js | 19 ------------------- .../functional/page_objects/visualize_page.js | 5 +++-- .../__mocks__/brace/ext/language_tools.js | 6 ------ 5 files changed, 3 insertions(+), 65 deletions(-) delete mode 100644 src/fixtures/require_from.js delete mode 100644 src/ui/__tests__/fixtures/test_app/public/index.js delete mode 100644 src/ui/public/vislib/lib/layout/types/map_layout.js delete mode 100644 x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js diff --git a/src/fixtures/require_from.js b/src/fixtures/require_from.js deleted file mode 100644 index ce99d4cac3017..0000000000000 --- a/src/fixtures/require_from.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - diff --git a/src/ui/__tests__/fixtures/test_app/public/index.js b/src/ui/__tests__/fixtures/test_app/public/index.js deleted file mode 100644 index ce99d4cac3017..0000000000000 --- a/src/ui/__tests__/fixtures/test_app/public/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - diff --git a/src/ui/public/vislib/lib/layout/types/map_layout.js b/src/ui/public/vislib/lib/layout/types/map_layout.js deleted file mode 100644 index ce99d4cac3017..0000000000000 --- a/src/ui/public/vislib/lib/layout/types/map_layout.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index a9bd48cce5e82..9b6ff62de2c50 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -869,8 +869,9 @@ export function VisualizePageProvider({ getService, getPageObjects }) { log.debug(`maxYLabel = ${maxYLabel}, maxYLabelYPosition = ${maxYLabelYPosition}`); // 2). get the minimum chart Y-Axis marker value and Y position - const minYAxisChartMarker = await - find.byCssSelector('div.y-axis-col.axis-wrapper-left > div > div > svg:nth-child(2) > g > g:nth-child(1).tick'); + const minYAxisChartMarker = await find.byCssSelector( + 'div.y-axis-col.axis-wrapper-left > div > div > svg:nth-child(2) > g > g:nth-child(1).tick' + ); const minYLabel = (await minYAxisChartMarker.getVisibleText()).replace(',', ''); const minYLabelYPosition = (await minYAxisChartMarker.getPosition()).y; return ((maxYLabel - minYLabel) / (minYLabelYPosition - maxYLabelYPosition)); diff --git a/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js b/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js deleted file mode 100644 index 7efa73559306d..0000000000000 --- a/x-pack/plugins/index_management/__mocks__/brace/ext/language_tools.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - From 2b23275431fc5147b29db5312cb436a7ba255889 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 24 Sep 2018 21:12:55 +0300 Subject: [PATCH 7/8] use for of instead of for in --- .../plugins/searchprofiler/public/filters/ns_to_pretty.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js b/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js index 6ed2bebb27120..74737ed8e30d4 100644 --- a/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js +++ b/x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js @@ -11,10 +11,10 @@ export function nsToPretty(ns, precision) { precision = 1; } const units = ['ns', 'µs']; - // eslint-disable-next-line guard-for-in - for (const i in units) { + + for (const unit of units) { if (ns < 1000) { - return ns.toFixed(precision) + units[i]; + return ns.toFixed(precision) + unit; } ns /= 1000; } From d3ded0d418cbfea632cdb57fb1fe9f9847ef1b8f Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 25 Sep 2018 12:00:43 +0300 Subject: [PATCH 8/8] mock "brace/ext/language_tools" module --- .../index_management/__jest__/components/index_table.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugins/index_management/__jest__/components/index_table.test.js b/x-pack/plugins/index_management/__jest__/components/index_table.test.js index 78eb381e3a48e..31c0d6e7e1503 100644 --- a/x-pack/plugins/index_management/__jest__/components/index_table.test.js +++ b/x-pack/plugins/index_management/__jest__/components/index_table.test.js @@ -17,6 +17,7 @@ import axios from 'axios'; import { setHttpClient } from '../../public/services/api'; import sinon from 'sinon'; import { findTestSubject } from '@elastic/eui/lib/test'; + jest.mock('react-ace', () => { const { PureComponent } = require('react'); return class extends PureComponent { @@ -33,6 +34,7 @@ jest.mock('react-ace', () => { }; }); jest.mock('brace/theme/textmate', () => 'brace/theme/textmate'); +jest.mock('brace/ext/language_tools', () => 'brace/ext/language_tools'); setHttpClient(axios.create()); let server = null;