From 7111ff6d952db9143588435d4d4faf6105314c6b Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 13 Jan 2017 11:39:40 -0500 Subject: [PATCH 01/10] Adding new eslint-index package :package: --- package.json | 5 +- yarn.lock | 237 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 169 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index 620bc3e4..9aa96c29 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "check": "yarn run lint && yarn test", "deploy": "npm publish", "check-rules": "eslint-find-rules --unused lib/config/all.js", + "rules-status": "eslint-index lib/config/all.js --format table", + "rules-omitted": "eslint-index lib/config/all.js --status omitted", "lint": "eslint . --max-warnings 0", "test": "NODE_PATH=$NODE_PATH:./transforms:./tests mocha 'tests/**/*.js' --reporter spec --compilers js:babel-core/register", "test:watch": "yarn test -- --watch --reporter min", @@ -40,9 +42,10 @@ "babel-cli": "6.x", "babel-core": "6.x", "babel-preset-shopify": "15.0.1", + "eslint": "3.10.x", "eslint-find-rules": "1.x", + "eslint-index": "^1.2.0", "eslint-plugin-shopify": "file:.", - "eslint": "3.10.x", "isparta": "4.x", "istanbul": "0.4.4", "mocha": "3.x" diff --git a/yarn.lock b/yarn.lock index cd7bcc41..318e3337 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,7 +1,5 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 - - abbrev@1, abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -131,7 +129,7 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" -async@1.x, async@^1.4.0: +async@^1.4.0, async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -180,7 +178,7 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@6.x, babel-core@^6.1.4, babel-core@^6.18.0: +babel-core@^6.1.4, babel-core@^6.18.0, babel-core@6.x: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724" dependencies: @@ -979,6 +977,15 @@ cli-cursor@^1.0.1: dependencies: restore-cursor "^1.0.1" +cli-table2@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97" + dependencies: + lodash "^3.10.1" + string-width "^1.0.1" + optionalDependencies: + colors "^1.1.2" + cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" @@ -1007,13 +1014,17 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +colors@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" dependencies: delayed-stream "~1.0.0" -commander@2.9.0, commander@^2.8.1, commander@^2.9.0: +commander@^2.8.1, commander@^2.9.0, commander@2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -1080,18 +1091,18 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@2.2.0, debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - debug@^2.1.1, debug@^2.2.0: version "2.6.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" dependencies: ms "0.7.2" +debug@~2.2.0, debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1140,7 +1151,7 @@ diff@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" -doctrine@1.5.0, doctrine@^1.2.2: +doctrine@^1.2.2, doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: @@ -1201,7 +1212,7 @@ es6-set@~0.1.3: es6-symbol "3" event-emitter "~0.3.4" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: +es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3: version "3.1.0" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" dependencies: @@ -1217,11 +1228,11 @@ es6-weak-map@^2.0.1: es6-iterator "2" es6-symbol "3" -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5, escape-string-regexp@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@1.8.x, escodegen@^1.6.1: +escodegen@^1.6.1, escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: @@ -1260,6 +1271,16 @@ eslint-import-resolver-node@^0.2.0: object-assign "^4.0.1" resolve "^1.1.6" +eslint-index: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eslint-index/-/eslint-index-1.2.0.tgz#c1b5902209659f31d606f5b12d64db6a28d1e8ce" + dependencies: + chalk "^1.1.3" + cli-table2 "^0.2.0" + eslint "^3.11.1" + lodash "^4.17.2" + yargs "^6.4.0" + eslint-module-utils@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" @@ -1353,18 +1374,18 @@ eslint-plugin-react@6.7.x: "eslint-plugin-shopify@file:.": version "15.1.0" dependencies: - babel-eslint "7.1.x" - eslint-plugin-ava "4.0.x" - eslint-plugin-babel "4.0.x" + babel-eslint "7.0.x" + eslint-plugin-ava "3.1.x" + eslint-plugin-babel "3.3.x" eslint-plugin-chai-expect "1.1.x" - eslint-plugin-flowtype "2.28.x" - eslint-plugin-import "2.2.x" - eslint-plugin-jsx-a11y "3.0.x" - eslint-plugin-lodash "2.2.x" + eslint-plugin-flowtype "2.20.x" + eslint-plugin-import "2.0.x" + eslint-plugin-jsx-a11y "2.2.x" + eslint-plugin-lodash "1.10.x" eslint-plugin-mocha "4.7.x" - eslint-plugin-node "3.0.x" + eslint-plugin-node "2.1.x" eslint-plugin-promise "3.0.x" - eslint-plugin-react "6.7.x" + eslint-plugin-react "6.4.x" eslint-plugin-sort-class-members "1.1.x" merge "1.x" @@ -1376,6 +1397,45 @@ eslint-rule-documentation@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/eslint-rule-documentation/-/eslint-rule-documentation-1.0.4.tgz#f127f59cd0264a1bcde59f4d803552fdd38cb7c2" +eslint@^3.11.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + escope "^3.6.0" + espree "^3.3.1" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + eslint@3.10.x: version "3.10.2" resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.2.tgz#c9a10e8bf6e9d65651204778c503341f1eac3ce7" @@ -1422,7 +1482,7 @@ espree@^3.1.3, espree@^3.3.1: acorn "^4.0.1" acorn-jsx "^3.0.0" -esprima@2.7.x, esprima@^2.1.0, esprima@^2.6.0, esprima@^2.7.1: +esprima@^2.1.0, esprima@^2.6.0, esprima@^2.7.1, esprima@2.7.x: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -1652,7 +1712,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@5.x, glob@^5.0.5: +glob@^5.0.5, glob@5.x: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: @@ -1662,9 +1722,9 @@ glob@5.x, glob@^5.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1673,9 +1733,9 @@ glob@7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1684,7 +1744,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.2.0: +globals@^9.0.0, globals@^9.14.0, globals@^9.2.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" @@ -1801,7 +1861,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@2: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1962,7 +2022,7 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1994,7 +2054,7 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul@0.4.4, istanbul@^0.4.0: +istanbul@^0.4.0, istanbul@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.4.tgz#e8cf718dfedb713c8334ab9ffade35f1042d2a56" dependencies: @@ -2023,7 +2083,7 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" -js-yaml@3.x, js-yaml@^3.5.1: +js-yaml@^3.5.1, js-yaml@3.x: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -2179,7 +2239,11 @@ lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: +lodash@^3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2225,7 +2289,7 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.25.0" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, "minimatch@2 || 3": version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: @@ -2237,15 +2301,15 @@ minimatch@2.x: dependencies: brace-expansion "^1.0.0" -minimist@0.0.8, minimist@~0.0.1: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +minimist@~0.0.1, minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.1, mkdirp@0.5.1, mkdirp@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2317,7 +2381,7 @@ nomnomnomnom@^2.0.0: chalk "~0.4.0" underscore "~1.6.0" -nopt@3.x, nopt@~3.0.6: +nopt@~3.0.6, nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -2364,7 +2428,7 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@1.x, once@^1.3.0: +once@^1.3.0, once@1.x: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -2441,14 +2505,14 @@ path-exists@^2.0.0: dependencies: pinkie-promise "^2.0.0" -path-is-absolute@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.0.tgz#263dada66ab3f2fb10bf7f9d24dd8f3e570ef912" - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" +path-is-absolute@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.0.tgz#263dada66ab3f2fb10bf7f9d24dd8f3e570ef912" + path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -2704,14 +2768,14 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" -resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - resolve@^1.1.6, resolve@^1.1.7: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -2725,7 +2789,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4: +rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: @@ -2741,7 +2805,7 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" -"semver@2 || 3 || 4 || 5", semver@5.3.0, semver@^5.3.0, semver@~5.3.0: +semver@^5.3.0, semver@~5.3.0, "semver@2 || 3 || 4 || 5", semver@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -2834,6 +2898,10 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -2849,10 +2917,6 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -2881,11 +2945,9 @@ strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" -supports-color@3.1.2, supports-color@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" - dependencies: - has-flag "^1.0.0" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" supports-color@^0.2.0: version "0.2.0" @@ -2895,6 +2957,12 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^3.1.0, supports-color@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" @@ -3041,17 +3109,13 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.1" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" @@ -3061,6 +3125,10 @@ wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -3093,6 +3161,12 @@ yargs-parser@^3.2.0: camelcase "^3.0.0" lodash.assign "^4.1.0" +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + yargs@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-5.0.0.tgz#3355144977d05757dbb86d6e38ec056123b3a66e" @@ -3112,6 +3186,24 @@ yargs@^5.0.0: y18n "^3.2.1" yargs-parser "^3.2.0" +yargs@^6.4.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" @@ -3120,3 +3212,4 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" + From 4e5de592c6057ad3c19ef674656f3988500209b4 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 13 Jan 2017 14:20:12 -0500 Subject: [PATCH 02/10] Update package versions :package: --- package.json | 8 ++--- yarn.lock | 86 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 75 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 9aa96c29..bd8b9051 100644 --- a/package.json +++ b/package.json @@ -58,14 +58,14 @@ "eslint-plugin-ava": "4.0.x", "eslint-plugin-babel": "4.0.x", "eslint-plugin-chai-expect": "1.1.x", - "eslint-plugin-flowtype": "2.28.x", + "eslint-plugin-flowtype": "2.29.x", "eslint-plugin-import": "2.2.x", "eslint-plugin-jsx-a11y": "3.0.x", "eslint-plugin-lodash": "2.2.x", - "eslint-plugin-mocha": "4.7.x", + "eslint-plugin-mocha": "4.8.x", "eslint-plugin-node": "3.0.x", - "eslint-plugin-promise": "3.0.x", - "eslint-plugin-react": "6.7.x", + "eslint-plugin-promise": "3.4.x", + "eslint-plugin-react": "6.9.x", "eslint-plugin-sort-class-members": "1.1.x", "merge": "1.x" } diff --git a/yarn.lock b/yarn.lock index 318e3337..08ba0107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -109,6 +109,13 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array.prototype.find@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.1.tgz#1557f888df6c57e4d1256f20852d687a25b51fde" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.0" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1121,6 +1128,13 @@ deep-strict-equal@^0.2.0: dependencies: core-assert "^0.2.0" +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -1176,6 +1190,23 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.5.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + is-callable "^1.1.3" + is-regex "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: version "0.10.12" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" @@ -1309,9 +1340,9 @@ eslint-plugin-chai-expect@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-1.1.1.tgz#cd640b8b38cf6c3abcc378673b7b173b99ddc70a" -eslint-plugin-flowtype@2.28.x: - version "2.28.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.28.2.tgz#2430ac1bf434db878e16cfde454f64b13896317b" +eslint-plugin-flowtype, eslint-plugin-flowtype@2.29.x: + version "2.29.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" dependencies: lodash "^4.15.0" @@ -1344,9 +1375,9 @@ eslint-plugin-lodash@2.2.x: dependencies: lodash "^4.0.0" -eslint-plugin-mocha@4.7.x: - version "4.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.7.0.tgz#69262362f4ec69ae5849908824f325b8d465e7f3" +eslint-plugin-mocha, eslint-plugin-mocha@4.8.x: + version "4.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.8.0.tgz#7627b35a61e5a720412da96eab06f0e03a1dcdb6" dependencies: ramda "^0.22.1" @@ -1360,16 +1391,17 @@ eslint-plugin-node@3.0.x: resolve "^1.1.7" semver "5.3.0" -eslint-plugin-promise@3.0.x: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.0.0.tgz#1528635d0160f3484e425cce2169cb74cec0186a" +eslint-plugin-promise@3.4.x: + version "3.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.0.tgz#6ba9048c2df57be77d036e0c68918bc9b4fc4195" -eslint-plugin-react@6.7.x: - version "6.7.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz#1af96aea545856825157d97c1b50d5a8fb64a5a7" +eslint-plugin-react@6.9.x: + version "6.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.9.0.tgz#54c2e9906b76f9d10142030bdc34e9d6840a0bb2" dependencies: + array.prototype.find "^2.0.1" doctrine "^1.2.2" - jsx-ast-utils "^1.3.3" + jsx-ast-utils "^1.3.4" "eslint-plugin-shopify@file:.": version "15.1.0" @@ -1617,6 +1649,10 @@ for-own@^0.1.4: dependencies: for-in "^0.1.5" +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -1661,7 +1697,7 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2: +function-bind@^1.0.2, function-bind@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" @@ -1921,6 +1957,14 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -2008,12 +2052,20 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-regex@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" + is-resolvable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" dependencies: tryit "^1.0.1" +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -2140,7 +2192,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.3: +jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4" dependencies: @@ -2421,6 +2473,10 @@ object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" From bc30696914a5fc911770d36d71946eee8ef6c0d0 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 13 Jan 2017 14:26:28 -0500 Subject: [PATCH 03/10] Add new rules for eslint-plugin-react --- lib/config/rules/react.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/config/rules/react.js b/lib/config/rules/react.js index 1b2e7978..f030ad33 100644 --- a/lib/config/rules/react.js +++ b/lib/config/rules/react.js @@ -7,6 +7,8 @@ module.exports = { 'react/forbid-component-props': 'off', // Forbid certain propTypes 'react/forbid-prop-types': ['error', {forbid: ['any', 'array']}], + // Prevent using Array index in key prop + 'react/no-array-index-key': 'error', // Prevent passing children as props 'react/no-children-prop': 'warn', // Prevent usage of dangerous JSX properties @@ -47,6 +49,8 @@ module.exports = { 'react/prop-types': 'warn', // Prevent missing React when using JSX 'react/react-in-jsx-scope': 'error', + // Enforce a defaultProps definition for every prop that is not a required prop + 'react/require-default-props': 'error', // Enforce React components to have a shouldComponentUpdate method 'react/require-optimization': 'off', // Enforce ES5 or ES6 class for returning value in render function From 4cc649bdd3856f68e534789e6c901b3631cd9cac Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 13 Jan 2017 16:32:24 -0500 Subject: [PATCH 04/10] Add new rules for eslint-plugin-promise --- lib/config/rules/promise.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/config/rules/promise.js b/lib/config/rules/promise.js index 355c2b21..1fc4cef5 100644 --- a/lib/config/rules/promise.js +++ b/lib/config/rules/promise.js @@ -1,13 +1,33 @@ // see https://github.com/xjamundx/eslint-plugin-promise module.exports = { + // Promise Rules + 'promise/always-catch': 'off', // Ensure that each time a then() is applied to a promise, a catch() is applied as well. Exceptions are made if you are returning that promise. 'promise/catch-or-return': 'warn', + // Avoid wrapping values in Promise.resolve or Promise.reject when not needed + 'promise/no-return-wrap': 'error', // Ensure that inside a then() you make sure to return a new promise or value. 'promise/always-return': 'error', // Enforce standard parameter names for Promise constructors. 'promise/param-names': 'warn', // Ensure that Promise is included fresh in each file instead of relying on the existence of a native promise implementation. 'promise/no-native': 'off', + // Avoid nested .then() or .catch() statements + 'promise/no-nesting': 'warn', + // Avoid using promises inside of callbacks + 'promise/no-promise-in-callback': 'warn', + // Avoid calling cb() inside of a then() (use nodeify] instead) + 'promise/no-callback-in-promise': 'warn', + // Avoid creating new promises outside of utility libs (use pify instead) + 'promise/avoid-new': 'warn', + + + // Async/Await Rules + + // Prefer await to then() for reading Promise values + 'promise/prefer-await-to-then': 'error', + // Prefer async/await to the callback pattern + 'promise/prefer-await-to-callbacks': 'error', }; From 6e26878af5c95cf29b0a2b449da9ec5df4525df6 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Mon, 16 Jan 2017 09:57:28 -0500 Subject: [PATCH 05/10] Fix eslint-index package version --- package.json | 2 +- yarn.lock | 63 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index bd8b9051..adb7de2d 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "babel-preset-shopify": "15.0.1", "eslint": "3.10.x", "eslint-find-rules": "1.x", - "eslint-index": "^1.2.0", + "eslint-index": "1.2.x", "eslint-plugin-shopify": "file:.", "isparta": "4.x", "istanbul": "0.4.4", diff --git a/yarn.lock b/yarn.lock index 08ba0107..f29cc7c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,8 +23,8 @@ ajv-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.0.tgz#c11e6859eafff83e0dafc416929472eca946aa2c" ajv@^4.7.0: - version "4.10.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.3.tgz#3e4fea9675b157de7888b80dd0ed735b83f28e11" + version "4.10.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.4.tgz#c0974dd00b3464984892d6010aa9c2c945933254" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -46,8 +46,8 @@ ansi-escapes@^1.1.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" ansi-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" ansi-styles@^2.2.1: version "2.2.1" @@ -852,8 +852,8 @@ babel-types@^6.13.0, babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18 to-fast-properties "^1.0.1" babylon@^6.11.0, babylon@^6.13.0: - version "6.14.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" + version "6.15.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" balanced-match@^0.4.1: version "0.4.2" @@ -1302,7 +1302,7 @@ eslint-import-resolver-node@^0.2.0: object-assign "^4.0.1" resolve "^1.1.6" -eslint-index: +eslint-index@1.2.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eslint-index/-/eslint-index-1.2.0.tgz#c1b5902209659f31d606f5b12d64db6a28d1e8ce" dependencies: @@ -1320,8 +1320,8 @@ eslint-module-utils@^2.0.0: pkg-dir "^1.0.0" eslint-plugin-ava@4.0.x: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.0.0.tgz#3e71a66674a41640069561a8e5e721ba1d562edf" + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.0.1.tgz#1e4478791000c7affd2b54f1cbb23feaa8b713e8" dependencies: arrify "^1.0.1" deep-strict-equal "^0.2.0" @@ -1340,7 +1340,7 @@ eslint-plugin-chai-expect@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-1.1.1.tgz#cd640b8b38cf6c3abcc378673b7b173b99ddc70a" -eslint-plugin-flowtype, eslint-plugin-flowtype@2.29.x: +eslint-plugin-flowtype@2.29.x: version "2.29.2" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" dependencies: @@ -1375,7 +1375,7 @@ eslint-plugin-lodash@2.2.x: dependencies: lodash "^4.0.0" -eslint-plugin-mocha, eslint-plugin-mocha@4.8.x: +eslint-plugin-mocha@4.8.x: version "4.8.0" resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.8.0.tgz#7627b35a61e5a720412da96eab06f0e03a1dcdb6" dependencies: @@ -1748,7 +1748,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^5.0.5, glob@5.x: +glob@^5.0.15, glob@^5.0.5, glob@5.x: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: @@ -2042,7 +2042,7 @@ is-path-inside@^1.0.0: is-posix-bracket@^0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + resolved "http://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" is-primitive@^2.0.0: version "2.0.0" @@ -2106,7 +2106,26 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul@^0.4.0, istanbul@0.4.4: +istanbul@^0.4.0: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +istanbul@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.4.tgz#e8cf718dfedb713c8334ab9ffade35f1042d2a56" dependencies: @@ -2357,7 +2376,11 @@ minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@~0.0.1, minimist@0.0.8: +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -2739,7 +2762,7 @@ regenerator-transform@0.9.8: regex-cache@^0.4.2: version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + resolved "http://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" dependencies: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" @@ -2874,8 +2897,8 @@ set-immediate-shim@^1.0.1: resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" shelljs@^0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" + version "0.7.6" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -2940,8 +2963,8 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + version "1.10.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" From 5fbefbcb53d52c2e807788152654b97ef64192ec Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Mon, 16 Jan 2017 13:13:03 -0500 Subject: [PATCH 06/10] Remove eslint-find-rules package and script --- package.json | 2 -- yarn.lock | 55 +--------------------------------------------------- 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/package.json b/package.json index adb7de2d..0f93ca9f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "scripts": { "check": "yarn run lint && yarn test", "deploy": "npm publish", - "check-rules": "eslint-find-rules --unused lib/config/all.js", "rules-status": "eslint-index lib/config/all.js --format table", "rules-omitted": "eslint-index lib/config/all.js --status omitted", "lint": "eslint . --max-warnings 0", @@ -43,7 +42,6 @@ "babel-core": "6.x", "babel-preset-shopify": "15.0.1", "eslint": "3.10.x", - "eslint-find-rules": "1.x", "eslint-index": "1.2.x", "eslint-plugin-shopify": "file:.", "isparta": "4.x", diff --git a/yarn.lock b/yarn.lock index f29cc7c0..7f1b20e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,17 +1283,6 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-find-rules@1.x: - version "1.14.3" - resolved "https://registry.yarnpkg.com/eslint-find-rules/-/eslint-find-rules-1.14.3.tgz#51ff8169f0bfaacf3575edd8c439a94d919cdada" - dependencies: - cliui "^3.2.0" - eslint-rule-documentation "^1.0.0" - path-is-absolute "1.0.0" - which "^1.2.8" - window-size "^0.2.0" - yargs "^5.0.0" - eslint-import-resolver-node@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" @@ -1425,10 +1414,6 @@ eslint-plugin-sort-class-members@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.1.1.tgz#dedbb30054fced1a55a9d443bb2b842a0cfc95f1" -eslint-rule-documentation@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/eslint-rule-documentation/-/eslint-rule-documentation-1.0.4.tgz#f127f59cd0264a1bcde59f4d803552fdd38cb7c2" - eslint@^3.11.1: version "3.13.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" @@ -2274,10 +2259,6 @@ lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" -lodash.assign@^4.1.0, lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" @@ -2588,10 +2569,6 @@ path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-absolute@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.0.tgz#263dada66ab3f2fb10bf7f9d24dd8f3e570ef912" - path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -3176,7 +3153,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.0.9, which@^1.1.1, which@^1.2.8: +which@^1.0.9, which@^1.1.1: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -3188,10 +3165,6 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.1" -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" @@ -3233,38 +3206,12 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-3.2.0.tgz#5081355d19d9d0c8c5d81ada908cb4e6d186664f" - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.1.0" - yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" dependencies: camelcase "^3.0.0" -yargs@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-5.0.0.tgz#3355144977d05757dbb86d6e38ec056123b3a66e" - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.2.0" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^3.2.0" - yargs@^6.4.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" From 70af7aa4327a03ca0783e5a5aa50f48460d1ee7c Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Mon, 16 Jan 2017 17:17:11 -0500 Subject: [PATCH 07/10] Update eslint-plugin-promise rules --- lib/config/rules/promise.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config/rules/promise.js b/lib/config/rules/promise.js index 1fc4cef5..db791370 100644 --- a/lib/config/rules/promise.js +++ b/lib/config/rules/promise.js @@ -21,13 +21,13 @@ module.exports = { // Avoid calling cb() inside of a then() (use nodeify] instead) 'promise/no-callback-in-promise': 'warn', // Avoid creating new promises outside of utility libs (use pify instead) - 'promise/avoid-new': 'warn', + 'promise/avoid-new': 'off', // Async/Await Rules // Prefer await to then() for reading Promise values - 'promise/prefer-await-to-then': 'error', + 'promise/prefer-await-to-then': 'off', // Prefer async/await to the callback pattern - 'promise/prefer-await-to-callbacks': 'error', + 'promise/prefer-await-to-callbacks': 'off', }; From 8daa0d02c6b5ad3c2524a0a77a7d5843ce0829a8 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Tue, 17 Jan 2017 09:42:44 -0500 Subject: [PATCH 08/10] Enable ignorePureComponents flag for react/prefer-stateless-function rule #5 --- lib/config/rules/react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/rules/react.js b/lib/config/rules/react.js index f030ad33..eba264ee 100644 --- a/lib/config/rules/react.js +++ b/lib/config/rules/react.js @@ -44,7 +44,7 @@ module.exports = { // Enforce ES5 or ES6 class for React Components 'react/prefer-es6-class': 'error', // Enforce stateless React Components to be written as a pure function - 'react/prefer-stateless-function': 'warn', + 'react/prefer-stateless-function': ['warn', {ignorePureComponents: true}], // Prevent missing props validation in a React component definition 'react/prop-types': 'warn', // Prevent missing React when using JSX From 40de6046b45f1a877867aae3b348c8d102cd981a Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Tue, 17 Jan 2017 11:17:27 -0500 Subject: [PATCH 09/10] Update eslint-plugin-lodash package to 2.3.x and add new rule --- lib/config/rules/lodash.js | 2 ++ package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/config/rules/lodash.js b/lib/config/rules/lodash.js index 692d92d1..d7bf4f22 100644 --- a/lib/config/rules/lodash.js +++ b/lib/config/rules/lodash.js @@ -28,6 +28,8 @@ module.exports = { 'lodash/consistent-compose': ['warn', 'flow'], // Prefer identity shorthand syntax 'lodash/identity-shorthand': ['warn', 'never'], + // Prefer a specific import scope (e.g. lodash/map vs lodash) + 'lodash/import-scope': ['error', 'method'], // Prefer matches property shorthand syntax 'lodash/matches-prop-shorthand': ['warn', 'never'], // Prefer matches shorthand syntax diff --git a/package.json b/package.json index 0f93ca9f..08c2a707 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "eslint-plugin-flowtype": "2.29.x", "eslint-plugin-import": "2.2.x", "eslint-plugin-jsx-a11y": "3.0.x", - "eslint-plugin-lodash": "2.2.x", + "eslint-plugin-lodash": "2.3.x", "eslint-plugin-mocha": "4.8.x", "eslint-plugin-node": "3.0.x", "eslint-plugin-promise": "3.4.x", diff --git a/yarn.lock b/yarn.lock index 7f1b20e3..7cadebcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1358,9 +1358,9 @@ eslint-plugin-jsx-a11y@3.0.x: jsx-ast-utils "^1.0.0" object-assign "^4.0.1" -eslint-plugin-lodash@2.2.x: - version "2.2.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.2.5.tgz#0e8a1dc51b3766c7b016d7c0a6352066c98a03e5" +eslint-plugin-lodash@2.3.x: + version "2.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.3.1.tgz#423182ef674f84555aec49c7e21ad6fd3908365f" dependencies: lodash "^4.0.0" From 3b6f088c1a11e7686236bd65c95f9b67eaec99b3 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Tue, 17 Jan 2017 11:33:23 -0500 Subject: [PATCH 10/10] Updated rules --- lib/config/rules/promise.js | 6 +++--- lib/config/rules/react.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config/rules/promise.js b/lib/config/rules/promise.js index db791370..98bb5314 100644 --- a/lib/config/rules/promise.js +++ b/lib/config/rules/promise.js @@ -17,9 +17,9 @@ module.exports = { // Avoid nested .then() or .catch() statements 'promise/no-nesting': 'warn', // Avoid using promises inside of callbacks - 'promise/no-promise-in-callback': 'warn', - // Avoid calling cb() inside of a then() (use nodeify] instead) - 'promise/no-callback-in-promise': 'warn', + 'promise/no-promise-in-callback': 'off', + // Avoid calling cb() inside of a then() (use nodeify instead) + 'promise/no-callback-in-promise': 'off', // Avoid creating new promises outside of utility libs (use pify instead) 'promise/avoid-new': 'off', diff --git a/lib/config/rules/react.js b/lib/config/rules/react.js index eba264ee..8fb9292e 100644 --- a/lib/config/rules/react.js +++ b/lib/config/rules/react.js @@ -50,7 +50,7 @@ module.exports = { // Prevent missing React when using JSX 'react/react-in-jsx-scope': 'error', // Enforce a defaultProps definition for every prop that is not a required prop - 'react/require-default-props': 'error', + 'react/require-default-props': 'off', // Enforce React components to have a shouldComponentUpdate method 'react/require-optimization': 'off', // Enforce ES5 or ES6 class for returning value in render function