From bbd8da4da51e91578b631b54dc3dd9d878b18978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Tue, 7 May 2019 09:13:01 +0200 Subject: [PATCH] feat: upgrade deps and optimize unicorn --- packages/eslint-config-browser/index.js | 6 +- packages/eslint-config-browser/legacy.js | 1 + packages/eslint-config-browser/lib/common.js | 1 + packages/eslint-config-ember/package.json | 1 + .../eslint-config-node-typescript/index.js | 1 + packages/eslint-config-node/index.js | 8 +-- packages/eslint-config-node/package.json | 2 +- packages/eslint-config/index.js | 1 + packages/eslint-config/legacy.js | 1 + packages/eslint-config/lib/common.js | 2 +- packages/eslint-config/package.json | 4 +- yarn.lock | 66 ++++++++++++++----- 12 files changed, 63 insertions(+), 31 deletions(-) diff --git a/packages/eslint-config-browser/index.js b/packages/eslint-config-browser/index.js index 813ce6b9..2b79ef74 100644 --- a/packages/eslint-config-browser/index.js +++ b/packages/eslint-config-browser/index.js @@ -3,8 +3,10 @@ module.exports = { extends: [require.resolve('./lib/common'), '@clark'], rules: { + 'unicorn/prefer-add-event-listener': 'error', 'unicorn/prefer-node-append': 'error', - 'unicorn/prefer-query-selector': 'error' - // 'unicorn/prefer-node-remove': 'error' + 'unicorn/prefer-node-remove': 'error', + 'unicorn/prefer-query-selector': 'error', + 'unicorn/prefer-text-content': 'error' } }; diff --git a/packages/eslint-config-browser/legacy.js b/packages/eslint-config-browser/legacy.js index 99cfb9e9..3f1b40f8 100644 --- a/packages/eslint-config-browser/legacy.js +++ b/packages/eslint-config-browser/legacy.js @@ -2,6 +2,7 @@ module.exports = { extends: [require.resolve('./lib/common'), '@clark/eslint-config/legacy'], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { es6: false }, diff --git a/packages/eslint-config-browser/lib/common.js b/packages/eslint-config-browser/lib/common.js index 6490712b..c054c350 100644 --- a/packages/eslint-config-browser/lib/common.js +++ b/packages/eslint-config-browser/lib/common.js @@ -2,6 +2,7 @@ module.exports = { extends: ['xo-space/browser'], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { node: false, browser: true diff --git a/packages/eslint-config-ember/package.json b/packages/eslint-config-ember/package.json index 72f1f52a..c79d5c8a 100644 --- a/packages/eslint-config-ember/package.json +++ b/packages/eslint-config-ember/package.json @@ -23,6 +23,7 @@ "url": "https://github.com/ClarkSource/eslint-config/issues" }, "dependencies": { + "@clark/eslint-config": "^0.5.0", "@clark/eslint-config-browser": "^0.5.0", "eslint-plugin-ember": "^6.4.1", "eslint-plugin-ember-best-practices": "^1.1.1" diff --git a/packages/eslint-config-node-typescript/index.js b/packages/eslint-config-node-typescript/index.js index 383b41d8..40d46cca 100644 --- a/packages/eslint-config-node-typescript/index.js +++ b/packages/eslint-config-node-typescript/index.js @@ -2,6 +2,7 @@ module.exports = { extends: ['@clark/node', '@clark/typescript'], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { node: true, browser: false diff --git a/packages/eslint-config-node/index.js b/packages/eslint-config-node/index.js index d785c5f7..d716102a 100644 --- a/packages/eslint-config-node/index.js +++ b/packages/eslint-config-node/index.js @@ -3,15 +3,9 @@ module.exports = { plugins: ['node'], extends: ['@clark', 'plugin:node/recommended'], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { node: true, browser: false - }, - rules: { - 'unicorn/prefer-add-event-listener': 'off', - 'unicorn/prefer-node-append': 'off', - 'unicorn/prefer-query-selector': 'off', - // 'unicorn/prefer-node-remove': 'off', - 'unicorn/prefer-text-content': 'off' } }; diff --git a/packages/eslint-config-node/package.json b/packages/eslint-config-node/package.json index 5dcec098..52cedb8c 100644 --- a/packages/eslint-config-node/package.json +++ b/packages/eslint-config-node/package.json @@ -24,6 +24,6 @@ }, "dependencies": { "@clark/eslint-config": "^0.5.0", - "eslint-plugin-node": "^8.0.1" + "eslint-plugin-node": "^9.0.1" } } diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index d12a9da4..40b9ba79 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -8,6 +8,7 @@ module.exports = { require.resolve('./lib/last'), require.resolve('./lib/parser-config') ], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { node: false }, diff --git a/packages/eslint-config/legacy.js b/packages/eslint-config/legacy.js index dbc41420..f556ae46 100644 --- a/packages/eslint-config/legacy.js +++ b/packages/eslint-config/legacy.js @@ -6,6 +6,7 @@ module.exports = { require.resolve('./lib/common'), require.resolve('./lib/last') ], + // eslint-disable-next-line unicorn/prevent-abbreviations env: { es6: false } diff --git a/packages/eslint-config/lib/common.js b/packages/eslint-config/lib/common.js index 93ccad52..3b65011c 100644 --- a/packages/eslint-config/lib/common.js +++ b/packages/eslint-config/lib/common.js @@ -17,8 +17,8 @@ module.exports = { 'unicorn/prefer-add-event-listener': 'off', 'unicorn/prefer-node-append': 'off', + 'unicorn/prefer-node-remove': 'off', 'unicorn/prefer-query-selector': 'off', - // 'unicorn/prefer-node-remove': 'off', 'unicorn/prefer-text-content': 'off', /** diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index e0627780..47f61644 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -26,9 +26,9 @@ "eslint-config-prettier": "^4.2.0", "eslint-config-xo-space": "^0.21.0", "eslint-plugin-import": "^2.17.2", - "eslint-plugin-node": "^8.0.1", + "eslint-plugin-node": "^9.0.1", "eslint-plugin-prettier": "^3.0.0", - "eslint-plugin-unicorn": "^7.0.0", + "eslint-plugin-unicorn": "^8.0.2", "prettier": "^1.17.0" } } diff --git a/yarn.lock b/yarn.lock index 109f524d..5cab03bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1800,7 +1800,7 @@ eslint-plugin-ember@^6.4.1: ember-rfc176-data "^0.3.9" snake-case "^2.1.0" -eslint-plugin-es@^1.3.1: +eslint-plugin-es@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz#475f65bb20c993fc10e8c8fe77d1d60068072da6" integrity sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw== @@ -1825,17 +1825,17 @@ eslint-plugin-import@^2.17.2: read-pkg-up "^2.0.0" resolve "^1.10.0" -eslint-plugin-node@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-8.0.1.tgz#55ae3560022863d141fa7a11799532340a685964" - integrity sha512-ZjOjbjEi6jd82rIpFSgagv4CHWzG9xsQAVp1ZPlhRnnYxcTgENUVBvhYmkQ7GvT1QFijUSo69RaiOJKhMu6i8w== +eslint-plugin-node@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-9.0.1.tgz#93e44626fa62bcb6efea528cee9687663dc03b62" + integrity sha512-fljT5Uyy3lkJzuqhxrYanLSsvaILs9I7CmQ31atTtZ0DoIzRbbvInBh4cQ1CrthFHInHYBQxfPmPt6KLHXNXdw== dependencies: - eslint-plugin-es "^1.3.1" + eslint-plugin-es "^1.4.0" eslint-utils "^1.3.1" - ignore "^5.0.2" + ignore "^5.1.1" minimatch "^3.0.4" - resolve "^1.8.1" - semver "^5.5.0" + resolve "^1.10.1" + semver "^6.0.0" eslint-plugin-prettier@^3.0.0: version "3.0.1" @@ -1844,18 +1844,21 @@ eslint-plugin-prettier@^3.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-unicorn@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-7.1.0.tgz#9efef5c68fde0ebefb0241fbcfa274f1b959c04e" - integrity sha512-lW/ZwGR638V0XuZgR160qVQvPtw8tw3laKT5LjJPt+W+tN7kVf2S2V7x+ZrEEwSjEb3OiEzb3cppzaKuYtgYeg== +eslint-plugin-unicorn@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-8.0.2.tgz#a1f6192c39916d7385c057f79a95ffcdf47f4636" + integrity sha512-Ik2/Bt/PvPnf1lZgUnNFK2310XoRn/4LYiP5gkEPVDa4w9HCoii7I6SeKh2X5Rdp2WLy4eUiLcYtiBUp+q2IRw== dependencies: clean-regexp "^1.0.0" eslint-ast-utils "^1.0.0" import-modules "^1.1.0" lodash.camelcase "^4.1.1" + lodash.defaultsdeep "^4.6.0" lodash.kebabcase "^4.0.1" lodash.snakecase "^4.0.1" + lodash.topairs "^4.3.0" lodash.upperfirst "^4.2.0" + reserved-words "^0.1.2" safe-regex "^2.0.1" eslint-restricted-globals@^0.1.1: @@ -2575,10 +2578,10 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.2: - version "5.0.5" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.0.5.tgz#c663c548d6ce186fb33616a8ccb5d46e56bdbbf9" - integrity sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA== +ignore@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.1.tgz#2fc6b8f518aff48fef65a7f348ed85632448e4a5" + integrity sha512-DWjnQIFLenVrwyRCKZT+7a7/U4Cqgar4WG8V++K3hw+lrW1hc/SIwdiGmtxKCVACmHULTuGeBbHJmbwW7/sAvA== import-fresh@^2.0.0: version "2.0.0" @@ -3150,6 +3153,11 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= +lodash.defaultsdeep@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz#bec1024f85b1bd96cbea405b23c14ad6443a6f81" + integrity sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E= + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -3190,6 +3198,11 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" +lodash.topairs@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.topairs/-/lodash.topairs-4.3.0.tgz#3b6deaa37d60fb116713c46c5f17ea190ec48d64" + integrity sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ= + lodash.unescape@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" @@ -4433,6 +4446,11 @@ requireindex@^1.1.0, requireindex@^1.2.0: resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== +reserved-words@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" + integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE= + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -4455,13 +4473,20 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.5.0, resolve@^1.8.1: +resolve@^1.10.0, resolve@^1.5.0: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== dependencies: path-parse "^1.0.6" +resolve@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" + integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== + dependencies: + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -4542,6 +4567,11 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== +semver@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" + integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"