diff --git a/README.md b/README.md index d1754f32..2d912a74 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ This plugin also provides the following tool-specific configurations, which can - [ava](lib/config/ava.js): Use this for projects that use the [AVA test runner](https://github.com/sindresorhus/ava). - [flow](lib/config/flow.js): Use this for projects that use [flow](http://flowtype.org) for type checking. - [jquery](lib/config/jquery.js): Use this for projects that use [jQuery](http://jquery.com). +- [prettier](lib/config/prettier.js): Use [prettier](https://github.com/prettier/prettier) for consistent formatting. Extending this Shopify's prettier config will [override](https://github.com/prettier/eslint-config-prettier/blob/master/index.js) the default Shopify eslint rules in favor of prettier formatting. ### node diff --git a/index.js b/index.js index 7c16bdac..241c83e4 100644 --- a/index.js +++ b/index.js @@ -23,6 +23,7 @@ module.exports = { lodash: require('./lib/config/lodash'), mocha: require('./lib/config/mocha'), node: require('./lib/config/node'), + prettier: require('./lib/config/prettier'), react: require('./lib/config/react'), }, }; diff --git a/lib/config/all.js b/lib/config/all.js index 32a9c228..d5a23e4b 100644 --- a/lib/config/all.js +++ b/lib/config/all.js @@ -1,4 +1,4 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { parser: 'babel-eslint', @@ -28,6 +28,7 @@ module.exports = { 'jsx-a11y', 'lodash', 'node', + 'prettier', 'promise', 'react', 'shopify', @@ -52,6 +53,7 @@ module.exports = { require('./rules/jsx-a11y'), require('./rules/lodash'), require('./rules/node'), + require('./rules/prettier'), require('./rules/promise'), require('./rules/react'), require('./rules/shopify'), diff --git a/lib/config/ava.js b/lib/config/ava.js index d6c83807..ba7ad7b5 100644 --- a/lib/config/ava.js +++ b/lib/config/ava.js @@ -8,9 +8,7 @@ module.exports = { sourceType: 'module', }, - plugins: [ - 'ava', - ], + plugins: ['ava'], rules: require('./rules/ava'), }; diff --git a/lib/config/core.js b/lib/config/core.js index beea8bf0..21ca2372 100644 --- a/lib/config/core.js +++ b/lib/config/core.js @@ -1,9 +1,7 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { - plugins: [ - 'shopify', - ], + plugins: ['shopify'], parserOptions: { ecmaFeatures: { diff --git a/lib/config/esnext.js b/lib/config/esnext.js index ea20c9ee..b18c3be3 100644 --- a/lib/config/esnext.js +++ b/lib/config/esnext.js @@ -1,4 +1,4 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { extends: 'plugin:shopify/core', @@ -16,18 +16,10 @@ module.exports = { }, }, - plugins: [ - 'babel', - 'promise', - 'sort-class-members', - 'import', - ], + plugins: ['babel', 'promise', 'sort-class-members', 'import'], settings: { - 'import/ignore': [ - 'node_modules', - '\\.s?css', - ], + 'import/ignore': ['node_modules', '\\.s?css'], }, rules: merge( diff --git a/lib/config/flow.js b/lib/config/flow.js index b6406a51..67dc3e94 100644 --- a/lib/config/flow.js +++ b/lib/config/flow.js @@ -1,4 +1,4 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { parser: 'babel-eslint', @@ -12,12 +12,7 @@ module.exports = { sourceType: 'module', }, - plugins: [ - 'flowtype', - 'shopify', - ], + plugins: ['flowtype', 'shopify'], - rules: merge( - require('./rules/flowtype') - ), + rules: merge(require('./rules/flowtype')), }; diff --git a/lib/config/jquery.js b/lib/config/jquery.js index f8890a29..bd87ad4d 100644 --- a/lib/config/jquery.js +++ b/lib/config/jquery.js @@ -3,9 +3,7 @@ module.exports = { jquery: true, }, - plugins: [ - 'shopify', - ], + plugins: ['shopify'], rules: { 'shopify/jquery-dollar-sign-reference': 'error', diff --git a/lib/config/lodash.js b/lib/config/lodash.js index 2207595c..2253dadf 100644 --- a/lib/config/lodash.js +++ b/lib/config/lodash.js @@ -1,7 +1,5 @@ module.exports = { - plugins: [ - 'lodash', - ], + plugins: ['lodash'], rules: require('./rules/lodash'), }; diff --git a/lib/config/mocha.js b/lib/config/mocha.js index 4b7f3e07..e39b7ca8 100644 --- a/lib/config/mocha.js +++ b/lib/config/mocha.js @@ -1,25 +1,17 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { env: { mocha: true, }, - plugins: [ - 'mocha', - 'chai-expect', - 'shopify', - ], + plugins: ['mocha', 'chai-expect', 'shopify'], - rules: merge( - require('./rules/mocha'), - require('./rules/chai-expect'), - { - 'shopify/sinon-prefer-meaningful-assertions': 'error', - // Chai expect syntax produces unused expression warnings - 'no-unused-expressions': 'off', - // Chai expect syntax can have long chained calls - 'newline-per-chained-call': 'off', - } - ), + rules: merge(require('./rules/mocha'), require('./rules/chai-expect'), { + 'shopify/sinon-prefer-meaningful-assertions': 'error', + // Chai expect syntax produces unused expression warnings + 'no-unused-expressions': 'off', + // Chai expect syntax can have long chained calls + 'newline-per-chained-call': 'off', + }), }; diff --git a/lib/config/node.js b/lib/config/node.js index 1b87d830..de7f44c6 100644 --- a/lib/config/node.js +++ b/lib/config/node.js @@ -3,9 +3,7 @@ module.exports = { node: true, }, - plugins: [ - 'node', - ], + plugins: ['node'], rules: require('./rules/node'), }; diff --git a/lib/config/prettier.js b/lib/config/prettier.js new file mode 100644 index 00000000..234cdb6a --- /dev/null +++ b/lib/config/prettier.js @@ -0,0 +1,20 @@ +module.exports = { + extends: ['plugin:shopify/esnext', 'prettier'], + + plugins: ['prettier'], + + rules: { + 'prettier/prettier': [ + 'error', + { + singleQuote: true, + trailingComma: 'es5', + bracketSpacing: false, + jsxBracketSameLine: false, + }, + ], + + // rules to disable to prefer prettier + 'shopify/binary-assignment-parens': 'off', + }, +}; diff --git a/lib/config/react.js b/lib/config/react.js index 9d2a90b9..889146a1 100644 --- a/lib/config/react.js +++ b/lib/config/react.js @@ -1,4 +1,4 @@ -var merge = require('merge'); +const merge = require('merge'); module.exports = { extends: 'plugin:shopify/esnext', @@ -17,17 +17,13 @@ module.exports = { ReactClass: true, }, - plugins: [ - 'react', - 'jsx-a11y', - ], + plugins: ['react', 'jsx-a11y'], - rules: merge( - require('./rules/react'), - require('./rules/jsx-a11y'), - { - // Not using `this` is fine in some lifecycle hooks - 'class-methods-use-this': ['error', { + rules: merge(require('./rules/react'), require('./rules/jsx-a11y'), { + // Not using `this` is fine in some lifecycle hooks + 'class-methods-use-this': [ + 'error', + { exceptMethods: [ 'render', 'getChildContext', @@ -39,7 +35,7 @@ module.exports = { 'componentDidUpdate', 'componentWillUnmount', ], - }], - } - ), + }, + ], + }), }; diff --git a/lib/config/rules/best-practices.js b/lib/config/rules/best-practices.js index 55572191..766fd780 100755 --- a/lib/config/rules/best-practices.js +++ b/lib/config/rules/best-practices.js @@ -10,11 +10,11 @@ module.exports = { // Enforce that class methods utilize this 'class-methods-use-this': 'error', // Specify the maximum cyclomatic complexity allowed in a program - 'complexity': 'off', + complexity: 'off', // Require return statements to either always or never specify values 'consistent-return': 'error', // Specify curly brace conventions for all control statements - 'curly': ['error', 'all'], + curly: ['error', 'all'], // Require default case in switch statements 'default-case': 'off', // Encourages use of dot notation whenever possible @@ -22,7 +22,7 @@ module.exports = { // Enforces consistent newlines before or after dots 'dot-location': ['error', 'property'], // Require the use of === and !== - 'eqeqeq': ['error', 'allow-null'], + eqeqeq: ['error', 'allow-null'], // Make sure for-in loops have an if statement 'guard-for-in': 'error', // Disallow the use of alert, confirm, and prompt @@ -135,7 +135,7 @@ module.exports = { // Require using Error objects as Promise rejection reasons 'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}], // Require use of the second argument for parseInt() - 'radix': 'error', + radix: 'error', // Disallow async functions which have no await expression 'require-await': 'error', // Requires to declare all vars on top of their containing scope @@ -143,5 +143,5 @@ module.exports = { // Require immediate function invocation to be wrapped in parentheses 'wrap-iife': ['error', 'inside'], // Require or disallow Yoda conditions - 'yoda': ['error', 'never'], + yoda: ['error', 'never'], }; diff --git a/lib/config/rules/flowtype.js b/lib/config/rules/flowtype.js index 1bab9ca4..37848119 100644 --- a/lib/config/rules/flowtype.js +++ b/lib/config/rules/flowtype.js @@ -16,11 +16,14 @@ module.exports = { // Disallows Flow type imports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation). 'flowtype/no-types-missing-file-annotation': 'error', // Warns against weak type annotations any, Object and Function. - 'flowtype/no-weak-types': ['error', { - any: false, - Object: false, - Function: true, - }], + 'flowtype/no-weak-types': [ + 'error', + { + any: false, + Object: false, + Function: true, + }, + ], // Enforces consistent separators between properties in Flow object types. 'flowtype/object-type-delimiter': ['error', 'comma'], // Requires that all function parameters have type annotations. diff --git a/lib/config/rules/import.js b/lib/config/rules/import.js index f81991e2..dc363f14 100644 --- a/lib/config/rules/import.js +++ b/lib/config/rules/import.js @@ -61,12 +61,12 @@ module.exports = { // Ensure consistent use of file extension within the import path 'import/extensions': ['error', {js: 'never', json: 'always'}], // Enforce a convention in module import order - 'import/order': ['error', { - groups: [ - ['builtin', 'external'], - ['internal', 'parent', 'sibling'], - ], - }], + 'import/order': [ + 'error', + { + groups: [['builtin', 'external'], ['internal', 'parent', 'sibling']], + }, + ], // Enforce a newline after import statements 'import/newline-after-import': 'error', // Prefer a default export if module exports a single name diff --git a/lib/config/rules/promise.js b/lib/config/rules/promise.js index 542a4784..808a6c99 100644 --- a/lib/config/rules/promise.js +++ b/lib/config/rules/promise.js @@ -23,7 +23,6 @@ module.exports = { // Avoid creating new promises outside of utility libs (use pify instead) 'promise/avoid-new': 'off', - // Async/Await Rules // Prefer await to then() for reading Promise values diff --git a/lib/config/rules/stylistic-issues.js b/lib/config/rules/stylistic-issues.js index 44cc4718..3486701c 100755 --- a/lib/config/rules/stylistic-issues.js +++ b/lib/config/rules/stylistic-issues.js @@ -12,7 +12,7 @@ module.exports = { // Enforce one true brace style 'brace-style': ['error', '1tbs', {allowSingleLine: true}], // Require camel case names - 'camelcase': ['error', {properties: 'always'}], + camelcase: ['error', {properties: 'always'}], // Enforce or disallow capitalization of the first letter of a comment 'capitalized-comments': 'off', // Enforce spacing before and after comma @@ -38,15 +38,18 @@ module.exports = { // Blacklist certain identifiers to prevent them being used 'id-blacklist': 'off', // This option enforces minimum and maximum identifier lengths (variable names, property names etc.) - 'id-length': ['error', { - min: 2, - properties: 'always', - exceptions: ['x', 'y', 'i', 'j', 't', '_', '$'], - }], + 'id-length': [ + 'error', + { + min: 2, + properties: 'always', + exceptions: ['x', 'y', 'i', 'j', 't', '_', '$'], + }, + ], // Require identifiers to match the provided regular expression 'id-match': 'off', // Disable eslint v4 stricter indent rules - 'indent': 'off', + indent: 'off', // Use eslint v3 indent rules: This option sets a specific tab width for your code 'indent-legacy': ['error', 2, {SwitchCase: 1, MemberExpression: 1}], // Specify whether double or single quotes should be used in JSX attributes @@ -130,7 +133,11 @@ module.exports = { // Require assignment operator shorthand where possible or prohibit it entirely 'operator-assignment': ['error', 'always'], // Enforce operators to be placed before or after line breaks - 'operator-linebreak': ['error', 'after', {overrides: {'?': 'before', ':': 'before'}}], + 'operator-linebreak': [ + 'error', + 'after', + {overrides: {'?': 'before', ':': 'before'}}, + ], // Enforce padding within blocks 'padded-blocks': 'off', // require or disallow padding lines between statements @@ -142,7 +149,7 @@ module.exports = { // Require quotes around object literal property names 'quote-props': ['error', 'as-needed'], // Specify whether backticks, double or single quotes should be used - 'quotes': ['error', 'single', 'avoid-escape'], + quotes: ['error', 'single', 'avoid-escape'], // Require JSDoc comments 'require-jsdoc': 'off', // Enforce spacing before and after semicolons @@ -150,7 +157,7 @@ module.exports = { // enforce location of semicolons 'semi-style': ['error', 'last'], // Require or disallow use of semicolons instead of ASI - 'semi': ['error', 'always'], + semi: ['error', 'always'], // Requires object keys to be sorted 'sort-keys': 'off', // Sort variables within the same declaration block @@ -158,11 +165,14 @@ module.exports = { // Require or disallow space before blocks 'space-before-blocks': ['error', 'always'], // Require or disallow space before function opening parenthesis - 'space-before-function-paren': ['error', { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }], + 'space-before-function-paren': [ + 'error', + { + anonymous: 'never', + named: 'never', + asyncArrow: 'always', + }, + ], // Require or disallow spaces inside parentheses 'space-in-parens': ['error', 'never'], // Require spaces around operators @@ -172,7 +182,7 @@ module.exports = { // Require or disallow a space immediately following the // or /* in a comment 'spaced-comment': ['error', 'always', {markers: ['=']}], // enforce spacing around colons of switch statements - 'switch-colon-spacing': ['error', {'after': true, 'before': false}], + 'switch-colon-spacing': ['error', {after: true, before: false}], // Require or disallow spacing between template tags and their literals 'template-tag-spacing': ['error', 'never'], // Require or disallow the Unicode BOM diff --git a/lib/rules/binary-assignment-parens.js b/lib/rules/binary-assignment-parens.js index f2514b8c..d9a5c19b 100644 --- a/lib/rules/binary-assignment-parens.js +++ b/lib/rules/binary-assignment-parens.js @@ -1,34 +1,45 @@ -var MESSAGES = { +const MESSAGES = { always: 'You must include parentheses around a binary assignment expression.', - never: 'You must not include parentheses around a binary assignment expression.', + never: + 'You must not include parentheses around a binary assignment expression.', }; -var BOOLEAN_OPERATORS = ['==', '===', '!=', '!==', '>', '>=', '<', '<=']; +const BOOLEAN_OPERATORS = ['==', '===', '!=', '!==', '>', '>=', '<', '<=']; module.exports = { meta: { docs: {}, - schema: [{ - enum: ['always', 'never'], - }], + schema: [ + { + enum: ['always', 'never'], + }, + ], }, - create: function(context) { - var config = context.options[0] || 'always'; - var shouldHaveParens = (config === 'always'); + create(context) { + const config = context.options[0] || 'always'; + const shouldHaveParens = config === 'always'; function hasParens(node) { - var beforeToken = context.getTokenBefore(node); - var hasBeforeParen = beforeToken && (beforeToken.type === 'Punctuator') && (beforeToken.value === '('); - var afterToken = context.getTokenAfter(node); - var hasAfterParen = afterToken && (afterToken.type === 'Punctuator') && (afterToken.value === ')'); + const beforeToken = context.getTokenBefore(node); + const hasBeforeParen = + beforeToken && + beforeToken.type === 'Punctuator' && + beforeToken.value === '('; + const afterToken = context.getTokenAfter(node); + const hasAfterParen = + afterToken && + afterToken.type === 'Punctuator' && + afterToken.value === ')'; return hasBeforeParen && hasAfterParen; } function evaluateBinaryExpression(node) { - if (BOOLEAN_OPERATORS.indexOf(node.operator) < 0) { return; } + if (BOOLEAN_OPERATORS.indexOf(node.operator) < 0) { + return; + } if (shouldHaveParens !== hasParens(node)) { context.report(node, MESSAGES[config]); @@ -40,18 +51,24 @@ module.exports = { } function evaluateAssignmentExpression(node) { - if (!node) { return; } + if (!node) { + return; + } - if (node.type === 'BinaryExpression') { evaluateBinaryExpression(node); } - if (node.type === 'LogicalExpression') { evaluateLogicalExpression(node); } + if (node.type === 'BinaryExpression') { + evaluateBinaryExpression(node); + } + if (node.type === 'LogicalExpression') { + evaluateLogicalExpression(node); + } } return { - VariableDeclarator: function(node) { + VariableDeclarator(node) { evaluateAssignmentExpression(node.init); }, - AssignmentExpression: function(node) { + AssignmentExpression(node) { evaluateAssignmentExpression(node.right); }, }; diff --git a/lib/rules/class-property-semi.js b/lib/rules/class-property-semi.js index 81ee0d7f..3b846e8a 100644 --- a/lib/rules/class-property-semi.js +++ b/lib/rules/class-property-semi.js @@ -2,36 +2,38 @@ module.exports = { meta: { docs: {}, fixable: 'code', - schema: [{ - enum: ['always', 'never'], - }], + schema: [ + { + enum: ['always', 'never'], + }, + ], }, - create: function(context) { - var config = context.options[0] || 'always'; - var always = (config === 'always'); + create(context) { + const config = context.options[0] || 'always'; + const always = config === 'always'; function isSemicolon(token) { return token.type === 'Punctuator' && token.value === ';'; } function checkClassProperty(node) { - var lastToken = context.getLastToken(node); - var hasSemicolon = isSemicolon(lastToken); + const lastToken = context.getLastToken(node); + const hasSemicolon = isSemicolon(lastToken); if (always && !hasSemicolon) { context.report({ - node: node, + node, message: 'Missing semicolon.', - fix: function(fixer) { + fix(fixer) { fixer.insertTextAfter(lastToken, ';'); }, }); } else if (!always && hasSemicolon) { context.report({ - node: node, + node, message: 'Extra semicolon.', - fix: function(fixer) { + fix(fixer) { fixer.remove(lastToken); }, }); diff --git a/lib/rules/jquery-dollar-sign-reference.js b/lib/rules/jquery-dollar-sign-reference.js index 9080e749..39af743f 100644 --- a/lib/rules/jquery-dollar-sign-reference.js +++ b/lib/rules/jquery-dollar-sign-reference.js @@ -1,6 +1,6 @@ -var JQUERY_IDENTIFIERS = ['$', 'jQuery']; +const JQUERY_IDENTIFIERS = ['$', 'jQuery']; -var nonChainingMethods = { +const nonChainingMethods = { context: true, get: true, hasClass: true, @@ -25,34 +25,50 @@ var nonChainingMethods = { val: true, width: true, - attr: function(node) { - return node.arguments.length < 2 && node.arguments[0] && node.arguments[0].type !== 'ObjectExpression'; + attr(node) { + return ( + node.arguments.length < 2 && + node.arguments[0] && + node.arguments[0].type !== 'ObjectExpression' + ); }, - data: function(node) { - return node.arguments.length < 2 && node.arguments[0] && node.arguments[0].type !== 'ObjectExpression'; + data(node) { + return ( + node.arguments.length < 2 && + node.arguments[0] && + node.arguments[0].type !== 'ObjectExpression' + ); }, - html: function(node) { + html(node) { return node.arguments.length === 0; }, - prop: function(node) { - return node.arguments.length < 2 && node.arguments[0] && node.arguments[0].type !== 'ObjectExpression'; + prop(node) { + return ( + node.arguments.length < 2 && + node.arguments[0] && + node.arguments[0].type !== 'ObjectExpression' + ); }, }; -var JQUERY_IDENTIFIER_REGEX = /^\$./; +const JQUERY_IDENTIFIER_REGEX = /^\$./; module.exports = { meta: { docs: {}, }, - create: function(context) { + create(context) { function getFinalReferenceName(node) { switch (node.type) { - case 'Identifier': return node.name; - case 'Literal': return node.value; - case 'MemberExpression': return getFinalReferenceName(node.property); - default: return null; + case 'Identifier': + return node.name; + case 'Literal': + return node.value; + case 'MemberExpression': + return getFinalReferenceName(node.property); + default: + return null; } } @@ -61,7 +77,10 @@ module.exports = { } function isjQueryCallExpression(node) { - return isCallExpression(node) && JQUERY_IDENTIFIERS.indexOf(node.callee.name) >= 0; + return ( + isCallExpression(node) && + JQUERY_IDENTIFIERS.indexOf(node.callee.name) >= 0 + ); } function isCallExpression(node) { @@ -69,14 +88,21 @@ module.exports = { } function isjQueryTerminatedMemberExpression(node) { - return node.type === 'MemberExpression' && ( - (node.computed && node.property.type === 'Literal' && isjQueryReference(node.property)) || - (!node.computed && isjQueryReference(node.property)) + return ( + node.type === 'MemberExpression' && + ((node.computed && + node.property.type === 'Literal' && + isjQueryReference(node.property)) || + (!node.computed && isjQueryReference(node.property))) ); } function isMemberExpressionWithComputedNonLiteralProperty(node) { - return node.type === 'MemberExpression' && node.computed && node.property.type !== 'Literal'; + return ( + node.type === 'MemberExpression' && + node.computed && + node.property.type !== 'Literal' + ); } function isjQueryStartValue(node) { @@ -95,45 +121,53 @@ module.exports = { } function isjQueryValue(node) { - var relevantNode = node; - var validChain = true; - - while (relevantNode.callee && relevantNode.callee.type === 'MemberExpression') { - var prop = relevantNode.callee.property.name; - - var checkDescriptor = Object.getOwnPropertyDescriptor(nonChainingMethods, prop); - var check = checkDescriptor && checkDescriptor.value; - if (check === true || (typeof check === 'function' && check(relevantNode))) { + let relevantNode = node; + let validChain = true; + + while ( + relevantNode.callee && + relevantNode.callee.type === 'MemberExpression' + ) { + const prop = relevantNode.callee.property.name; + + const checkDescriptor = Object.getOwnPropertyDescriptor( + nonChainingMethods, + prop + ); + const check = checkDescriptor && checkDescriptor.value; + if ( + check === true || + (typeof check === 'function' && check(relevantNode)) + ) { validChain = false; } relevantNode = relevantNode.callee.object; } - var isjQueryStart = isjQueryStartValue(relevantNode); - var definiteNo = isjQueryStart && !validChain; - var definiteYes = isjQueryStart && validChain; + const isjQueryStart = isjQueryStartValue(relevantNode); + const definiteNo = isjQueryStart && !validChain; + const definiteYes = isjQueryStart && validChain; return { definite: definiteYes, - possible: definiteYes || ( - !definiteNo && ( - isLooseUndefined(node) || - (isjQueryStart && node.type === 'Identifier') || - isCallExpression(node) || - isMemberExpressionWithComputedNonLiteralProperty(node) - ) - ), + possible: + definiteYes || + (!definiteNo && + (isLooseUndefined(node) || + (isjQueryStart && node.type === 'Identifier') || + isCallExpression(node) || + isMemberExpressionWithComputedNonLiteralProperty(node))), }; } function getValueNodes(node) { - var results = []; + const results = []; if (node.type === 'LogicalExpression') { - results.push.apply(results, getValueNodes(node.left)); - results.push.apply(results, getValueNodes(node.right)); + results.push(...getValueNodes(node.left)); + results.push(...getValueNodes(node.right)); } else if (node.type === 'ConditionalExpression') { - results.push.apply(results, getValueNodes(node.consequent)); - results.push.apply(results, getValueNodes(node.alternate)); + results.push(...getValueNodes(node.consequent)); + results.push(...getValueNodes(node.alternate)); } else { results.push(node); } @@ -141,26 +175,33 @@ module.exports = { } function checkForValidjQueryReference(node, left, right) { - if (right == null) { return; } - if (right.type === 'AwaitExpression') { return; } - var isjQueryRef = isjQueryReference(left); - var valueNodeTypes = getValueNodes(right).map(isjQueryValue); - var hasDefinitejQueryValue = valueNodeTypes.some(function(nodeType) { + if (right == null) { + return; + } + if (right.type === 'AwaitExpression') { + return; + } + const isjQueryRef = isjQueryReference(left); + const valueNodeTypes = getValueNodes(right).map(isjQueryValue); + const hasDefinitejQueryValue = valueNodeTypes.some(nodeType => { return nodeType.definite; }); - var hasRegularValue = valueNodeTypes.some(function(nodeType) { + const hasRegularValue = valueNodeTypes.some(nodeType => { return !nodeType.possible; }); if (isjQueryRef && hasRegularValue) { - context.report(node, 'Don’t use a $-prefixed identifier for a non-jQuery value.'); + context.report( + node, + 'Don’t use a $-prefixed identifier for a non-jQuery value.' + ); } else if (!isjQueryRef && hasDefinitejQueryValue) { context.report(node, 'Use a $-prefixed identifier for a jQuery value.'); } } function getFinalAssignmentValue(node) { - var currentNode = node; + let currentNode = node; while (currentNode && currentNode.type === 'AssignmentExpression') { currentNode = currentNode.right; @@ -170,7 +211,11 @@ module.exports = { } function checkVariableDeclarator(node) { - checkForValidjQueryReference(node, node.id, getFinalAssignmentValue(node.init)); + checkForValidjQueryReference( + node, + node.id, + getFinalAssignmentValue(node.init) + ); } function checkAssignmentExpression(node) { @@ -178,11 +223,15 @@ module.exports = { return; } - checkForValidjQueryReference(node, node.left, getFinalAssignmentValue(node.right)); + checkForValidjQueryReference( + node, + node.left, + getFinalAssignmentValue(node.right) + ); } function checkObjectExpression(node) { - node.properties.forEach(function(prop) { + node.properties.forEach(prop => { if (prop.computed && prop.key.type !== 'Literal') { return; } @@ -192,13 +241,17 @@ module.exports = { } function checkClassProperty(node) { - var tokens = context.getFirstTokens(node, 2).filter(function(token) { + const tokens = context.getFirstTokens(node, 2).filter(token => { return token.type === 'Identifier'; }); - var id = tokens[tokens.length - 1]; - var fakeIdentifier = Object.create(id, { - name: {get: function() { return this.value; }}, + const id = tokens[tokens.length - 1]; + const fakeIdentifier = Object.create(id, { + name: { + get() { + return this.value; + }, + }, }); checkForValidjQueryReference(node, fakeIdentifier, node.value); diff --git a/lib/rules/no-fully-static-classes.js b/lib/rules/no-fully-static-classes.js index aee9d100..5ae8ffda 100644 --- a/lib/rules/no-fully-static-classes.js +++ b/lib/rules/no-fully-static-classes.js @@ -3,17 +3,25 @@ module.exports = { docs: {}, }, - create: function(context) { + create(context) { function isStaticMember(node) { - return (node.type === 'MethodDefinition' || node.type === 'ClassProperty') && node.static; + return ( + (node.type === 'MethodDefinition' || node.type === 'ClassProperty') && + node.static + ); } function checkClass(node) { - var members = node.body.body; - if (node.superClass == null && members.length && members.every(isStaticMember)) { + const members = node.body.body; + if ( + node.superClass == null && + members.length && + members.every(isStaticMember) + ) { context.report({ - node: node, - message: 'Classes declaring only static members should be objects or named exports instead.', + node, + message: + 'Classes declaring only static members should be objects or named exports instead.', }); } } diff --git a/lib/rules/no-useless-computed-properties.js b/lib/rules/no-useless-computed-properties.js index c472eab6..9b1b1235 100644 --- a/lib/rules/no-useless-computed-properties.js +++ b/lib/rules/no-useless-computed-properties.js @@ -3,15 +3,15 @@ module.exports = { docs: {}, }, - create: function(context) { + create(context) { function hasLiteralComputedKey(prop) { - return prop.computed && (prop.key.type === 'Literal'); + return prop.computed && prop.key.type === 'Literal'; } function checkProperty(node) { if (hasLiteralComputedKey(node)) { context.report({ - node: node, + node, message: 'Computed property is using a literal key unnecessarily.', }); } diff --git a/lib/rules/prefer-class-properties.js b/lib/rules/prefer-class-properties.js index a9eb043c..be3d8dde 100644 --- a/lib/rules/prefer-class-properties.js +++ b/lib/rules/prefer-class-properties.js @@ -1,24 +1,30 @@ module.exports = { meta: { docs: {}, - schema: [{ - enum: ['always', 'never'], - }], + schema: [ + { + enum: ['always', 'never'], + }, + ], }, - create: function(context) { - var applyAlways = ((context.options[0] || 'always') === 'always'); + create(context) { + const applyAlways = (context.options[0] || 'always') === 'always'; function isSimpleLiteralProperty(prop) { return !prop.computed && isSimpleLiteral(prop.value); } function isSimpleLiteral(node) { - return node.type === 'Literal' || - ((node.type === 'MemberExpression') && isSimpleLiteral(node.object)) || - ((node.type === 'CallExpression') && isSimpleLiteral(node.callee)) || - (node.type === 'ArrayExpression' && node.elements.every(isSimpleLiteral)) || - (node.type === 'ObjectExpression' && node.properties.every(isSimpleLiteralProperty)); + return ( + node.type === 'Literal' || + (node.type === 'MemberExpression' && isSimpleLiteral(node.object)) || + (node.type === 'CallExpression' && isSimpleLiteral(node.callee)) || + (node.type === 'ArrayExpression' && + node.elements.every(isSimpleLiteral)) || + (node.type === 'ObjectExpression' && + node.properties.every(isSimpleLiteralProperty)) + ); } function isStaticMemberExpression(node) { @@ -26,7 +32,7 @@ module.exports = { if (node.computed && node.property.type !== 'Literal') { return false; } - + // eslint-disable-next-line no-param-reassign node = node.object; } @@ -36,53 +42,54 @@ module.exports = { function checkConstructorThisAssignment(node) { if (isSimpleLiteral(node.right) && isStaticMemberExpression(node.left)) { context.report({ - node: node, + node, message: 'Unexpected assignment of literal instance member.', }); } } function getTopLevelThisAssignmentExpressions(functionNode) { - return functionNode - .body - .body - .filter(function(bodyNode) { - return bodyNode.type === 'ExpressionStatement' && + return functionNode.body.body + .filter(bodyNode => { + return ( + bodyNode.type === 'ExpressionStatement' && bodyNode.expression.type === 'AssignmentExpression' && bodyNode.expression.left.type === 'MemberExpression' && - bodyNode.expression.left.object.type === 'ThisExpression'; + bodyNode.expression.left.object.type === 'ThisExpression' + ); }) - .map(function(bodyNode) { + .map(bodyNode => { return bodyNode.expression; }); } function getConstructor(classNode) { - return classNode - .body - .body - .find(function(propertyNode) { - return propertyNode.type === 'MethodDefinition' && propertyNode.key.name === 'constructor'; - }); + return classNode.body.body.find(propertyNode => { + return ( + propertyNode.type === 'MethodDefinition' && + propertyNode.key.name === 'constructor' + ); + }); } function getClassInstanceProperties(classNode) { - return classNode - .body - .body - .filter(function(propertyNode) { - return propertyNode.type === 'ClassProperty' && !propertyNode.static; - }); + return classNode.body.body.filter(propertyNode => { + return propertyNode.type === 'ClassProperty' && !propertyNode.static; + }); } function checkClassDeclaration(node) { if (applyAlways) { - var constructor = getConstructor(node); - if (!constructor) { return; } + const constructor = getConstructor(node); + if (!constructor) { + return; + } - getTopLevelThisAssignmentExpressions(constructor.value).forEach(checkConstructorThisAssignment); + getTopLevelThisAssignmentExpressions(constructor.value).forEach( + checkConstructorThisAssignment + ); } else { - getClassInstanceProperties(node).forEach(function(propertyNode) { + getClassInstanceProperties(node).forEach(propertyNode => { context.report({ node: propertyNode, message: 'Unexpected class property.', diff --git a/lib/rules/prefer-early-return.js b/lib/rules/prefer-early-return.js index 658e8200..7ff9ab83 100644 --- a/lib/rules/prefer-early-return.js +++ b/lib/rules/prefer-early-return.js @@ -1,22 +1,26 @@ -var defaultMaximumStatements = 1; +const defaultMaximumStatements = 1; module.exports = { meta: { docs: {}, - schema: [{ - type: 'object', - properties: { - maximumStatements: { - type: 'integer', + schema: [ + { + type: 'object', + properties: { + maximumStatements: { + type: 'integer', + }, }, + additionalProperties: false, }, - additionalProperties: false, - }], + ], }, - create: function(context) { - var options = context.options[0] || {maximumStatements: defaultMaximumStatements}; - var maxStatements = options.maximumStatements; + create(context) { + const options = context.options[0] || { + maximumStatements: defaultMaximumStatements, + }; + const maxStatements = options.maximumStatements; function isLonelyIfStatement(statement) { return statement.type === 'IfStatement' && statement.alternate == null; @@ -25,18 +29,20 @@ module.exports = { function isOffendingConsequent(consequent) { return ( (consequent.type === 'ExpressionStatement' && maxStatements === 0) || - (consequent.type === 'BlockStatement' && consequent.body.length > maxStatements) + (consequent.type === 'BlockStatement' && + consequent.body.length > maxStatements) ); } function isOffendingIfStatement(statement) { return ( - isLonelyIfStatement(statement) && isOffendingConsequent(statement.consequent) + isLonelyIfStatement(statement) && + isOffendingConsequent(statement.consequent) ); } function hasSimplifiableConditionalBody(functionBody) { - var body = functionBody.body; + const body = functionBody.body; return ( functionBody.type === 'BlockStatement' && body.length === 1 && @@ -45,10 +51,13 @@ module.exports = { } function checkFunctionBody(functionNode) { - var body = functionNode.body; + const body = functionNode.body; if (hasSimplifiableConditionalBody(body)) { - context.report(body, 'Prefer an early return to a conditionally-wrapped function body'); + context.report( + body, + 'Prefer an early return to a conditionally-wrapped function body' + ); } } diff --git a/lib/rules/prefer-twine.js b/lib/rules/prefer-twine.js index e7853373..b7e69b64 100644 --- a/lib/rules/prefer-twine.js +++ b/lib/rules/prefer-twine.js @@ -3,14 +3,21 @@ module.exports = { docs: {}, }, - create: function(context) { + create(context) { return { - ImportDeclaration: function(node) { - if (node.source.value !== 'twine') { return; } - node.specifiers.forEach(function(specifier) { - if (specifier.type !== 'ImportDefaultSpecifier') { return; } + ImportDeclaration(node) { + if (node.source.value !== 'twine') { + return; + } + node.specifiers.forEach(specifier => { + if (specifier.type !== 'ImportDefaultSpecifier') { + return; + } if (specifier.local.name !== 'Twine') { - context.report(node, 'You should use "Twine" as the reference name when importing twine.'); + context.report( + node, + 'You should use "Twine" as the reference name when importing twine.' + ); } }); }, diff --git a/lib/rules/restrict-full-import.js b/lib/rules/restrict-full-import.js index 7882d325..626746b2 100644 --- a/lib/rules/restrict-full-import.js +++ b/lib/rules/restrict-full-import.js @@ -1,50 +1,60 @@ module.exports = { meta: { docs: {}, - schema: [{ - restricted: { - type: 'array', - items: { - type: 'string', + schema: [ + { + restricted: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, }, - uniqueItems: true, }, - }], + ], }, - create: function(context) { - var restricted = context.options[0] || []; + create(context) { + const restricted = context.options[0] || []; function isRestrictedModule(mod) { return restricted.indexOf(mod) >= 0; } + /* eslint-disable prettier/prettier */ + // https://github.com/prettier/eslint-plugin-prettier/issues/65 function isPotentiallyProblematicLeft(left) { return left.type === 'Identifier' || - ( - left.type === 'ObjectPattern' && left.properties.some(function(prop) { - return prop.type === 'SpreadProperty' || prop.type === 'ExperimentalRestProperty'; - }) - ) || - ( - left.type === 'ArrayPattern' && left.elements.some(function(element) { - return element.type === 'RestElement'; - }) - ); + ( + left.type === 'ObjectPattern' && left.properties.some((prop) => { + return prop.type === 'SpreadProperty' || prop.type === 'ExperimentalRestProperty'; + }) + ) || + ( + left.type === 'ArrayPattern' && left.elements.some((element) => { + return element.type === 'RestElement'; + }) + ); } + /* eslint-enable prettier/prettier*/ function isPotentiallyProblematicRight(right) { - return right && + return ( + right && right.type === 'CallExpression' && right.callee.type === 'Identifier' && right.callee.name === 'require' && - isRestrictedModule(right.arguments[0].value); + isRestrictedModule(right.arguments[0].value) + ); } function isFullImportSpecifier(specifier) { - return specifier.type === 'ImportDefaultSpecifier' || + return ( + specifier.type === 'ImportDefaultSpecifier' || specifier.type === 'ImportNamespaceSpecifier' || - (specifier.type === 'ImportSpecifier' && specifier.imported.name === 'default'); + (specifier.type === 'ImportSpecifier' && + specifier.imported.name === 'default') + ); } function hasFullImport(specifiers) { @@ -52,15 +62,16 @@ module.exports = { } function checkImportDeclaration(node) { - var specifiers = node.specifiers; + const specifiers = node.specifiers; - if ( - isRestrictedModule(node.source.value) && - hasFullImport(specifiers) - ) { + if (isRestrictedModule(node.source.value) && hasFullImport(specifiers)) { context.report({ - node: specifiers.length > 1 ? specifiers.find(isFullImportSpecifier) : node, - message: 'Unexpected full import of restricted module \'' + node.source.value + '\'.', + node: + specifiers.length > 1 + ? specifiers.find(isFullImportSpecifier) + : node, + message: `Unexpected full import of restricted module '${node.source + .value}'.`, }); } } @@ -71,8 +82,9 @@ module.exports = { isPotentiallyProblematicRight(right) ) { context.report({ - node: node, - message: 'Unexpected full import of restricted module \'' + right.arguments[0].value + '\'.', + node, + message: `Unexpected full import of restricted module '${right + .arguments[0].value}'.`, }); } } @@ -90,6 +102,5 @@ module.exports = { VariableDeclarator: checkVariableDeclarator, AssignmentExpression: checkAssignmentExpression, }; - }, }; diff --git a/lib/rules/sinon-no-restricted-features.js b/lib/rules/sinon-no-restricted-features.js index dbe30b59..004c3d68 100644 --- a/lib/rules/sinon-no-restricted-features.js +++ b/lib/rules/sinon-no-restricted-features.js @@ -1,60 +1,66 @@ function createSinonMatcher(aliases, injected) { return function(object) { - return (injected && object.type === 'ThisExpression') || - (object.type === 'Identifier' && aliases.indexOf(object.name) >= 0); + return ( + (injected && object.type === 'ThisExpression') || + (object.type === 'Identifier' && aliases.indexOf(object.name) >= 0) + ); }; } function createPropertyMatcher(properties) { return function(property) { - return property.type === 'Identifier' && properties.indexOf(property.name) >= 0; + return ( + property.type === 'Identifier' && properties.indexOf(property.name) >= 0 + ); }; } module.exports = { meta: { docs: {}, - schema: [{ - type: 'object', - properties: { - restricted: { - type: 'array', - items: { - type: 'string', + schema: [ + { + type: 'object', + properties: { + restricted: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, }, - uniqueItems: true, - }, - aliases: { - type: 'array', - items: { - type: 'string', + aliases: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, }, - uniqueItems: true, - }, - injected: { - type: 'boolean', + injected: { + type: 'boolean', + }, }, + additionalProperties: false, }, - additionalProperties: false, - }], + ], }, - create: function(context) { - var options = context.options[0] || {}; - var restricted = options.restricted || []; - var aliases = options.aliases || ['sinon']; - var injected = options.injected || false; + create(context) { + const options = context.options[0] || {}; + const restricted = options.restricted || []; + const aliases = options.aliases || ['sinon']; + const injected = options.injected || false; - var sinonMatcher = createSinonMatcher(aliases, injected); - var propertyMatcher = createPropertyMatcher(restricted); + const sinonMatcher = createSinonMatcher(aliases, injected); + const propertyMatcher = createPropertyMatcher(restricted); function checkMemberExpression(node) { if (sinonMatcher(node.object) && propertyMatcher(node.property)) { context.report({ - node: node, - message: 'Unexpected use of sinon.' + node.property.name + '.', + node, + message: `Unexpected use of sinon.${node.property.name}.`, }); } } diff --git a/lib/rules/sinon-prefer-meaningful-assertions.js b/lib/rules/sinon-prefer-meaningful-assertions.js index ab48aa23..9e1f14c3 100644 --- a/lib/rules/sinon-prefer-meaningful-assertions.js +++ b/lib/rules/sinon-prefer-meaningful-assertions.js @@ -1,5 +1,5 @@ // see http://sinonjs.org/docs/#assertions -var SINON_ASSERT = [ +const SINON_ASSERT = [ 'alwaysCalledOn', 'alwaysCalledWith', 'alwaysCalledWithExactly', @@ -22,7 +22,7 @@ var SINON_ASSERT = [ ]; // see https://github.com/domenic/sinon-chai -var SINON_CHAI = [ +const SINON_CHAI = [ 'alwaysCalledOn', 'alwaysCalledWith', 'alwaysCalledWithExactly', @@ -47,17 +47,24 @@ var SINON_CHAI = [ 'threw', ]; -var PREFER_SINON_CHAI_MESSAGE = 'Use the more meaningful sinon-chai assertions.'; -var PREFER_SINON_ASSERT_MESSAGE = 'Use the more meaningful sinon.assert assertions.'; +const PREFER_SINON_CHAI_MESSAGE = + 'Use the more meaningful sinon-chai assertions.'; +const PREFER_SINON_ASSERT_MESSAGE = + 'Use the more meaningful sinon.assert assertions.'; module.exports = { meta: { docs: {}, }, - create: function(context) { + create(context) { function getNearestFullExpression(node) { - while (node.parent && (node.parent.type === 'MemberExpression' || node.parent.type === 'CallExpression')) { + while ( + node.parent && + (node.parent.type === 'MemberExpression' || + node.parent.type === 'CallExpression') + ) { + // eslint-disable-next-line no-param-reassign node = node.parent; } @@ -65,35 +72,48 @@ module.exports = { } function isAssertExpression(node) { - return node.type === 'MemberExpression' && - node.object.name === 'assert'; + return node.type === 'MemberExpression' && node.object.name === 'assert'; } function isRewritableSinonExpression(node, methods) { - if (!node) { return false; } - return (node.type === 'MemberExpression' && methods.indexOf(node.property.name) >= 0) || - (node.type === 'CallExpression' && isRewritableSinonExpression(node.callee, methods)); + if (!node) { + return false; + } + return ( + (node.type === 'MemberExpression' && + methods.indexOf(node.property.name) >= 0) || + (node.type === 'CallExpression' && + isRewritableSinonExpression(node.callee, methods)) + ); } + /* eslint-disable prettier/prettier */ + // https://github.com/prettier/eslint-plugin-prettier/issues/65 function isInvalidAssertCallExpression(node) { - return isAssertExpression(node.callee) && node.arguments.some(function(arg) { + return isAssertExpression(node.callee) && node.arguments.some((arg) => { return isRewritableSinonExpression(arg, SINON_ASSERT); }); } + /* eslint-enable prettier/prettier*/ function isInvalidShouldExpression(node) { - return node.property.name === 'should' && isRewritableSinonExpression(node.object, SINON_CHAI); + return ( + node.property.name === 'should' && + isRewritableSinonExpression(node.object, SINON_CHAI) + ); } function isInvalidExpectCallExpression(node) { - return node.callee.name === 'expect' && - isRewritableSinonExpression(node.arguments[0], SINON_CHAI); + return ( + node.callee.name === 'expect' && + isRewritableSinonExpression(node.arguments[0], SINON_CHAI) + ); } function handleCallExpression(node) { if (isInvalidAssertCallExpression(node)) { context.report({ - node: node, + node, message: PREFER_SINON_ASSERT_MESSAGE, }); } diff --git a/package.json b/package.json index fba5284b..a49c3c69 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "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", + "prettier-check": "eslint --print-config ./lib/config/prettier.js | eslint-config-prettier-check", "test": "NODE_PATH=$NODE_PATH:./transforms:./tests mocha 'tests/**/*.js' --reporter spec --compilers js:babel-core/register", "test:watch": "yarn test -- --watch --reporter min", "test:cover": "babel-node node_modules/.bin/isparta cover --report text --report html _mocha -- --reporter spec --recursive tests/" @@ -36,7 +37,8 @@ "eslintConfig": { "extends": [ "plugin:shopify/es5", - "plugin:shopify/node" + "plugin:shopify/node", + "plugin:shopify/prettier" ] }, "devDependencies": { @@ -49,14 +51,19 @@ "isparta": "^4.0.0", "istanbul": "^0.4.5", "mocha": "^3.4.2", + "prettier": "^1.7.2", "react": "^15.6.1", "react-dom": "^15.6.1" }, "peerDependencies": { "eslint": "<5 >=4.7.1" }, + "optionalDependencies": { + "prettier": "<2.0 >= 1.7.2" + }, "dependencies": { "babel-eslint": "^8.0.0", + "eslint-config-prettier": "^2.6.0", "eslint-plugin-ava": "^4.2.1", "eslint-plugin-babel": "^4.1.2", "eslint-plugin-chai-expect": "^1.1.1", @@ -66,6 +73,7 @@ "eslint-plugin-lodash": "^2.4.4", "eslint-plugin-mocha": "^4.11.0", "eslint-plugin-node": "^5.1.1", + "eslint-plugin-prettier": "^2.3.1", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-react": "^7.3.0", "eslint-plugin-sort-class-members": "^1.2.0", diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js index a91c72eb..bb84513b 100644 --- a/tests/.eslintrc.js +++ b/tests/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: 'plugin:shopify/esnext', + extends: 'plugin:shopify/prettier', rules: { 'import/no-extraneous-dependencies': 'off', }, diff --git a/tests/lib/rules/binary-assignment-parens.js b/tests/lib/rules/binary-assignment-parens.js index 5c8640be..6295bbc5 100644 --- a/tests/lib/rules/binary-assignment-parens.js +++ b/tests/lib/rules/binary-assignment-parens.js @@ -6,8 +6,8 @@ const ruleTester = new RuleTester(); const NON_BOOLEAN_OPERATORS = ['-', '+', '*', '/', '||', '&&']; const BOOLEAN_OPERATORS = ['==', '===', '!=', '!==', '>', '>=', '<', '<=']; -const validNonBooleanExamples = [].concat(...NON_BOOLEAN_OPERATORS.map((operator) => ( - [ +const validNonBooleanExamples = [].concat( + ...NON_BOOLEAN_OPERATORS.map(operator => [ {code: `var foo = 'bar' ${operator} 'baz';`}, {code: `var foo = 'bar' ${operator} 'baz';`, options: ['never']}, {code: `var foo = ('bar' ${operator} 'baz');`}, @@ -16,19 +16,19 @@ const validNonBooleanExamples = [].concat(...NON_BOOLEAN_OPERATORS.map((operator {code: `var foo = ( 'bar' ${operator} 'baz' );`, options: ['never']}, {code: `var foo; foo = 'bar' ${operator} 'baz';`}, {code: `var foo; foo = ('bar' ${operator} 'baz');`, options: ['never']}, - ] -))); + ]) +); -const validBooleanExamples = [].concat(...BOOLEAN_OPERATORS.map((operator) => ( - [ +const validBooleanExamples = [].concat( + ...BOOLEAN_OPERATORS.map(operator => [ {code: `var foo = ('bar' ${operator} 'baz')`}, {code: `var foo = ( 'bar' ${operator} 'baz' )`}, {code: `var foo = 'bar' ${operator} 'baz'`, options: ['never']}, {code: `var foo; foo = ('bar' ${operator} 'baz')`}, {code: `var foo; foo = ( 'bar' ${operator} 'baz' )`}, {code: `var foo; foo = 'bar' ${operator} 'baz'`, options: ['never']}, - ] -))); + ]) +); const validLogicalExamples = [ {code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz');"}, @@ -39,76 +39,118 @@ const validLogicalExamples = [ {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz');"}, {code: "var foo; foo = ( 'bar' !== 'bar' ) || ( 'baz' === 'baz' );"}, {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && qux;"}, - {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);"}, + { + code: + "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);", + }, {code: "var foo; foo = ('bar' !== 'bar') || qux;"}, {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", options: ['never']}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", options: ['never']}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", options: ['never']}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", options: ['never']}, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", + options: ['never'], + }, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", + options: ['never'], + }, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", + options: ['never'], + }, {code: "var foo = 'bar' !== 'bar' || qux;", options: ['never']}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz';", options: ['never']}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' ;", options: ['never']}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", options: ['never']}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", options: ['never']}, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz';", + options: ['never'], + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' ;", + options: ['never'], + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", + options: ['never'], + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", + options: ['never'], + }, {code: "var foo; foo = 'bar' !== 'bar' || qux;", options: ['never']}, ]; -const invalidBooleanExamples = [].concat(...BOOLEAN_OPERATORS.map((operator) => ( - [ +const invalidBooleanExamples = [].concat( + ...BOOLEAN_OPERATORS.map(operator => [ { code: `var foo = 'bar' ${operator} 'baz'`, - errors: [{ - message: 'You must include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, { code: `var foo = ('bar' ${operator} 'baz')`, options: ['never'], - errors: [{ - message: 'You must not include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must not include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, { code: `var foo = ( 'bar' ${operator} 'baz' )`, options: ['never'], - errors: [{ - message: 'You must not include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must not include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, { code: `var foo; foo = 'bar' ${operator} 'baz'`, - errors: [{ - message: 'You must include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, { code: `var foo; foo = ('bar' ${operator} 'baz')`, options: ['never'], - errors: [{ - message: 'You must not include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must not include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, { code: `var foo; foo = ( 'bar' ${operator} 'baz' )`, options: ['never'], - errors: [{ - message: 'You must not include parentheses around a binary assignment expression.', - type: 'BinaryExpression', - }], + errors: [ + { + message: + 'You must not include parentheses around a binary assignment expression.', + type: 'BinaryExpression', + }, + ], }, - ] -))); + ]) +); function errors(count, needsParens) { const err = []; @@ -127,31 +169,99 @@ function errors(count, needsParens) { } const invalidLogicalExamples = [ - {code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz');", options: ['never'], errors: errors(2, false)}, - {code: "var foo = ( 'bar' !== 'bar' ) || ( 'baz' === 'baz' );", options: ['never'], errors: errors(2, false)}, - {code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz') && qux;", options: ['never'], errors: errors(2, false)}, - {code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);", options: ['never'], errors: errors(3, false)}, - {code: "var foo = ('bar' !== 'bar') || qux;", options: ['never'], errors: errors(1, false)}, - {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz');", options: ['never'], errors: errors(2, false)}, - {code: "var foo; foo = ( 'bar' !== 'bar' ) || ( 'baz' === 'baz' );", options: ['never'], errors: errors(2, false)}, - {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && qux;", options: ['never'], errors: errors(2, false)}, - {code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);", options: ['never'], errors: errors(3, false)}, - {code: "var foo; foo = ('bar' !== 'bar') || qux;", options: ['never'], errors: errors(1, false)}, - - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", errors: errors(2, true)}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", errors: errors(2, true)}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", errors: errors(2, true)}, - {code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", errors: errors(3, true)}, + { + code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz');", + options: ['never'], + errors: errors(2, false), + }, + { + code: "var foo = ( 'bar' !== 'bar' ) || ( 'baz' === 'baz' );", + options: ['never'], + errors: errors(2, false), + }, + { + code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz') && qux;", + options: ['never'], + errors: errors(2, false), + }, + { + code: "var foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);", + options: ['never'], + errors: errors(3, false), + }, + { + code: "var foo = ('bar' !== 'bar') || qux;", + options: ['never'], + errors: errors(1, false), + }, + { + code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz');", + options: ['never'], + errors: errors(2, false), + }, + { + code: "var foo; foo = ( 'bar' !== 'bar' ) || ( 'baz' === 'baz' );", + options: ['never'], + errors: errors(2, false), + }, + { + code: "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && qux;", + options: ['never'], + errors: errors(2, false), + }, + { + code: + "var foo; foo = ('bar' !== 'bar') || ('baz' === 'baz') && (qux <= 2);", + options: ['never'], + errors: errors(3, false), + }, + { + code: "var foo; foo = ('bar' !== 'bar') || qux;", + options: ['never'], + errors: errors(1, false), + }, + + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", + errors: errors(2, true), + }, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz';", + errors: errors(2, true), + }, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", + errors: errors(2, true), + }, + { + code: "var foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", + errors: errors(3, true), + }, {code: "var foo = 'bar' !== 'bar' || qux;", errors: errors(1, true)}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz';", errors: errors(2, true)}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' ;", errors: errors(2, true)}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", errors: errors(2, true)}, - {code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", errors: errors(3, true)}, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz';", + errors: errors(2, true), + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' ;", + errors: errors(2, true), + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux;", + errors: errors(2, true), + }, + { + code: "var foo; foo = 'bar' !== 'bar' || 'baz' === 'baz' && qux <= 2;", + errors: errors(3, true), + }, {code: "var foo; foo = 'bar' !== 'bar' || qux;", errors: errors(1, true)}, ]; ruleTester.run('binary-assignment-parens', rule, { - - valid: [].concat(validNonBooleanExamples, validBooleanExamples, validLogicalExamples), + valid: [].concat( + validNonBooleanExamples, + validBooleanExamples, + validLogicalExamples + ), invalid: [].concat(invalidBooleanExamples, invalidLogicalExamples), }); diff --git a/tests/lib/rules/class-property-semi.js b/tests/lib/rules/class-property-semi.js index 672b294c..4207cf6a 100644 --- a/tests/lib/rules/class-property-semi.js +++ b/tests/lib/rules/class-property-semi.js @@ -17,7 +17,11 @@ ruleTester.run('class-property-semi', rule, { {code: classPropWithSemi, parser: 'babel-eslint', options: ['always']}, {code: classPropNoSemi, parser: 'babel-eslint', options: ['never']}, {code: classStaticPropWithSemi, parser: 'babel-eslint'}, - {code: classStaticPropWithSemi, parser: 'babel-eslint', options: ['always']}, + { + code: classStaticPropWithSemi, + parser: 'babel-eslint', + options: ['always'], + }, {code: classStaticPropNoSemi, parser: 'babel-eslint', options: ['never']}, {code: classMethod, parserOptions: {ecmaVersion: 6}}, ], @@ -25,54 +29,66 @@ ruleTester.run('class-property-semi', rule, { { code: classPropNoSemi, parser: 'babel-eslint', - errors: [{ - message: 'Missing semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Missing semicolon.', + type: 'ClassProperty', + }, + ], }, { code: classPropNoSemi, parser: 'babel-eslint', options: ['always'], - errors: [{ - message: 'Missing semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Missing semicolon.', + type: 'ClassProperty', + }, + ], }, { code: classPropWithSemi, parser: 'babel-eslint', options: ['never'], - errors: [{ - message: 'Extra semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Extra semicolon.', + type: 'ClassProperty', + }, + ], }, { code: classStaticPropNoSemi, parser: 'babel-eslint', - errors: [{ - message: 'Missing semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Missing semicolon.', + type: 'ClassProperty', + }, + ], }, { code: classStaticPropNoSemi, parser: 'babel-eslint', options: ['always'], - errors: [{ - message: 'Missing semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Missing semicolon.', + type: 'ClassProperty', + }, + ], }, { code: classStaticPropWithSemi, parser: 'babel-eslint', options: ['never'], - errors: [{ - message: 'Extra semicolon.', - type: 'ClassProperty', - }], + errors: [ + { + message: 'Extra semicolon.', + type: 'ClassProperty', + }, + ], }, ], }); diff --git a/tests/lib/rules/jquery-dollar-sign-reference.js b/tests/lib/rules/jquery-dollar-sign-reference.js index 7aa330ce..6cb4e400 100644 --- a/tests/lib/rules/jquery-dollar-sign-reference.js +++ b/tests/lib/rules/jquery-dollar-sign-reference.js @@ -11,7 +11,8 @@ function missingDollarError(otherAttrs) { } function unexpectedDollarError(otherAttrs) { - otherAttrs.message = 'Don’t use a $-prefixed identifier for a non-jQuery value.'; + otherAttrs.message = + 'Don’t use a $-prefixed identifier for a non-jQuery value.'; return otherAttrs; } @@ -235,14 +236,38 @@ ruleTester.run('jquery-dollar-sign-reference', rule, { {code: 'var foo = {["bar"]: "bar"}', parserOptions: {ecmaVersion: 2015}}, {code: 'var foo = {["$bar"]: $bar}', parserOptions: {ecmaVersion: 2015}}, - {code: 'async function foo() { const foo = await aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { const foo = await $aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { const $foo = await aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { const $foo = await $aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { const {foo} = await $aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { const {$foo} = await bar(); }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { $foo = await aPromise; }', parserOptions: {ecmaVersion: 2017}}, - {code: 'async function foo() { $foo = await bar(); }', parserOptions: {ecmaVersion: 2017}}, + { + code: 'async function foo() { const foo = await aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { const foo = await $aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { const $foo = await aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { const $foo = await $aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { const {foo} = await $aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { const {$foo} = await bar(); }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { $foo = await aPromise; }', + parserOptions: {ecmaVersion: 2017}, + }, + { + code: 'async function foo() { $foo = await bar(); }', + parserOptions: {ecmaVersion: 2017}, + }, ], invalid: [ { diff --git a/tests/lib/rules/no-fully-static-classes.js b/tests/lib/rules/no-fully-static-classes.js index b1ebdae8..ac5c8ae4 100644 --- a/tests/lib/rules/no-fully-static-classes.js +++ b/tests/lib/rules/no-fully-static-classes.js @@ -7,16 +7,27 @@ require('babel-eslint'); const parser = 'babel-eslint'; -function method(name = 'foo') { return `${name}() {}`; } -function staticMethod(name = 'bar') { return `static ${name}() {}`; } -function property(name = 'baz') { return `${name} = true;`; } -function staticProperty(name = 'qux') { return `static ${name} = true;`; } +function method(name = 'foo') { + return `${name}() {}`; +} +function staticMethod(name = 'bar') { + return `static ${name}() {}`; +} +function property(name = 'baz') { + return `${name} = true;`; +} +function staticProperty(name = 'qux') { + return `static ${name} = true;`; +} function errorWithType(type) { - return [{ - type, - message: 'Classes declaring only static members should be objects or named exports instead.', - }]; + return [ + { + type, + message: + 'Classes declaring only static members should be objects or named exports instead.', + }, + ]; } ruleTester.run('prefer-class-properties', rule, { diff --git a/tests/lib/rules/prefer-class-properties.js b/tests/lib/rules/prefer-class-properties.js index fd24dd00..4b756549 100644 --- a/tests/lib/rules/prefer-class-properties.js +++ b/tests/lib/rules/prefer-class-properties.js @@ -9,23 +9,47 @@ const parserOptions = { ecmaVersion: 6, }; -const classPropErrors = [{ - type: 'ClassProperty', - message: 'Unexpected class property.', -}]; +const classPropErrors = [ + { + type: 'ClassProperty', + message: 'Unexpected class property.', + }, +]; -const assignErrors = [{ - type: 'AssignmentExpression', - message: 'Unexpected assignment of literal instance member.', -}]; +const assignErrors = [ + { + type: 'AssignmentExpression', + message: 'Unexpected assignment of literal instance member.', + }, +]; ruleTester.run('prefer-class-properties', rule, { valid: [ - {code: 'class Foo { foo = "bar"; }', parser: 'babel-eslint', options: ['always']}, - {code: 'class Foo { foo = bar(); }', parser: 'babel-eslint', options: ['always']}, - {code: 'class Foo { foo = 123; }', parser: 'babel-eslint', options: ['always']}, - {code: 'class Foo { static foo = "bar"; }', parser: 'babel-eslint', options: ['never']}, - {code: 'class Foo { static foo = "bar"; }', parser: 'babel-eslint', options: ['always']}, + { + code: 'class Foo { foo = "bar"; }', + parser: 'babel-eslint', + options: ['always'], + }, + { + code: 'class Foo { foo = bar(); }', + parser: 'babel-eslint', + options: ['always'], + }, + { + code: 'class Foo { foo = 123; }', + parser: 'babel-eslint', + options: ['always'], + }, + { + code: 'class Foo { static foo = "bar"; }', + parser: 'babel-eslint', + options: ['never'], + }, + { + code: 'class Foo { static foo = "bar"; }', + parser: 'babel-eslint', + options: ['always'], + }, { code: `class Foo { constructor() { @@ -120,9 +144,24 @@ ruleTester.run('prefer-class-properties', rule, { }, ], invalid: [ - {code: 'class Foo { foo = "bar"; }', parser: 'babel-eslint', options: ['never'], errors: classPropErrors}, - {code: 'class Foo { foo = bar(); }', parser: 'babel-eslint', options: ['never'], errors: classPropErrors}, - {code: 'class Foo { foo = 123; }', parser: 'babel-eslint', options: ['never'], errors: classPropErrors}, + { + code: 'class Foo { foo = "bar"; }', + parser: 'babel-eslint', + options: ['never'], + errors: classPropErrors, + }, + { + code: 'class Foo { foo = bar(); }', + parser: 'babel-eslint', + options: ['never'], + errors: classPropErrors, + }, + { + code: 'class Foo { foo = 123; }', + parser: 'babel-eslint', + options: ['never'], + errors: classPropErrors, + }, { code: `class Foo { constructor() { diff --git a/tests/lib/rules/prefer-early-return.js b/tests/lib/rules/prefer-early-return.js index 340bb98b..ce0747ab 100644 --- a/tests/lib/rules/prefer-early-return.js +++ b/tests/lib/rules/prefer-early-return.js @@ -38,9 +38,7 @@ ruleTester.run('prefer-early-return', rule, { doSomethingElse(); } }`, - options: [ - {maximumStatements: 2}, - ], + options: [{maximumStatements: 2}], }, { code: `function foo() { @@ -114,9 +112,7 @@ ruleTester.run('prefer-early-return', rule, { doSomething(); } }`, - options: [ - {maximumStatements: 0}, - ], + options: [{maximumStatements: 0}], errors: [error], }, { diff --git a/tests/lib/rules/prefer-twine.js b/tests/lib/rules/prefer-twine.js index 68c4c3c6..879a1b33 100644 --- a/tests/lib/rules/prefer-twine.js +++ b/tests/lib/rules/prefer-twine.js @@ -3,10 +3,13 @@ const rule = require('../../../lib/rules/prefer-twine'); const ruleTester = new RuleTester(); const parserOptions = {ecmaVersion: 6, sourceType: 'module'}; -const errors = [{ - type: 'ImportDeclaration', - message: 'You should use "Twine" as the reference name when importing twine.', -}]; +const errors = [ + { + type: 'ImportDeclaration', + message: + 'You should use "Twine" as the reference name when importing twine.', + }, +]; ruleTester.run('prefer-twine', rule, { valid: [ diff --git a/tests/lib/rules/restrict-full-import.js b/tests/lib/rules/restrict-full-import.js index 9d0b3a8b..cb9b38ef 100644 --- a/tests/lib/rules/restrict-full-import.js +++ b/tests/lib/rules/restrict-full-import.js @@ -32,93 +32,113 @@ ruleTester.run('restrict-full-import', rule, { code: 'import * as _ from "lodash";', parserOptions, options, - errors: [{ - message, - type: 'ImportDeclaration', - }], + errors: [ + { + message, + type: 'ImportDeclaration', + }, + ], }, { code: 'import _ from "lodash";', parserOptions, options, - errors: [{ - message, - type: 'ImportDeclaration', - }], + errors: [ + { + message, + type: 'ImportDeclaration', + }, + ], }, { code: 'import _, {chain} from "lodash";', parserOptions, options, - errors: [{ - message, - type: 'ImportDefaultSpecifier', - }], + errors: [ + { + message, + type: 'ImportDefaultSpecifier', + }, + ], }, { code: 'import {default as _, chain} from "lodash";', parserOptions, options, - errors: [{ - message, - type: 'ImportSpecifier', - }], + errors: [ + { + message, + type: 'ImportSpecifier', + }, + ], }, { code: 'var _ = require("lodash");', parserOptions, options, - errors: [{ - message, - type: 'VariableDeclarator', - }], + errors: [ + { + message, + type: 'VariableDeclarator', + }, + ], }, { code: 'var _; _ = require("lodash");', parserOptions, options, - errors: [{ - message, - type: 'AssignmentExpression', - }], + errors: [ + { + message, + type: 'AssignmentExpression', + }, + ], }, { code: 'var {chain, ...rest} = require("lodash");', parserOptions, options, - errors: [{ - message, - type: 'VariableDeclarator', - }], + errors: [ + { + message, + type: 'VariableDeclarator', + }, + ], }, { code: 'var {chain, ...rest} = require("lodash");', parserOptions, options, parser: 'babel-eslint', - errors: [{ - message, - type: 'VariableDeclarator', - }], + errors: [ + { + message, + type: 'VariableDeclarator', + }, + ], }, { code: 'var [chain, ...rest] = require("lodash");', parserOptions, options, - errors: [{ - message, - type: 'VariableDeclarator', - }], + errors: [ + { + message, + type: 'VariableDeclarator', + }, + ], }, { code: 'var [chain, ...rest] = require("lodash");', parserOptions, options, parser: 'babel-eslint', - errors: [{ - message, - type: 'VariableDeclarator', - }], + errors: [ + { + message, + type: 'VariableDeclarator', + }, + ], }, ], }); diff --git a/tests/lib/rules/sinon-no-restricted-features.js b/tests/lib/rules/sinon-no-restricted-features.js index d089a2ab..86ad2087 100644 --- a/tests/lib/rules/sinon-no-restricted-features.js +++ b/tests/lib/rules/sinon-no-restricted-features.js @@ -12,10 +12,12 @@ const injectUnrestricted = 'this.stub();'; const restricted = ['mock']; const aliases = ['sandbox']; -const errors = [{ - message: `Unexpected use of sinon.${restricted[0]}.`, - type: 'MemberExpression', -}]; +const errors = [ + { + message: `Unexpected use of sinon.${restricted[0]}.`, + type: 'MemberExpression', + }, +]; ruleTester.run('sinon-no-restricted-features', rule, { valid: [ @@ -25,7 +27,10 @@ ruleTester.run('sinon-no-restricted-features', rule, { {code: aliasRestricted, options: [{restricted}]}, {code: aliasUnrestricted, options: [{restricted, aliases}]}, {code: injectRestricted, options: [{restricted, aliases}]}, - {code: injectUnrestricted, options: [{restricted, aliases, injected: true}]}, + { + code: injectUnrestricted, + options: [{restricted, aliases, injected: true}], + }, ], invalid: [ diff --git a/tests/lib/rules/sinon-prefer-meaningful-assertions.js b/tests/lib/rules/sinon-prefer-meaningful-assertions.js index 613a3b22..2f7d4487 100644 --- a/tests/lib/rules/sinon-prefer-meaningful-assertions.js +++ b/tests/lib/rules/sinon-prefer-meaningful-assertions.js @@ -7,10 +7,12 @@ function bddError(type) { return [{type, message: 'Use the more meaningful sinon-chai assertions.'}]; } -const tddError = [{ - message: 'Use the more meaningful sinon.assert assertions.', - type: 'CallExpression', -}]; +const tddError = [ + { + message: 'Use the more meaningful sinon.assert assertions.', + type: 'CallExpression', + }, +]; ruleTester.run('sinon-prefer-meaningful-assertions', rule, { valid: [ @@ -56,21 +58,60 @@ ruleTester.run('sinon-prefer-meaningful-assertions', rule, { ], invalid: [ - {code: 'expect(foo.called).to.be.true;', errors: bddError('MemberExpression')}, - {code: 'expect(foo.callCount).to.equal(3);', errors: bddError('CallExpression')}, - {code: 'expect(foo.alwaysCalledWithNew()).to.be.true;', errors: bddError('MemberExpression')}, - {code: 'expect(foo.bar.callCount).to.equal(3);', errors: bddError('CallExpression')}, - {code: 'expect(foo.bar.alwaysCalledWithNew()).to.be.true;', errors: bddError('MemberExpression')}, - {code: 'expect(foo.bar.baz().callCount).to.equal(3);', errors: bddError('CallExpression')}, - {code: 'expect(foo.bar.baz().alwaysCalledWithNew()).to.be.true;', errors: bddError('MemberExpression')}, + { + code: 'expect(foo.called).to.be.true;', + errors: bddError('MemberExpression'), + }, + { + code: 'expect(foo.callCount).to.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'expect(foo.alwaysCalledWithNew()).to.be.true;', + errors: bddError('MemberExpression'), + }, + { + code: 'expect(foo.bar.callCount).to.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'expect(foo.bar.alwaysCalledWithNew()).to.be.true;', + errors: bddError('MemberExpression'), + }, + { + code: 'expect(foo.bar.baz().callCount).to.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'expect(foo.bar.baz().alwaysCalledWithNew()).to.be.true;', + errors: bddError('MemberExpression'), + }, {code: 'foo.called.should.be.true;', errors: bddError('MemberExpression')}, - {code: 'foo.callCount.should.equal(3);', errors: bddError('CallExpression')}, - {code: 'foo.alwaysCalledWithNew().should.be.true;', errors: bddError('MemberExpression')}, - {code: 'foo.bar.callCount.should.equal(3);', errors: bddError('CallExpression')}, - {code: 'foo.bar.alwaysCalledWithNew().should.be.true;', errors: bddError('MemberExpression')}, - {code: 'foo.bar.baz().callCount.should.equal(3);', errors: bddError('CallExpression')}, - {code: 'foo.bar.baz().alwaysCalledWithNew().should.be.true;', errors: bddError('MemberExpression')}, + { + code: 'foo.callCount.should.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'foo.alwaysCalledWithNew().should.be.true;', + errors: bddError('MemberExpression'), + }, + { + code: 'foo.bar.callCount.should.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'foo.bar.alwaysCalledWithNew().should.be.true;', + errors: bddError('MemberExpression'), + }, + { + code: 'foo.bar.baz().callCount.should.equal(3);', + errors: bddError('CallExpression'), + }, + { + code: 'foo.bar.baz().alwaysCalledWithNew().should.be.true;', + errors: bddError('MemberExpression'), + }, {code: 'assert.true(foo.called);', errors: tddError}, {code: 'assert.equal(foo.callCount, 3);', errors: tddError}, diff --git a/yarn.lock b/yarn.lock index 91a93ad6..c6339792 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,11 @@ # yarn lockfile v1 -abbrev@1, abbrev@1.0.x: +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -17,23 +21,23 @@ acorn@^3.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" acorn@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" + version "5.1.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" +ajv-keywords@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" -ajv@^4.7.0, ajv@^4.9.1: +ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" +ajv@^5.2.0, ajv@^5.2.3: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.4.tgz#3daf9a8b67221299fdae8d82d117ed8e6c80244b" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" @@ -52,9 +56,9 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" ansi-regex@^2.0.0: version "2.1.1" @@ -86,8 +90,8 @@ anymatch@^1.3.0: normalize-path "^2.0.0" aproba@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" are-we-there-yet@~1.1.2: version "1.1.4" @@ -194,23 +198,23 @@ axobject-query@^0.1.0: ast-types-flow "0.0.7" babel-cli@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" - dependencies: - babel-core "^6.24.1" - babel-polyfill "^6.23.0" - babel-register "^6.24.1" - babel-runtime "^6.22.0" - commander "^2.8.1" - convert-source-map "^1.1.0" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" + dependencies: + babel-core "^6.26.0" + babel-polyfill "^6.26.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + commander "^2.11.0" + convert-source-map "^1.5.0" fs-readdir-recursive "^1.0.0" - glob "^7.0.0" - lodash "^4.2.0" - output-file-sync "^1.1.0" - path-is-absolute "^1.0.0" + glob "^7.1.2" + lodash "^4.17.4" + output-file-sync "^1.1.2" + path-is-absolute "^1.0.1" slash "^1.0.0" - source-map "^0.5.0" - v8flags "^2.0.10" + source-map "^0.5.6" + v8flags "^2.1.1" optionalDependencies: chokidar "^1.6.1" @@ -222,58 +226,58 @@ babel-code-frame@7.0.0-beta.0: esutils "^2.0.2" js-tokens "^3.0.0" -babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: - chalk "^1.1.0" + chalk "^1.1.3" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^3.0.2" -babel-core@^6.1.4, babel-core@^6.24.1, babel-core@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" +babel-core@^6.1.4, babel-core@^6.25.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.25.0" + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" babel-helpers "^6.24.1" babel-messages "^6.23.0" - babel-register "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.25.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" slash "^1.0.0" - source-map "^0.5.0" + source-map "^0.5.6" babel-eslint@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.0.tgz#ce06f385bdfb5b6d7e603f06222f891abd14c240" + version "8.0.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.1.tgz#5d718be7a328625d006022eb293ed3008cbd6346" dependencies: babel-code-frame "7.0.0-beta.0" babel-traverse "7.0.0-beta.0" babel-types "7.0.0-beta.0" babylon "7.0.0-beta.22" -babel-generator@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" +babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" dependencies: babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" detect-indent "^4.0.0" jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" + lodash "^4.17.4" + source-map "^0.5.6" trim-right "^1.0.1" babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: @@ -285,12 +289,12 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: babel-types "^6.24.1" babel-helper-builder-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - esutils "^2.0.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" babel-helper-call-delegate@^6.24.1: version "6.24.1" @@ -302,13 +306,13 @@ babel-helper-call-delegate@^6.24.1: babel-types "^6.24.1" babel-helper-define-map@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" dependencies: babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" babel-helper-explode-assignable-expression@^6.24.1: version "6.24.1" @@ -365,12 +369,12 @@ babel-helper-optimise-call-expression@^6.24.1: babel-types "^6.24.1" babel-helper-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" babel-helper-remap-async-to-generator@^6.24.1: version "6.24.1" @@ -432,6 +436,10 @@ babel-plugin-syntax-class-properties@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" @@ -490,14 +498,14 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" babel-plugin-transform-es2015-classes@^6.23.0: version "6.24.1" @@ -562,13 +570,13 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015 babel-template "^6.24.1" babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" dependencies: babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" babel-plugin-transform-es2015-modules-systemjs@^6.23.0: version "6.24.1" @@ -665,11 +673,11 @@ babel-plugin-transform-inline-environment-variables@^0.1.1: resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.1.1.tgz#257ccd8ff6941c55384fa60607c97105bb125664" babel-plugin-transform-object-rest-spread@^6.22.0, babel-plugin-transform-object-rest-spread@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.22.0" + babel-runtime "^6.26.0" babel-plugin-transform-react-constant-elements@^6.23.0: version "6.23.0" @@ -710,10 +718,10 @@ babel-plugin-transform-react-pure-to-component@^1.0.1: resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-pure-to-component/-/babel-plugin-transform-react-pure-to-component-1.0.1.tgz#2b18a2093db3473340ead0cca9d9d944e697d6a8" babel-plugin-transform-regenerator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" dependencies: - regenerator-transform "0.9.11" + regenerator-transform "^0.10.0" babel-plugin-transform-runtime@^6.23.0: version "6.23.0" @@ -728,17 +736,17 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-polyfill@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" +babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" dependencies: - babel-runtime "^6.22.0" - core-js "^2.4.0" - regenerator-runtime "^0.10.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" babel-preset-env@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" + version "1.6.1" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-syntax-trailing-function-commas "^6.22.0" @@ -789,10 +797,11 @@ babel-preset-react@^6.24.1: babel-preset-flow "^6.23.0" babel-preset-shopify@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/babel-preset-shopify/-/babel-preset-shopify-16.1.0.tgz#ef82e456e9419c676441b402fd4e606f3dce2153" + version "16.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-shopify/-/babel-preset-shopify-16.2.0.tgz#fa3a6d8bc16bc7b44bab38fe8677c7a7647c9164" dependencies: babel-plugin-react-test-id "^1.0.2" + babel-plugin-syntax-dynamic-import "^6.18.0" babel-plugin-syntax-flow "^6.18.0" babel-plugin-transform-class-properties "^6.24.1" babel-plugin-transform-flow-strip-types "^6.22.0" @@ -820,24 +829,24 @@ babel-preset-stage-3@^6.24.1: babel-plugin-transform-exponentiation-operator "^6.24.1" babel-plugin-transform-object-rest-spread "^6.22.0" -babel-register@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: - babel-core "^6.24.1" - babel-runtime "^6.22.0" - core-js "^2.4.0" + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" home-or-tmp "^2.0.0" - lodash "^4.2.0" + lodash "^4.17.4" mkdirp "^0.5.1" - source-map-support "^0.4.2" + source-map-support "^0.4.15" -babel-runtime@^6.18.0, babel-runtime@^6.22.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c" +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" - regenerator-runtime "^0.10.0" + regenerator-runtime "^0.11.0" babel-template@7.0.0-beta.0: version "7.0.0-beta.0" @@ -848,15 +857,15 @@ babel-template@7.0.0-beta.0: babylon "7.0.0-beta.22" lodash "^4.2.0" -babel-template@^6.24.1, babel-template@^6.25.0, babel-template@^6.7.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" +babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.7.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.25.0" - babel-types "^6.25.0" - babylon "^6.17.2" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" babel-traverse@7.0.0-beta.0: version "7.0.0-beta.0" @@ -872,19 +881,19 @@ babel-traverse@7.0.0-beta.0: invariant "^2.2.0" lodash "^4.2.0" -babel-traverse@^6.24.1, babel-traverse@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: - babel-code-frame "^6.22.0" + babel-code-frame "^6.26.0" babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.25.0" - babylon "^6.17.2" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" babel-types@7.0.0-beta.0: version "7.0.0-beta.0" @@ -894,22 +903,22 @@ babel-types@7.0.0-beta.0: lodash "^4.2.0" to-fast-properties "^2.0.0" -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: - babel-runtime "^6.22.0" + babel-runtime "^6.26.0" esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" + lodash "^4.17.4" + to-fast-properties "^1.0.3" babylon@7.0.0-beta.22: version "7.0.0-beta.22" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.22.tgz#74f0ad82ed7c7c3cfeab74cf684f815104161b65" -babylon@^6.17.2: - version "6.17.4" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" balanced-match@^1.0.0: version "1.0.0" @@ -922,8 +931,8 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" binary-extensions@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.9.0.tgz#66506c16ce6f4d6928a5b3cd6a33ca41e941e37b" + version "1.10.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" block-stream@*: version "0.0.9" @@ -957,11 +966,11 @@ browser-stdout@1.3.0: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" browserslist@^2.1.2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.3.0.tgz#b2aa76415c71643fe2368f6243b43bbbb4211752" + version "2.5.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.5.1.tgz#68e4bc536bbcc6086d62843a2ffccea8396821c6" dependencies: - caniuse-lite "^1.0.30000710" - electron-to-chromium "^1.3.17" + caniuse-lite "^1.0.30000744" + electron-to-chromium "^1.3.24" buf-compare@^1.0.0: version "1.0.1" @@ -989,9 +998,9 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -caniuse-lite@^1.0.30000710: - version "1.0.30000710" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000710.tgz#1c249bf7c6a61161c9b10906e3ad9fa5b6761af1" +caniuse-lite@^1.0.30000744: + version "1.0.30000749" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000749.tgz#2ff382865aead8cca35dacfbab04f58effa4c01c" caseless@~0.12.0: version "0.12.0" @@ -1004,7 +1013,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1014,17 +1023,9 @@ chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chalk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.0.tgz#477b3bf2f9b8fd5ca9e429747e37f724ee7af240" dependencies: ansi-styles "^3.1.0" escape-string-regexp "^1.0.5" @@ -1073,8 +1074,8 @@ cli-table2@^0.2.0: 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" + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" cliui@^2.1.0: version "2.1.0" @@ -1126,7 +1127,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.8.1: +commander@^2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" @@ -1150,7 +1151,7 @@ contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" -convert-source-map@^1.1.0: +convert-source-map@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" @@ -1165,17 +1166,17 @@ core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.0.0, core-js@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" create-react-class@^15.6.0: - version "15.6.0" - resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4" + version "15.6.2" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a" dependencies: fbjs "^0.8.9" loose-envify "^1.3.1" @@ -1205,15 +1206,21 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@2.6.8, debug@^2.1.1, debug@^2.2.0, debug@^2.6.8: +debug@2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: ms "2.0.0" +debug@^2.2.0, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + debug@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.0.1.tgz#0564c612b521dc92d9f2988f0549e34f9c98db64" + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: ms "2.0.0" @@ -1296,9 +1303,9 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -electron-to-chromium@^1.3.17: - version "1.3.17" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.17.tgz#41c13457cc7166c5c15e767ae61d86a8cacdee5d" +electron-to-chromium@^1.3.24: + version "1.3.27" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d" emoji-regex@^6.1.0: version "6.5.1" @@ -1329,11 +1336,11 @@ error-stack-parser@^1.3.6: stackframe "^0.3.1" es-abstract@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914" + version "1.9.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227" dependencies: es-to-primitive "^1.1.1" - function-bind "^1.1.0" + function-bind "^1.1.1" has "^1.0.1" is-callable "^1.1.3" is-regex "^1.0.4" @@ -1350,7 +1357,7 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 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.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: @@ -1361,6 +1368,23 @@ escodegen@1.8.x, escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +escodegen@^1.6.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.5.6" + +eslint-config-prettier@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz#f21db0ebb438ad678fb98946097c4bb198befccc" + dependencies: + get-stdin "^5.0.1" + eslint-import-resolver-node@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" @@ -1386,8 +1410,8 @@ eslint-module-utils@^2.1.1: pkg-dir "^1.0.0" eslint-plugin-ava@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.2.1.tgz#7cdb5e81bc779f4833d4720a6093e5f4a6ca1913" + version "4.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-4.2.2.tgz#0a20395ddf6d7452f4f9d6fd1a90f0bf4a5fc4d5" dependencies: arrify "^1.0.1" deep-strict-equal "^0.2.0" @@ -1407,14 +1431,14 @@ eslint-plugin-chai-expect@^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.32.1: - version "2.35.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.35.0.tgz#d17494f0ae8b727c632d8b9d4b4a848e7e0c04af" + version "2.39.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.39.1.tgz#b5624622a0388bcd969f4351131232dcb9649cd5" dependencies: lodash "^4.15.0" eslint-plugin-import@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894" dependencies: builtin-modules "^1.1.1" contains-path "^0.1.0" @@ -1440,8 +1464,8 @@ eslint-plugin-jsx-a11y@^6.0.2: jsx-ast-utils "^1.4.0" eslint-plugin-lodash@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.4.4.tgz#ecc7b216fdd487df2f542734ea1215203cb563ec" + version "2.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-lodash/-/eslint-plugin-lodash-2.5.0.tgz#be23eb0c0b7b15c1fc3a46bf702b4be757446b45" dependencies: lodash "~4.17.0" @@ -1452,21 +1476,28 @@ eslint-plugin-mocha@^4.11.0: ramda "^0.24.1" eslint-plugin-node@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.1.1.tgz#a7ed956e780c22aef6afd1116005acd82f26eac6" + version "5.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz#80df3253c4d7901045ec87fa660a284e32bdca29" dependencies: - ignore "^3.3.3" + ignore "^3.3.6" minimatch "^3.0.4" resolve "^1.3.3" semver "5.3.0" +eslint-plugin-prettier@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz#e7a746c67e716f335274b88295a9ead9f544e44d" + dependencies: + fast-diff "^1.1.1" + jest-docblock "^21.0.0" + eslint-plugin-promise@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" + version "3.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75" eslint-plugin-react@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.3.0.tgz#ca9368da36f733fbdc05718ae4e91f778f38e344" + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a" dependencies: doctrine "^2.0.0" has "^1.0.1" @@ -1474,9 +1505,10 @@ eslint-plugin-react@^7.3.0: prop-types "^15.5.10" "eslint-plugin-shopify@file:./.": - version "17.0.0" + version "17.2.0-alpha.1" dependencies: babel-eslint "^8.0.0" + eslint-config-prettier "^2.6.0" eslint-plugin-ava "^4.2.1" eslint-plugin-babel "^4.1.2" eslint-plugin-chai-expect "^1.1.1" @@ -1486,14 +1518,17 @@ eslint-plugin-react@^7.3.0: eslint-plugin-lodash "^2.4.4" eslint-plugin-mocha "^4.11.0" eslint-plugin-node "^5.1.1" + eslint-plugin-prettier "^2.3.1" eslint-plugin-promise "^3.5.0" eslint-plugin-react "^7.3.0" eslint-plugin-sort-class-members "^1.2.0" merge "^1.2.0" + optionalDependencies: + prettier "<1.8 >= 1.7.2" eslint-plugin-sort-class-members@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.2.0.tgz#890111a642c091ce55aa5369bea4c9a9f3def85b" + version "1.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.2.2.tgz#c8719f80a2b7a84707d1ee3c0a7cb34d815c4f5a" eslint-scope@^3.7.1: version "3.7.1" @@ -1502,50 +1537,9 @@ eslint-scope@^3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.4.0.tgz#a3e153e704b64f78290ef03592494eaba228d3bc" - dependencies: - ajv "^5.2.0" - babel-code-frame "^6.22.0" - chalk "^1.1.3" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^2.6.8" - doctrine "^2.0.0" - eslint-scope "^3.7.1" - espree "^3.5.0" - esquery "^1.0.0" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^9.17.0" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" - json-stable-stringify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^4.0.0" - progress "^2.0.0" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" - -eslint@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.7.1.tgz#849804136953ebe366782f9f8611e2cbd1b54681" +eslint@^4.2.0, eslint@^4.7.1: + version "4.9.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.9.0.tgz#76879d274068261b191fe0f2f56c74c2f4208e8b" dependencies: ajv "^5.2.0" babel-code-frame "^6.22.0" @@ -1585,14 +1579,7 @@ eslint@^4.7.1: table "^4.0.1" text-table "~0.2.0" -espree@^3.1.3, espree@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.0.tgz#98358625bdd055861ea27e2867ea729faf463d8d" - dependencies: - acorn "^5.1.1" - acorn-jsx "^3.0.0" - -espree@^3.5.1: +espree@^3.1.3, espree@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" dependencies: @@ -1603,6 +1590,10 @@ esprima@2.7.x, esprima@^2.1.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" @@ -1634,7 +1625,7 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" -esutils@^2.0.0, esutils@^2.0.2: +esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1667,12 +1658,12 @@ extend@~3.0.0: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" external-editor@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + version "2.0.5" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc" dependencies: iconv-lite "^0.4.17" jschardet "^1.4.2" - tmp "^0.0.31" + tmp "^0.0.33" extglob@^0.3.1: version "0.3.2" @@ -1688,13 +1679,17 @@ fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" +fast-diff@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" -fbjs@^0.8.9: - version "0.8.14" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" +fbjs@^0.8.16, fbjs@^0.8.9: + version "0.8.16" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -1745,8 +1740,8 @@ find-up@^2.0.0, find-up@^2.1.0: locate-path "^2.0.0" flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" dependencies: circular-json "^0.3.1" del "^2.0.2" @@ -1811,9 +1806,9 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: mkdirp ">=0.5 0" rimraf "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" +function-bind@^1.0.2, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" functional-red-black-tree@^1.0.1: version "1.0.1" @@ -1836,6 +1831,10 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -1880,7 +1879,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: +glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1902,7 +1901,7 @@ globals@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/globals/-/globals-10.1.0.tgz#4425a1881be0d336b4a823a82a7be725d5dd987c" -globals@^9.0.0, globals@^9.17.0: +globals@^9.17.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -1930,8 +1929,8 @@ growl@1.9.2: resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" handlebars@^4.0.1: - version "4.0.10" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -1978,7 +1977,7 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" -hawk@~3.1.3: +hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -1987,6 +1986,10 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" @@ -2011,12 +2014,12 @@ http-signature@~1.1.0: sshpk "^1.7.0" iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -ignore@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +ignore@^3.3.3, ignore@^3.3.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.6.tgz#b6f3196b38ed92f0c86e52f6f79b7fc4c8266c8d" import-modules@^1.1.0: version "1.1.0" @@ -2042,10 +2045,10 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" inquirer@^3.0.6: - version "3.2.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.1.tgz#06ceb0f540f45ca548c17d6840959878265fa175" + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: - ansi-escapes "^2.0.0" + ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" @@ -2264,13 +2267,17 @@ istanbul@^0.4.0, istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" -js-tokens@^3.0.0: +jest-docblock@^21.0.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + +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-yaml@3.x, js-yaml@^3.9.1: - version "3.9.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + version "3.10.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -2280,8 +2287,8 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jschardet@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.0.tgz#a61f310306a5a71188e1b1acd08add3cfbb08b1e" + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" jsesc@^1.3.0: version "1.3.0" @@ -2313,7 +2320,7 @@ json3@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" -json5@^0.5.0: +json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -2335,8 +2342,8 @@ jsx-ast-utils@^1.4.0: resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" jsx-ast-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.0.tgz#ec06a3d60cf307e5e119dac7bad81e89f096f0f8" + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: array-includes "^3.0.3" @@ -2440,7 +2447,7 @@ 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.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.0: +lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2489,15 +2496,15 @@ micromatch@^2.1.5: parse-glob "^3.0.4" regex-cache "^0.4.2" -mime-db@~1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.16" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: - mime-db "~1.29.0" + mime-db "~1.30.0" mimic-fn@^1.0.0: version "1.1.0" @@ -2515,7 +2522,7 @@ min-document@^2.19.0: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -2523,6 +2530,10 @@ minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2530,8 +2541,8 @@ mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: minimist "0.0.8" mocha@^3.4.2: - version "3.5.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.0.tgz#1328567d2717f997030f8006234bce9b8cd72465" + version "3.5.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" dependencies: browser-stdout "1.3.0" commander "2.9.0" @@ -2540,6 +2551,7 @@ mocha@^3.4.2: escape-string-regexp "1.0.5" glob "7.1.1" growl "1.9.2" + he "1.1.1" json3 "3.3.2" lodash.create "3.1.1" mkdirp "0.5.1" @@ -2563,29 +2575,30 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" nan@^2.3.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + version "2.7.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" node-fetch@^1.0.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: encoding "^0.1.11" is-stream "^1.0.1" node-pre-gyp@^0.6.36: - version "0.6.36" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + version "0.6.38" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.38.tgz#e92a20f83416415bb4086f6d1fb78b3da73d113d" dependencies: + hawk "3.1.3" mkdirp "^0.5.1" nopt "^4.0.1" npmlog "^4.0.2" rc "^1.1.7" - request "^2.81.0" + request "2.81.0" rimraf "^2.6.1" semver "^5.3.0" tar "^2.2.1" @@ -2706,7 +2719,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -2717,7 +2730,7 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -output-file-sync@^1.1.0: +output-file-sync@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" dependencies: @@ -2764,7 +2777,7 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -2816,10 +2829,6 @@ pkg-up@^2.0.0: dependencies: find-up "^2.1.0" -pluralize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" - pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -2832,9 +2841,13 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -private@^0.1.6: - version "0.1.7" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" +"prettier@<1.8 >= 1.7.2": + version "1.7.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa" + +private@^0.1.6, private@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" process-nextick-args@~1.0.6: version "1.0.7" @@ -2855,11 +2868,12 @@ promise@^7.1.1: asap "~2.0.3" prop-types@^15.5.10, prop-types@^15.5.4: - version "15.5.10" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + version "15.6.0" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" dependencies: - fbjs "^0.8.9" + fbjs "^0.8.16" loose-envify "^1.3.1" + object-assign "^4.1.1" pseudomap@^1.0.2: version "1.0.2" @@ -2885,8 +2899,8 @@ randomatic@^1.1.3: kind-of "^4.0.0" rc@^1.1.7: - version "1.2.1" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + version "1.2.2" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -2894,12 +2908,12 @@ rc@^1.1.7: strip-json-comments "~2.0.1" react-deep-force-update@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.0.1.tgz#4f7f6c12c3e7de42f345992a3c518236fa1ecad3" + version "2.1.1" + resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz#8ea4263cd6455a050b37445b3f08fd839d86e909" react-dom@^15.6.1: - version "15.6.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470" + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730" dependencies: fbjs "^0.8.9" loose-envify "^1.1.0" @@ -2924,8 +2938,8 @@ react-proxy@^3.0.0-alpha.0: lodash "^4.6.1" react@^15.6.1: - version "15.6.1" - resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df" + version "15.6.2" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72" dependencies: create-react-class "^15.6.0" fbjs "^0.8.9" @@ -2979,27 +2993,30 @@ redbox-react@^1.2.5: sourcemapped-stacktrace "^1.1.6" regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" -regenerator-runtime@^0.10.0: +regenerator-runtime@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" dependencies: babel-runtime "^6.18.0" babel-types "^6.19.0" private "^0.1.6" regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" regexpu-core@^2.0.0: version "2.0.0" @@ -3020,8 +3037,8 @@ regjsparser@^0.1.4: jsesc "~0.5.0" remove-trailing-separator@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" repeat-element@^1.1.2: version "1.1.2" @@ -3037,7 +3054,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.81.0: +request@2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: @@ -3107,8 +3124,8 @@ right-align@^0.1.1: align-text "^0.1.1" rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" @@ -3132,7 +3149,11 @@ safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -"semver@2 || 3 || 4 || 5", semver@5.3.0, semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +semver@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -3166,9 +3187,11 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" sntp@1.x.x: version "1.0.9" @@ -3176,13 +3199,13 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -source-map-support@^0.4.2: - version "0.4.15" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: source-map "^0.5.6" -source-map@0.5.6, source-map@^0.5.0, source-map@^0.5.6, source-map@~0.5.1: +source-map@0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" @@ -3192,6 +3215,10 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" +source-map@^0.5.0, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -3248,7 +3275,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0, string-width@^2.1.0: +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -3293,7 +3320,7 @@ 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@3.1.2, 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: @@ -3303,22 +3330,28 @@ 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: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + supports-color@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" dependencies: has-flag "^2.0.0" table@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" tar-pack@^3.4.0: version "3.4.0" @@ -3349,13 +3382,13 @@ through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" -tmp@^0.0.31: - version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" dependencies: - os-tmpdir "~1.0.1" + os-tmpdir "~1.0.2" -to-fast-properties@^1.0.1: +to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -3364,8 +3397,8 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + version "2.3.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" @@ -3398,8 +3431,8 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" ua-parser-js@^0.7.9: - version "0.7.14" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" + version "0.7.17" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" uglify-js@^2.6: version "2.8.29" @@ -3434,7 +3467,7 @@ uuid@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" -v8flags@^2.0.10: +v8flags@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" dependencies: