diff --git a/.eslintrc.js b/.eslintrc.js index c23562d82260..c2da99925954 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,8 @@ module.exports = { extends: [ './packages/eslint-config-fb-strict/index.js', 'plugin:import/errors', + 'prettier', + 'prettier/flowtype', ], overrides: [ // to make it more suitable for running on code examples in docs/ folder @@ -23,6 +25,7 @@ module.exports = { 'jest/valid-expect': 0, 'no-undef': 0, 'no-unused-vars': 0, + 'prettier/prettier': 0, 'react/jsx-no-undef': 0, 'react/react-in-jsx-scope': 0, 'sort-keys': 0, @@ -56,11 +59,31 @@ module.exports = { 'unicorn/filename-case': 0, }, }, + { + excludedFiles: 'integration_tests/__tests__/**/*', + files: [ + 'examples/**/*', + 'scripts/**/*', + 'integration_tests/*/**/*', + 'website/server/*', + 'website/layout/*', + ], + rules: { + 'prettier/prettier': [ + 2, + { + bracketSpacing: false, + printWidth: 80, + singleQuote: true, + trailingComma: 'es5', + }, + ], + }, + }, ], parser: 'babel-eslint', - plugins: ['markdown', 'import', 'unicorn'], + plugins: ['markdown', 'import', 'unicorn', 'prettier'], rules: { - 'computed-property-spacing': 0, 'flowtype/boolean-style': 2, 'flowtype/no-primitive-constructor-types': 2, 'flowtype/require-valid-file-annotation': 2, @@ -72,8 +95,15 @@ module.exports = { // This has to be disabled until all type and module imports are combined // https://github.com/benmosher/eslint-plugin-import/issues/645 'import/order': 0, - 'max-len': 0, - 'no-multiple-empty-lines': 1, + 'prettier/prettier': [ + 2, + { + bracketSpacing: false, + printWidth: 80, + singleQuote: true, + trailingComma: 'all', + }, + ], 'unicorn/filename-case': [2, {case: 'snakeCase'}], }, }; diff --git a/fixtures/parser_tests.js b/fixtures/parser_tests.js index 3b5fc840eec1..2176c9245f1f 100644 --- a/fixtures/parser_tests.js +++ b/fixtures/parser_tests.js @@ -18,7 +18,6 @@ function parserTests(parse: (file: string) => BabylonParserResult) { }); describe('File Parsing for it blocks', () => { - it('For the simplest it cases', () => { const data = parse(`${fixtures}/global_its.example`); @@ -122,7 +121,6 @@ function parserTests(parse: (file: string) => BabylonParserResult) { }); describe('File Parsing for expects', () => { - it('finds Expects in a danger test file', () => { const data = parse(`${fixtures}/dangerjs/travis-ci.example`); expect(data.expects.length).toEqual(8); diff --git a/karma.conf.js b/karma.conf.js index bfd10ab7242d..6df441f4c30e 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -9,9 +9,7 @@ module.exports = config => { config.set({ browsers: ['ChromeHeadless'], - files: [ - 'integration_tests/browser-support/browser-test.js', - ], + files: ['integration_tests/browser-support/browser-test.js'], frameworks: ['mocha', 'browserify'], plugins: ['karma-browserify', 'karma-chrome-launcher', 'karma-mocha'], preprocessors: { diff --git a/package.json b/package.json index 27df9349e130..2cb0afa34118 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,12 @@ "cross-spawn": "^5.1.0", "enzyme": "^2.8.2", "eslint": "^4.1.0", + "eslint-config-prettier": "^2.3.0", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-flowtype": "^2.34.0", "eslint-plugin-import": "^2.6.0", "eslint-plugin-markdown": "^1.0.0-beta.6", + "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^7.1.0", "eslint-plugin-unicorn": "^2.1.2", "flow-bin": "^0.48.0", @@ -74,10 +76,8 @@ "clean-all": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules && rm -rf ./integration_tests/*/*/node_modules && yarn run build-clean", "jest": "node ./packages/jest-cli/bin/jest.js", "jest-coverage": "yarn run jest --silent -- --coverage", - "lint": "yarn run lint-prettier --silent && eslint . --cache --ext js,md", + "lint": "eslint . --cache --ext js,md", "lint-es5-build": "eslint --no-eslintrc --no-ignore --env=browser packages/*/build-es5", - "lint-prettier": "node scripts/prettier.js lint", - "prettier": "node scripts/prettier.js write", "postinstall": "node ./scripts/postinstall.js && yarn run build --silent && (cd packages/eslint-plugin-jest && yarn link --silent) && yarn link eslint-plugin-jest --silent", "publish": "yarn run build-clean --silent && yarn run build --silent && lerna publish --silent", "test-ci-es5-build-in-browser": "karma start --single-run", diff --git a/packages/eslint-config-fb-strict/index.js b/packages/eslint-config-fb-strict/index.js index e918b348be99..a6127ed99b1d 100644 --- a/packages/eslint-config-fb-strict/index.js +++ b/packages/eslint-config-fb-strict/index.js @@ -11,8 +11,13 @@ const fbjsConfig = require('eslint-config-fbjs'); const variableNamePattern = String.raw`\s*[a-zA-Z_$][a-zA-Z_$\d]*\s*`; -const importPattern = String.raw`^(?:var|let|const|import type)\s+` + - '{?' + variableNamePattern + '(?:,' + variableNamePattern + ')*}?' + +const importPattern = + String.raw`^(?:var|let|const|import type)\s+` + + '{?' + + variableNamePattern + + '(?:,' + + variableNamePattern + + ')*}?' + String.raw`\s*(?:=\s*require\(|from)[a-zA-Z_+./''\s\d\-]+\)?[^;\n]*[;\n]`; const maxLenIgnorePattern = String.raw`(^\s*(it|test)\(|${importPattern})`; @@ -29,24 +34,31 @@ module.exports = Object.assign({}, fbjsConfig, { 'array-bracket-spacing': [2, 'never'], 'arrow-parens': [2, 'as-needed'], 'arrow-spacing': [2], - 'brace-style': [2, '1tbs', { - 'allowSingleLine': true, - }], + 'brace-style': [ + 2, + '1tbs', + { + allowSingleLine: true, + }, + ], 'comma-dangle': [2, 'always-multiline'], 'comma-spacing': [2], 'comma-style': [2, 'last'], 'computed-property-spacing': [2, 'never'], 'eol-last': [2], 'flowtype/object-type-delimiter': [2, 'comma'], - 'indent': [0], + indent: [0], 'jest/no-focused-tests': [2], 'jest/no-identical-title': [2], 'jest/valid-expect': [2], - 'max-len': [2, { - 'code': 80, - 'ignorePattern': maxLenIgnorePattern, - 'ignoreUrls': true, - }], + 'max-len': [ + 2, + { + code: 80, + ignorePattern: maxLenIgnorePattern, + ignoreUrls: true, + }, + ], 'no-const-assign': [2], 'no-extra-parens': [2, 'functions'], 'no-irregular-whitespace': [2], @@ -56,14 +68,21 @@ module.exports = Object.assign({}, fbjsConfig, { 'object-shorthand': [2], 'prefer-arrow-callback': [2], 'prefer-const': [2], - 'quotes': [2, 'single', { - 'allowTemplateLiterals': true, - 'avoidEscape': true, - }], - 'semi': [2, 'always'], + quotes: [ + 2, + 'single', + { + allowTemplateLiterals: true, + avoidEscape: true, + }, + ], + semi: [2, 'always'], 'sort-keys': [2], 'space-before-blocks': [2], - 'space-before-function-paren': [2, {anonymous: 'never', asyncArrow: 'always', named: 'never'}], + 'space-before-function-paren': [ + 2, + {anonymous: 'never', asyncArrow: 'always', named: 'never'}, + ], 'space-in-parens': [2, 'never'], }), }); diff --git a/packages/pretty-format/perf/test.js b/packages/pretty-format/perf/test.js index 55909306e6f7..64efd317c3ea 100644 --- a/packages/pretty-format/perf/test.js +++ b/packages/pretty-format/perf/test.js @@ -51,9 +51,8 @@ function testCase(name, fn) { } function test(name, value, ignoreResult, prettyFormatOpts) { - const formatted = testCase( - 'prettyFormat() ', - () => prettyFormat(value, prettyFormatOpts) + const formatted = testCase('prettyFormat() ', () => + prettyFormat(value, prettyFormatOpts), ); const inspected = testCase('util.inspect() ', () => { @@ -75,7 +74,7 @@ function test(name, value, ignoreResult, prettyFormatOpts) { results.forEach((item, index) => { item.isWinner = index === 0; - item.isLoser = index === results.length - 1; + item.isLoser = index === results.length - 1; }); function log(current) { @@ -86,8 +85,11 @@ function test(name, value, ignoreResult, prettyFormatOpts) { } if (current.total) { message += - ' - ' + (current.total / NANOSECONDS) + 's total (' + - TIMES_TO_RUN + ' runs)'; + ' - ' + + current.total / NANOSECONDS + + 's total (' + + TIMES_TO_RUN + + ' runs)'; } if (current.error) { message += ' - Error: ' + current.error.message; @@ -103,11 +105,11 @@ function test(name, value, ignoreResult, prettyFormatOpts) { message = chalk.dim(message); } - const diff = (current.time - winner.time); + const diff = current.time - winner.time; - if (diff > (winner.time * 0.85)) { + if (diff > winner.time * 0.85) { message = chalk.bgRed.black(message); - } else if (diff > (winner.time * 0.65)) { + } else if (diff > winner.time * 0.65) { message = chalk.bgYellow.black(message); } else if (!current.error) { message = chalk.bgGreen.black(message); @@ -166,7 +168,7 @@ objectWithPropsAndSymbols[Symbol('symbol2')] = 'value3'; test('an object with properties and symbols', objectWithPropsAndSymbols); test('an object with sorted properties', {a: 2, b: 1}); test('regular expressions from constructors', new RegExp('regexp')); -test('regular expressions from literals', /regexp/ig); +test('regular expressions from literals', /regexp/gi); test('an empty set', new Set()); const setWithValues = new Set(); setWithValues.add('value1'); @@ -199,11 +201,11 @@ const element = React.createElement( {onClick: () => {}, prop: {a: 1, b: 2}}, React.createElement('div', {prop: {a: 1, b: 2}}), React.createElement('div'), - React.createElement('div', {prop: {a: 1, b: 2}}, - React.createElement('div', null, - React.createElement('div') - ) - ) + React.createElement( + 'div', + {prop: {a: 1, b: 2}}, + React.createElement('div', null, React.createElement('div')), + ), ); test('react', ReactTestRenderer.create(element).toJSON(), false, { diff --git a/scripts/prettier.js b/scripts/prettier.js deleted file mode 100644 index bc83722f9c0c..000000000000 --- a/scripts/prettier.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -const path = require('path'); -const chalk = require('chalk'); -const glob = require('glob'); -const runCommand = require('./_runCommand'); - -const shouldWrite = process.argv[2] === 'write'; -const isWindows = process.platform === 'win32'; -const prettier = isWindows ? 'prettier.cmd' : 'prettier'; -const prettierCmd = path.resolve(__dirname, '../node_modules/.bin/' + prettier); -const defaultOptions = { - 'bracket-spacing': 'false', - 'print-width': 80, - 'single-quote': 'true', - 'trailing-comma': 'all', -}; -const config = { - default: { - ignore: ['**/node_modules/**'], - patterns: [ - 'packages/*/src/**/', - 'types/', - 'integration_tests/', - 'integration_tests/__tests__/', - ], - }, - es5Compatible: { - ignore: [ - '**/node_modules/**', - '**/coverage/**', - 'integration_tests/*', - 'integration_tests/__tests__/*', - ], - options: { - 'trailing-comma': 'es5', - }, - patterns: [ - 'examples/**/', - 'scripts/**/', - 'integration_tests/**/', - 'website/server/*', - 'website/layout/*', - ], - }, -}; - -Object.keys(config).forEach(key => { - const patterns = config[key].patterns; - const options = config[key].options; - const ignore = config[key].ignore; - - const globPattern = - patterns.length > 1 - ? `{${patterns.join(',')}}*.js` - : `${patterns.join(',')}*.js`; - const files = glob.sync(globPattern, {ignore}); - - const args = Object.keys(defaultOptions) - .map(key => `--${key}=${(options && options[key]) || defaultOptions[key]}`) - .concat(`--${shouldWrite ? 'write' : 'l'}`, files); - - try { - runCommand(prettierCmd, args, path.resolve(__dirname, '..')); - } catch (e) { - console.log(e); - if (!shouldWrite) { - console.log( - chalk.red( - ` This project uses prettier to format all JavaScript code.\n` - ) + - chalk.dim(` Please run `) + - chalk.reset('yarn prettier') + - chalk.dim(` and add changes to files listed above to your commit.`) + - `\n` - ); - } - } -}); diff --git a/website/core/BlogPost.js b/website/core/BlogPost.js index 4334b16954ea..547943408ace 100644 --- a/website/core/BlogPost.js +++ b/website/core/BlogPost.js @@ -18,7 +18,9 @@ class BlogPost extends React.Component { content = content.split('')[0]; return (
- {content} + + {content} +
Read More @@ -27,7 +29,11 @@ class BlogPost extends React.Component {
); } - return {content}; + return ( + + {content} + + ); } renderAuthorPhoto() { @@ -39,8 +45,8 @@ class BlogPost extends React.Component { @@ -55,7 +61,9 @@ class BlogPost extends React.Component { const post = this.props.post; return (

- {post.title} + + {post.title} +

); } @@ -83,13 +91,17 @@ class BlogPost extends React.Component { const githubButton = this.props.truncate ? null - :

{siteConfig.githubButton}

; + :

+ {siteConfig.githubButton} +

; return (
{this.renderAuthorPhoto()}

- {post.author} + + {post.author} +

{this.renderTitle()} {githubButton} diff --git a/website/core/BlogSidebar.js b/website/core/BlogSidebar.js index 15e58b6dbad8..8ce3a57d47f6 100644 --- a/website/core/BlogSidebar.js +++ b/website/core/BlogSidebar.js @@ -5,7 +5,7 @@ * @jsx React.DOM */ - /* eslint-disable sort-keys */ +/* eslint-disable sort-keys */ const MetadataBlog = require('MetadataBlog'); const React = require('React'); @@ -14,10 +14,12 @@ const SideNav = require('SideNav'); const BlogSidebar = React.createClass({ render() { - const contents = [{ - name: 'Recent Posts', - links: MetadataBlog.files, - }]; + const contents = [ + { + name: 'Recent Posts', + links: MetadataBlog.files, + }, + ]; const title = this.props.current && this.props.current.title; const current = { id: title || '', diff --git a/website/core/Button.js b/website/core/Button.js index cb7bb86ce8c0..8f4f621e09b8 100644 --- a/website/core/Button.js +++ b/website/core/Button.js @@ -9,11 +9,7 @@ class Button extends React.Component { render() { return (
- + {this.props.children}
diff --git a/website/core/Container.js b/website/core/Container.js index 6e758e71c270..a951fc55c2d3 100644 --- a/website/core/Container.js +++ b/website/core/Container.js @@ -9,20 +9,23 @@ const classNames = require('classnames'); class Container extends React.Component { render() { const containerClasses = classNames('container', this.props.className, { - 'darkBackground': this.props.background === 'dark', - 'highlightBackground': this.props.background === 'highlight', - 'lightBackground': this.props.background === 'light', - 'paddingAll': this.props.padding.indexOf('all') >= 0, - 'paddingBottom': this.props.padding.indexOf('bottom') >= 0, - 'paddingLeft': this.props.padding.indexOf('left') >= 0, - 'paddingRight': this.props.padding.indexOf('right') >= 0, - 'paddingTop': this.props.padding.indexOf('top') >= 0, + darkBackground: this.props.background === 'dark', + highlightBackground: this.props.background === 'highlight', + lightBackground: this.props.background === 'light', + paddingAll: this.props.padding.indexOf('all') >= 0, + paddingBottom: this.props.padding.indexOf('bottom') >= 0, + paddingLeft: this.props.padding.indexOf('left') >= 0, + paddingRight: this.props.padding.indexOf('right') >= 0, + paddingTop: this.props.padding.indexOf('top') >= 0, }); let wrappedChildren; if (this.props.wrapper) { - wrappedChildren = -
{this.props.children}
; + wrappedChildren = ( +
+ {this.props.children} +
+ ); } else { wrappedChildren = this.props.children; } diff --git a/website/core/Doc.js b/website/core/Doc.js index bce735d658d2..eda60694e7a4 100644 --- a/website/core/Doc.js +++ b/website/core/Doc.js @@ -13,9 +13,9 @@ class Doc extends React.Component { className="edit-page-link button" href={ 'https://github.com/facebook/jest/edit/master/docs/' + - (this.props.language || 'en') + - '/' + - this.props.source + (this.props.language || 'en') + + '/' + + this.props.source } target="_blank" > @@ -38,10 +38,14 @@ class Doc extends React.Component {
{editLink} -

{this.props.title}

+

+ {this.props.title} +

- {this.props.content} + + {this.props.content} +
); diff --git a/website/core/DocsSidebar.js b/website/core/DocsSidebar.js index fff7619fa490..b5548ea8373c 100644 --- a/website/core/DocsSidebar.js +++ b/website/core/DocsSidebar.js @@ -15,8 +15,9 @@ const SideNav = require('SideNav'); class DocsSidebar extends React.Component { getCategories(language) { const metadatas = Metadata.files.filter(metadata => { - return metadata.layout === this.props.layout && - metadata.language === language; + return ( + metadata.layout === this.props.layout && metadata.language === language + ); }); // Build a hashmap of article_id -> metadata @@ -33,7 +34,11 @@ class DocsSidebar extends React.Component { if (metadata.next) { if (!articles[metadata.next]) { throw new Error( - '`next: ' + metadata.next + '` in ' + metadata.id + " doesn't exist" + '`next: ' + + metadata.next + + '` in ' + + metadata.id + + " doesn't exist", ); } previous[articles[metadata.next].id] = metadata.id; diff --git a/website/core/Footer.js b/website/core/Footer.js index 79275fccc3ff..0b23397df0be 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -51,12 +51,12 @@ class Footer extends React.Component { > Stack Overflow - + Jest Chat - Twitter + + Twitter +
More
diff --git a/website/core/H2.js b/website/core/H2.js index 16a9c70abc8f..80ef508abdcb 100644 --- a/website/core/H2.js +++ b/website/core/H2.js @@ -8,7 +8,11 @@ const Header = require('Header'); const H2 = React.createClass({ render() { - return
{this.props.children}
; + return ( +
+ {this.props.children} +
+ ); }, }); diff --git a/website/core/Head.js b/website/core/Head.js index 5d7061507773..a6aefce55a36 100644 --- a/website/core/Head.js +++ b/website/core/Head.js @@ -11,33 +11,76 @@ const Head = React.createClass({ - {this.props.title} + + {this.props.title} + - + - - - - + + + - + - + - - + + - + - + - - + ); }, diff --git a/website/core/Header.js b/website/core/Header.js index 7fff1700326f..0c0cc4dbc29b 100644 --- a/website/core/Header.js +++ b/website/core/Header.js @@ -15,9 +15,11 @@ const Header = React.createClass({ return ( - - {this.props.children} - {' '}# + + {this.props.children}{' '} + + # + ); }, diff --git a/website/core/JestHelp.js b/website/core/JestHelp.js index 5a672a69181b..ac0445fe1105 100644 --- a/website/core/JestHelp.js +++ b/website/core/JestHelp.js @@ -31,7 +31,9 @@ const JestHelp = React.createClass({
-

{siteConfig[this.props.language].support.header.title}

+

+ {siteConfig[this.props.language].support.header.title} +

{siteConfig[this.props.language].support.header.content} @@ -40,7 +42,6 @@ const JestHelp = React.createClass({

- ); }, diff --git a/website/core/JestIndex.js b/website/core/JestIndex.js index 817716f71d01..59415a15f666 100644 --- a/website/core/JestIndex.js +++ b/website/core/JestIndex.js @@ -5,7 +5,6 @@ * @jsx React.DOM */ - const React = require('React'); const Site = require('Site'); const Marked = require('Marked'); @@ -55,8 +54,11 @@ const JestIndex = React.createClass({
-

{siteConfig[language].featureCallout.title}

+ style={{textAlign: 'center'}} + > +

+ {siteConfig[language].featureCallout.title} +

{siteConfig[language].featureCallout.content} @@ -108,7 +110,9 @@ const JestIndex = React.createClass({ {siteConfig[language].belowFold.try.title}
- {siteConfig[language].belowFold.try.content} + + {siteConfig[language].belowFold.try.content} +
@@ -156,7 +160,9 @@ const JestIndex = React.createClass({ />
-

{siteConfig[language].belowFold.watch.title}

+

+ {siteConfig[language].belowFold.watch.title} +

{siteConfig[language].belowFold.watch.content} @@ -169,7 +175,9 @@ const JestIndex = React.createClass({
-

{siteConfig[language].belowFold.learn.title}

+

+ {siteConfig[language].belowFold.learn.title} +

{siteConfig[language].belowFold.learn.content} @@ -183,8 +191,12 @@ const JestIndex = React.createClass({
-

{siteConfig[language].belowFold.using.title}

-

{siteConfig[language].belowFold.using.content}

+

+ {siteConfig[language].belowFold.using.title} +

+

+ {siteConfig[language].belowFold.using.content} +

{showcase}
diff --git a/website/core/JestUsers.js b/website/core/JestUsers.js index 2a14f66c5448..11c2f958c8fc 100644 --- a/website/core/JestUsers.js +++ b/website/core/JestUsers.js @@ -26,13 +26,19 @@ class JestUsers extends React.Component {
-

{siteConfig[this.props.language].using.header.title}

-

{siteConfig[this.props.language].using.header.content}

+

+ {siteConfig[this.props.language].using.header.title} +

+

+ {siteConfig[this.props.language].using.header.content} +

{showcase}
-

{siteConfig[this.props.language].using.prompt}

+

+ {siteConfig[this.props.language].using.prompt} +

/)('closed', /<(tag)[\s\S]+?<\/\1>/)('closing', /])*?>/)(/tag/g, block._tag)(); - -block.paragraph = replace(block.paragraph)('hr', block.hr)('heading', block.heading)('lheading', block.lheading)('blockquote', block.blockquote)('tag', '<' + block._tag)('def', block.def)(); +block.list = replace(block.list)(/bull/g, block.bullet)( + 'hr', + /\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/, +)(); + +block._tag = + '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' + + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' + + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|@)\\b'; + +block.html = replace(block.html)('comment', //)( + 'closed', + /<(tag)[\s\S]+?<\/\1>/, +)('closing', /])*?>/)(/tag/g, block._tag)(); + +block.paragraph = replace(block.paragraph)('hr', block.hr)( + 'heading', + block.heading, +)('lheading', block.lheading)('blockquote', block.blockquote)( + 'tag', + '<' + block._tag, +)('def', block.def)(); /** * Normal Block Grammar @@ -64,7 +77,10 @@ block.gfm = merge({}, block.normal, { paragraph: /^/, }); -block.gfm.paragraph = replace(block.paragraph)('(?!', '(?!' + block.gfm.fences.source.replace('\\1', '\\2') + '|')(); +block.gfm.paragraph = replace(block.paragraph)( + '(?!', + '(?!' + block.gfm.fences.source.replace('\\1', '\\2') + '|', +)(); /** * GFM + Tables Block Grammar @@ -141,7 +157,7 @@ Lexer.prototype.token = function(_src, top) { while (src) { // newline - if (cap = this.rules.newline.exec(src)) { + if ((cap = this.rules.newline.exec(src))) { src = src.substring(cap[0].length); if (cap[0].length > 1) { this.tokens.push({ @@ -151,20 +167,18 @@ Lexer.prototype.token = function(_src, top) { } // code - if (cap = this.rules.code.exec(src)) { + if ((cap = this.rules.code.exec(src))) { src = src.substring(cap[0].length); cap = cap[0].replace(/^ {4}/gm, ''); this.tokens.push({ type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap, + text: !this.options.pedantic ? cap.replace(/\n+$/, '') : cap, }); continue; } // fences (gfm) - if (cap = this.rules.fences.exec(src)) { + if ((cap = this.rules.fences.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'code', @@ -175,7 +189,7 @@ Lexer.prototype.token = function(_src, top) { } // heading - if (cap = this.rules.heading.exec(src)) { + if ((cap = this.rules.heading.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'heading', @@ -218,7 +232,7 @@ Lexer.prototype.token = function(_src, top) { } // lheading - if (cap = this.rules.lheading.exec(src)) { + if ((cap = this.rules.lheading.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'heading', @@ -229,7 +243,7 @@ Lexer.prototype.token = function(_src, top) { } // hr - if (cap = this.rules.hr.exec(src)) { + if ((cap = this.rules.hr.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ type: 'hr', @@ -238,7 +252,7 @@ Lexer.prototype.token = function(_src, top) { } // blockquote - if (cap = this.rules.blockquote.exec(src)) { + if ((cap = this.rules.blockquote.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ @@ -260,7 +274,7 @@ Lexer.prototype.token = function(_src, top) { } // list - if (cap = this.rules.list.exec(src)) { + if ((cap = this.rules.list.exec(src))) { src = src.substring(cap[0].length); bull = cap[2]; @@ -309,13 +323,13 @@ Lexer.prototype.token = function(_src, top) { loose = next || /\n\n(?!\s*$)/.test(item); if (i !== l - 1) { next = item[item.length - 1] === '\n'; - if (!loose) {loose = next;} + if (!loose) { + loose = next; + } } this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start', + type: loose ? 'loose_item_start' : 'list_item_start', }); // Recurse. @@ -334,12 +348,10 @@ Lexer.prototype.token = function(_src, top) { } // html - if (cap = this.rules.html.exec(src)) { + if ((cap = this.rules.html.exec(src))) { src = src.substring(cap[0].length); this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', + type: this.options.sanitize ? 'paragraph' : 'html', pre: cap[1] === 'pre' || cap[1] === 'script', text: cap[0], }); @@ -395,15 +407,13 @@ Lexer.prototype.token = function(_src, top) { src = src.substring(cap[0].length); this.tokens.push({ type: 'paragraph', - text: cap[1][cap[1].length - 1] === '\n' - ? cap[1].slice(0, -1) - : cap[1], + text: cap[1][cap[1].length - 1] === '\n' ? cap[1].slice(0, -1) : cap[1], }); continue; } // text - if (cap = this.rules.text.exec(src)) { + if ((cap = this.rules.text.exec(src))) { // Top-level should never reach here. src = src.substring(cap[0].length); this.tokens.push({ @@ -414,8 +424,7 @@ Lexer.prototype.token = function(_src, top) { } if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); } } @@ -445,7 +454,10 @@ const inline = { inline._inside = /(?:\[[^\]]*\]|[^\]]|\](?=[^\[]*\]))*/; inline._href = /\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/; -inline.link = replace(inline.link)('inside', inline._inside)('href', inline._href)(); +inline.link = replace(inline.link)('inside', inline._inside)( + 'href', + inline._href, +)(); inline.reflink = replace(inline.reflink)('inside', inline._inside)(); @@ -494,8 +506,7 @@ function InlineLexer(links, options) { this.rules = inline.normal; if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); + throw new Error('Tokens array requires a `links` property.'); } if (this.options.gfm) { @@ -537,19 +548,17 @@ InlineLexer.prototype.output = function(src) { while (src) { // escape - if (cap = this.rules.escape.exec(src)) { + if ((cap = this.rules.escape.exec(src))) { src = src.substring(cap[0].length); out.push(cap[1]); continue; } // autolink - if (cap = this.rules.autolink.exec(src)) { + if ((cap = this.rules.autolink.exec(src))) { src = src.substring(cap[0].length); if (cap[2] === '@') { - text = cap[1][6] === ':' - ? cap[1].substring(7) - : cap[1]; + text = cap[1][6] === ':' ? cap[1].substring(7) : cap[1]; href = 'mailto:' + text; } else { text = cap[1]; @@ -560,7 +569,7 @@ InlineLexer.prototype.output = function(src) { } // url (gfm) - if (cap = this.rules.url.exec(src)) { + if ((cap = this.rules.url.exec(src))) { src = src.substring(cap[0].length); text = cap[1]; href = text; @@ -569,7 +578,7 @@ InlineLexer.prototype.output = function(src) { } // tag - if (cap = this.rules.tag.exec(src)) { + if ((cap = this.rules.tag.exec(src))) { src = src.substring(cap[0].length); // TODO(alpert): Don't escape if sanitize is false out.push(cap[0]); @@ -577,18 +586,22 @@ InlineLexer.prototype.output = function(src) { } // link - if (cap = this.rules.link.exec(src)) { + if ((cap = this.rules.link.exec(src))) { src = src.substring(cap[0].length); - out.push(this.outputLink(cap, { - href: cap[2], - title: cap[3], - })); + out.push( + this.outputLink(cap, { + href: cap[2], + title: cap[3], + }), + ); continue; } // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { + if ( + (cap = this.rules.reflink.exec(src)) || + (cap = this.rules.nolink.exec(src)) + ) { src = src.substring(cap[0].length); link = (cap[2] || cap[1]).replace(/\s+/g, ' '); link = this.links[link.toLowerCase()]; @@ -602,50 +615,49 @@ InlineLexer.prototype.output = function(src) { } // strong - if (cap = this.rules.strong.exec(src)) { + if ((cap = this.rules.strong.exec(src))) { src = src.substring(cap[0].length); out.push(React.DOM.strong(null, this.output(cap[2] || cap[1]))); continue; } // em - if (cap = this.rules.em.exec(src)) { + if ((cap = this.rules.em.exec(src))) { src = src.substring(cap[0].length); out.push(React.DOM.em(null, this.output(cap[2] || cap[1]))); continue; } // code - if (cap = this.rules.code.exec(src)) { + if ((cap = this.rules.code.exec(src))) { src = src.substring(cap[0].length); out.push(React.DOM.code(null, cap[2])); continue; } // br - if (cap = this.rules.br.exec(src)) { + if ((cap = this.rules.br.exec(src))) { src = src.substring(cap[0].length); out.push(React.DOM.br(null, null)); continue; } // del (gfm) - if (cap = this.rules.del.exec(src)) { + if ((cap = this.rules.del.exec(src))) { src = src.substring(cap[0].length); out.push(React.DOM.del(null, this.output(cap[1]))); continue; } // text - if (cap = this.rules.text.exec(src)) { + if ((cap = this.rules.text.exec(src))) { src = src.substring(cap[0].length); out.push(this.smartypants(cap[0])); continue; } if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); } } @@ -660,8 +672,8 @@ InlineLexer.prototype.sanitizeUrl = function(url) { if (this.options.sanitize) { try { const prot = decodeURIComponent(url) - .replace(/[^A-Za-z0-9:]/g, '') - .toLowerCase(); + .replace(/[^A-Za-z0-9:]/g, '') + .toLowerCase(); if (prot.indexOf('javascript:') === 0) { // eslint-disable-line return '#'; } @@ -679,20 +691,25 @@ InlineLexer.prototype.sanitizeUrl = function(url) { InlineLexer.prototype.outputLink = function(cap, link) { if (cap[0][0] !== '!') { const shouldOpenInNewWindow = - link.href.charAt(0) !== '/' - && link.href.charAt(0) !== '#'; - - return React.DOM.a({ - href: this.sanitizeUrl(link.href), - title: link.title, - target: shouldOpenInNewWindow ? '_blank' : '', - }, this.output(cap[1])); + link.href.charAt(0) !== '/' && link.href.charAt(0) !== '#'; + + return React.DOM.a( + { + href: this.sanitizeUrl(link.href), + title: link.title, + target: shouldOpenInNewWindow ? '_blank' : '', + }, + this.output(cap[1]), + ); } else { - return React.DOM.img({ - src: this.sanitizeUrl(link.href), - alt: cap[1], - title: link.title, - }, null); + return React.DOM.img( + { + src: this.sanitizeUrl(link.href), + alt: cap[1], + title: link.title, + }, + null, + ); } }; @@ -701,7 +718,9 @@ InlineLexer.prototype.outputLink = function(cap, link) { */ InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) {return text;} + if (!this.options.smartypants) { + return text; + } return text .replace(/--/g, '\u2014') .replace(/'([^']*)'/g, '\u2018$1\u2019') @@ -749,7 +768,7 @@ Parser.prototype.parse = function(src) { */ Parser.prototype.next = function() { - return this.token = this.tokens.pop(); + return (this.token = this.tokens.pop()); }; /** @@ -794,7 +813,11 @@ Parser.prototype.tok = function() { // eslint-disable-line ); } case 'code': { - return {this.token.text}; + return ( + + {this.token.text} + + ); } case 'table': { const table = []; @@ -808,12 +831,14 @@ Parser.prototype.tok = function() { // eslint-disable-line // header for (i = 0; i < this.token.header.length; i++) { heading = this.inline.output(this.token.header[i]); - row.push(React.DOM.th( - this.token.align[i] - ? {style: {textAlign: this.token.align[i]}} - : null, - heading - )); + row.push( + React.DOM.th( + this.token.align[i] + ? {style: {textAlign: this.token.align[i]}} + : null, + heading, + ), + ); } table.push(React.DOM.thead(null, React.DOM.tr(null, row))); @@ -822,12 +847,14 @@ Parser.prototype.tok = function() { // eslint-disable-line row = []; cells = this.token.cells[i]; for (j = 0; j < cells.length; j++) { - row.push(React.DOM.td( - this.token.align[j] - ? {style: {textAlign: this.token.align[j]}} - : null, - this.inline.output(cells[j]) - )); + row.push( + React.DOM.td( + this.token.align[j] + ? {style: {textAlign: this.token.align[j]}} + : null, + this.inline.output(cells[j]), + ), + ); } body.push(React.DOM.tr(null, row)); } @@ -858,9 +885,7 @@ Parser.prototype.tok = function() { // eslint-disable-line const body = []; while (this.next().type !== 'list_item_end') { - body.push(this.token.type === 'text' - ? this.parseText() - : this.tok()); + body.push(this.token.type === 'text' ? this.parseText() : this.tok()); } return React.DOM.li(null, body); @@ -883,7 +908,10 @@ Parser.prototype.tok = function() { // eslint-disable-line } case 'paragraph': { return this.options.paragraphFn - ? this.options.paragraphFn.call(null, this.inline.output(this.token.text)) + ? this.options.paragraphFn.call( + null, + this.inline.output(this.token.text), + ) : React.DOM.p(null, this.inline.output(this.token.text)); } case 'text': { @@ -902,7 +930,9 @@ function replace(regex, opt) { regex = regex.source; opt = opt || ''; return function self(name, val) { - if (!name) {return new RegExp(regex, opt);} + if (!name) { + return new RegExp(regex, opt); + } val = val.source || val; val = val.replace(/(^|[^\[])\^/g, '$1'); regex = regex.replace(name, val); @@ -941,7 +971,9 @@ function marked(src, opt, callback) { opt = null; } - if (opt) {opt = merge({}, marked.defaults, opt);} + if (opt) { + opt = merge({}, marked.defaults, opt); + } const highlight = opt.highlight; let tokens; @@ -971,16 +1003,16 @@ function marked(src, opt, callback) { opt.highlight = highlight; - return err - ? callback(err) - : callback(null, out); + return err ? callback(err) : callback(null, out); }; if (!highlight || highlight.length < 3) { return done(true); } - if (!pending) {return done();} + if (!pending) { + return done(); + } for (; i < tokens.length; i++) { (function(token) { @@ -1002,13 +1034,17 @@ function marked(src, opt, callback) { return undefined; } try { - if (opt) {opt = merge({}, marked.defaults, opt);} + if (opt) { + opt = merge({}, marked.defaults, opt); + } return Parser.parse(Lexer.lex(src, opt), opt); } catch (e) { e.message += '\nPlease report this to https://github.com/chjj/marked.'; if ((opt || marked.defaults).silent) { - return [React.DOM.p(null, 'An error occurred:'), - React.DOM.pre(null, e.message)]; + return [ + React.DOM.p(null, 'An error occurred:'), + React.DOM.pre(null, e.message), + ]; } throw e; } @@ -1018,8 +1054,7 @@ function marked(src, opt, callback) { * Options */ -marked.options = -marked.setOptions = function(opt) { +marked.options = marked.setOptions = function(opt) { merge(marked.defaults, opt); return marked; }; @@ -1055,7 +1090,11 @@ marked.parse = marked; const Marked = React.createClass({ render() { - return
{marked(this.props.children, this.props)}
; + return ( +
+ {marked(this.props.children, this.props)} +
+ ); }, }); diff --git a/website/core/OpenSourceGlyph.js b/website/core/OpenSourceGlyph.js index 61b405f73b23..4e8b8af263f8 100644 --- a/website/core/OpenSourceGlyph.js +++ b/website/core/OpenSourceGlyph.js @@ -8,11 +8,25 @@ const React = require('React'); class OpenSourceGlyph extends React.Component { render() { return ( - + - - - + + + ); diff --git a/website/core/Thing.js b/website/core/Thing.js index 15ea614fb705..06dc522f4966 100644 --- a/website/core/Thing.js +++ b/website/core/Thing.js @@ -52,7 +52,9 @@ try { className="productShowcaseSection paddingBottom" style={{textAlign: 'center'}} > -

{siteConfig[language].featureCallout.title}

+

+ {siteConfig[language].featureCallout.title} +

{siteConfig[language].featureCallout.content} @@ -62,9 +64,8 @@ try {
-

{siteConfig[language].belowFold.learn.title}

+

+ {siteConfig[language].belowFold.learn.title} +

{siteConfig[language].belowFold.learn.content} @@ -159,8 +162,12 @@ try {
-

{siteConfig[language].belowFold.using.title}

-

{siteConfig[language].belowFold.using.content}

+

+ {siteConfig[language].belowFold.using.title} +

+

+ {siteConfig[language].belowFold.using.content} +

{showcase}
diff --git a/website/core/center.js b/website/core/center.js index e8d03a10c6df..08bf4888f94c 100644 --- a/website/core/center.js +++ b/website/core/center.js @@ -13,7 +13,9 @@ const center = React.createClass({ const newStyle = assign({}, style, {textAlign: 'center'}); return ( -
{this.props.children}
+
+ {this.props.children} +
); }, }); diff --git a/website/core/home/GridBlock.js b/website/core/home/GridBlock.js index 3527d0219d9d..c32c81b4a4de 100644 --- a/website/core/home/GridBlock.js +++ b/website/core/home/GridBlock.js @@ -11,23 +11,24 @@ const Marked = require('Marked'); class GridBlock extends React.Component { renderBlock(block) { const blockClasses = classNames('blockElement', this.props.className, { - 'alignCenter': this.props.align === 'center', - 'alignRight': this.props.align === 'right', - 'fourByGridBlock': this.props.layout === 'fourColumn', - 'imageAlignBottom': (block.image && block.imageAlign === 'bottom'), - 'imageAlignSide': (block.image && (block.imageAlign === 'left' || - block.imageAlign === 'right')), - 'imageAlignTop': (block.image && block.imageAlign === 'top'), - 'threeByGridBlock': this.props.layout === 'threeColumn', - 'twoByGridBlock': this.props.layout === 'twoColumn', + alignCenter: this.props.align === 'center', + alignRight: this.props.align === 'right', + fourByGridBlock: this.props.layout === 'fourColumn', + imageAlignBottom: block.image && block.imageAlign === 'bottom', + imageAlignSide: + block.image && + (block.imageAlign === 'left' || block.imageAlign === 'right'), + imageAlignTop: block.image && block.imageAlign === 'top', + threeByGridBlock: this.props.layout === 'threeColumn', + twoByGridBlock: this.props.layout === 'twoColumn', }); - const topLeftImage = (block.imageAlign === 'top' || - block.imageAlign === 'left') && + const topLeftImage = + (block.imageAlign === 'top' || block.imageAlign === 'left') && this.renderBlockImage(block.image); - const bottomRightImage = (block.imageAlign === 'bottom' || - block.imageAlign === 'right') && + const bottomRightImage = + (block.imageAlign === 'bottom' || block.imageAlign === 'right') && this.renderBlockImage(block.image); return ( @@ -35,7 +36,9 @@ class GridBlock extends React.Component { {topLeftImage}
{this.renderBlockTitle(block.title)} - {block.content} + + {block.content} +
{bottomRightImage}
@@ -45,7 +48,9 @@ class GridBlock extends React.Component { renderBlockImage(image) { if (image) { return ( -
+
+ +
); } else { return null; @@ -54,7 +59,11 @@ class GridBlock extends React.Component { renderBlockTitle(title) { if (title) { - return

{title}

; + return ( +

+ {title} +

+ ); } else { return null; } diff --git a/website/core/home/HomeSplash.js b/website/core/home/HomeSplash.js index f1ab5d0ef237..f9b053799b71 100644 --- a/website/core/home/HomeSplash.js +++ b/website/core/home/HomeSplash.js @@ -21,7 +21,9 @@ class HomeSplash extends React.Component {

{siteConfig.title} - {siteConfig[this.props.language].tagline} + + {siteConfig[this.props.language].tagline} +

@@ -32,8 +34,8 @@ class HomeSplash extends React.Component {
-
{siteConfig.githubButton}
+
+ {siteConfig.githubButton} +
diff --git a/website/core/nav/HeaderNav.js b/website/core/nav/HeaderNav.js index 621faed3ec17..7a8faba56512 100644 --- a/website/core/nav/HeaderNav.js +++ b/website/core/nav/HeaderNav.js @@ -26,7 +26,7 @@ class LanguageDropDown extends React.Component { {lang.name} - + , ); }); @@ -35,7 +35,7 @@ class LanguageDropDown extends React.Component { Help Translate - + , ); return ( @@ -85,13 +85,14 @@ class HeaderNav extends React.Component { makeLinks(link) { link.href = link.href.replace( /\/LANGUAGE\//, - '\/' + this.props.language + '\/' + '/' + this.props.language + '/', ); return (
  • + className={link.section === this.props.section ? 'active' : ''} + > {siteConfig[this.props.language]['localized-strings'][link.text]}
  • @@ -105,7 +106,9 @@ class HeaderNav extends React.Component {
    -

    {this.props.title}

    +

    + {this.props.title} +

    {this.renderResponsiveNav()}
    diff --git a/website/core/nav/SideNav.js b/website/core/nav/SideNav.js index ed3b86c1b1fd..d325d8fd9a05 100644 --- a/website/core/nav/SideNav.js +++ b/website/core/nav/SideNav.js @@ -15,10 +15,14 @@ class SideNav extends React.Component {
    - +

    - {this.props.current.category} + + {this.props.current.category} +

    @@ -43,7 +47,9 @@ class SideNav extends React.Component { renderCategory(category) { return (
    -

    {this.getLocalizedCategoryString(category.name)}

    +

    + {this.getLocalizedCategoryString(category.name)} +

      {category.links.map(this.renderItemLink, this)}
    diff --git a/website/core/toSlug.js b/website/core/toSlug.js index 5365f7bdfc62..830734b368b0 100644 --- a/website/core/toSlug.js +++ b/website/core/toSlug.js @@ -4,33 +4,28 @@ module.exports = string => { // var accents = "àáäâèéëêìíïîòóöôùúüûñç"; - const accents = '\u00e0\u00e1\u00e4\u00e2\u00e8' - + '\u00e9\u00eb\u00ea\u00ec\u00ed\u00ef' - + '\u00ee\u00f2\u00f3\u00f6\u00f4\u00f9' - + '\u00fa\u00fc\u00fb\u00f1\u00e7'; + const accents = + '\u00e0\u00e1\u00e4\u00e2\u00e8' + + '\u00e9\u00eb\u00ea\u00ec\u00ed\u00ef' + + '\u00ee\u00f2\u00f3\u00f6\u00f4\u00f9' + + '\u00fa\u00fc\u00fb\u00f1\u00e7'; const without = 'aaaaeeeeiiiioooouuuunc'; let slug = string .toString() - // Handle uppercase characters .toLowerCase() - // Handle accentuated characters - .replace( - new RegExp('[' + accents + ']', 'g'), - c => { return without.charAt(accents.indexOf(c)); }) - + .replace(new RegExp('[' + accents + ']', 'g'), c => { + return without.charAt(accents.indexOf(c)); + }) // Replace `.`, `(` and `?` with blank string like Github does .replace(/\.|\(|\?/g, '') - // Dash special characters .replace(/[^a-z0-9]/g, '-') - // Compress multiple dash .replace(/-+/g, '-') - // Trim dashes .replace(/^-|-$/g, ''); diff --git a/website/siteConfig.js b/website/siteConfig.js index 98dd8cfebd86..99d7250490d4 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -10,7 +10,8 @@ const githubButton = ( data-count-href="/facebook/jest/stargazers" data-count-api="/repos/facebook/jest#stargazers_count" data-count-aria-label="# stargazers on GitHub" - aria-label="Star facebook/jest on GitHub"> + aria-label="Star facebook/jest on GitHub" + > Star ); diff --git a/website/src/jest/en/help.js b/website/src/jest/en/help.js index a18983fafa51..2e0b8289e1c9 100644 --- a/website/src/jest/en/help.js +++ b/website/src/jest/en/help.js @@ -3,8 +3,7 @@ const React = require('React'); const JestHelp = require('JestHelp'); const help = React.createClass({ render() { - return ; + return ; }, }); module.exports = help; diff --git a/website/src/jest/en/index.js b/website/src/jest/en/index.js index 346e5afa6b99..60b33ad83fbb 100644 --- a/website/src/jest/en/index.js +++ b/website/src/jest/en/index.js @@ -3,8 +3,7 @@ const React = require('React'); const JestIndex = require('JestIndex'); const index = React.createClass({ render() { - return ; + return ; }, }); module.exports = index; diff --git a/website/src/jest/en/users.js b/website/src/jest/en/users.js index 4085bd67e676..1a3385cdcd5a 100644 --- a/website/src/jest/en/users.js +++ b/website/src/jest/en/users.js @@ -3,8 +3,7 @@ const React = require('React'); const JestUsers = require('JestUsers'); const users = React.createClass({ render() { - return ; - }, + return ; + }, }); module.exports = users; diff --git a/yarn.lock b/yarn.lock index 9ab2f1fc43dd..26e746840181 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2131,6 +2131,12 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +eslint-config-prettier@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.3.0.tgz#b75b1eabea0c8b97b34403647ee25db349b9d8a0" + dependencies: + get-stdin "^5.0.1" + eslint-import-resolver-node@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" @@ -2179,6 +2185,13 @@ eslint-plugin-markdown@^1.0.0-beta.6: remark-parse "^3.0.0" unified "^6.1.2" +eslint-plugin-prettier@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.1.2.tgz#4b90f4ee7f92bfbe2e926017e1ca40eb628965ea" + dependencies: + fast-diff "^1.1.1" + jest-docblock "^20.0.1" + eslint-plugin-react@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz#27770acf39f5fd49cd0af4083ce58104eb390d4c" @@ -2373,6 +2386,10 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +fast-diff@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.1.tgz#0aea0e4e605b6a2189f0e936d4b7fbaf1b7cfd9b" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2607,6 +2624,10 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +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" @@ -3301,6 +3322,10 @@ jasmine-reporters@^2.2.0: mkdirp "^0.5.1" xmldom "^0.1.22" +jest-docblock@^20.0.1: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + jodid25519@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"