From 9d0a17cacc994f067fa4242c96864d5bd1bc90d7 Mon Sep 17 00:00:00 2001 From: vvo Date: Thu, 15 Jun 2017 23:08:03 +0200 Subject: [PATCH] feat(confs): Base, React, Flowtype & Vue confs There are now individual configurations for each type of project. The README has been reformatted to ease setup. I removed direct dependencies and we now enforce the user to install what he needs. The default setup is always: ESLint + prettier Then some custom plugins are used. The way the various config files are written may be a bit weird but I am unsure how multiple extends works (how the order is done) and we need to always have prettier last, so it might sometime be a bit redundant having prettier everywhere, seems to be working still. I'll publish this on the @next tag so you can try it: ```sh yarn add eslint-config-algolia@next --dev ``` Then follow the README --- .eslintrc.js | 2 +- .travis.yml | 2 +- README.md | 181 ++++++++++++++++++---- index.js => base.js | 10 +- flowtype.js | 10 ++ package.json | 31 ++-- react.js | 11 ++ rules.js => rules/base.js | 3 - rules/react.js | 8 + sample-project/.eslintignore | 1 - sample-project/.eslintrc.js | 2 +- sample-project/package.json | 4 + scripts/release.sh | 2 +- scripts/test.sh | 3 +- vue.js | 5 + yarn.lock | 281 ++++++++++++++++------------------- 16 files changed, 332 insertions(+), 224 deletions(-) rename index.js => base.js (61%) create mode 100644 flowtype.js create mode 100644 react.js rename rules.js => rules/base.js (98%) create mode 100644 rules/react.js delete mode 100644 sample-project/.eslintignore create mode 100644 vue.js diff --git a/.eslintrc.js b/.eslintrc.js index 1e12e022..245e84db 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,3 @@ module.exports = { - extends: './index.js', + extends: './base.js', }; diff --git a/.travis.yml b/.travis.yml index 006fd25a..4644be72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js -node_js: "6" +node_js: stable cache: yarn: true directories: diff --git a/README.md b/README.md index be19b25a..8c87d4c2 100644 --- a/README.md +++ b/README.md @@ -2,83 +2,200 @@ [![Version][version-svg]][package-url] [![Build Status][travis-svg]][travis-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] -This is [Algolia](https://www.algolia.com/)'s [ESLint](http://eslint.org/) configuration. +This is [Algolia](https://www.algolia.com/)'s linting and formatting of +JavaScript projects (Vanilla, React, Vue) repository. + +It explains to you how to setup your project to use it and never +worry again about indentation, curly spaces, let vs const etc... + +This code style is only as useful as you activate travis for your project +so that it runs linting in your test phase and warns you. + +Just **focus** on coding. **Table of Contents** -- [Linting (ESLint)](#linting-eslint) -- [Auto formatting staged files](#auto-formatting-staged-files) +- [Setup your project](#setup-your-project) + - [Base requirements](#base-requirements) + - [Vanilla](#vanilla) + - [React](#react) + - [Flow](#flow) + - [Vue](#vue) +- [Existing codebase setup](#existing-codebase-setup) +- [Automatically fixing errors](#automatically-fixing-errors) + - [In your editor](#in-your-editor) + - [Before committing](#before-committing) - [Ignoring files](#ignoring-files) - [Test](#test) - [Release](#release) -## Linting (ESLint) +## Setup your project + +### Base requirements + +```sh +yarn add \ +eslint babel-eslint prettier \ +eslint-config-algolia eslint-config-prettier \ +eslint-plugin-import eslint-plugin-jest eslint-plugin-prettier \ +--dev +``` + +### Vanilla + +**.eslintrc.js** +```js +module.exports = { + extends: 'algolia' +}; +``` + +**package.json** +```json +{ + "scripts": { + "test": "npm run lint", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + } +} +``` + +### React + +**terminal** +```sh +yarn add eslint-plugin-react --dev +``` + +**.eslintrc.js** +```js +module.exports = { + extends: 'algolia/react' +}; +``` + +**package.json** +```json +{ + "scripts": { + "test": "npm run lint", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + } +} +``` -We use linting as a way to ease our development mostly, getting info on a variable being global in your editor -is better than discovering it in production. +### Flow +**terminal** ```sh -yarn add eslint-config-algolia babel-eslint eslint eslint-plugin-import eslint-plugin-jest eslint-config-prettier eslint-plugin-prettier --dev -# if you are using them: -# yarn add eslint-plugin-react --dev -# yarn add eslint-import-resolver-webpack --dev +yarn add eslint-plugin-flowtype --dev ``` -create an `.eslintrc.js` file: +**.eslintrc.js** ```js module.exports = { -  extends: ['algolia'] + extends: 'algolia/flowtype' }; ``` -Then add [an editor plugin](http://eslint.org/docs/user-guide/integrations.html#editors) that will show you linting errors. +### Flow with React -Do activate "fix on save" option of your plugin, it will automatically fix and format your file as much as possible. +**terminal** +```sh +yarn add eslint-plugin-flowtype eslint-plugin-react --dev +``` -## Auto formatting staged files +**.eslintrc.js** +```js +module.exports = { + extends: ['algolia/flowtype', 'algolia/react'] +}; +``` -Please add [Prettier](https://github.com/prettier/prettier) to your JavaScript project, along -with precommit tooling: +**package.json** +```json +{ + "scripts": { + "test": "npm run lint", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + } +} +``` + +### Vue +**terminal** ```sh -yarn add prettier lint-staged husky --dev +yarn add eslint-plugin-html --dev ``` -Then add this to your package.json: +**.eslintrc.js** +```js +module.exports = { + extends: 'algolia/vue' +}; +``` +**package.json** ```json { "scripts": { - "precommit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] + "test": "npm run lint", + "lint": "eslint --ext .js,.vue .", + "lint:fix": "eslint --ext .js,.vue . --fix", } } ``` -This will automatically reformat staged files. Do not use a prettier plugin for your IDE, you only need the ESLint one. +Drawbacks: prettier will format first line of script tags badly, +they are working on it. + +We will soon afterwards switch to good prettier formatting for vue +and proper eslint-plugin-vue. Those are all in the works but +this setup already provides good defaults. + +Please also check "Lint HTML files" in your linter, that should lint +'.vue' files. -### Reformating all files +## Existing codebase setup -When installing linting on an existing project, you might want to reformat all files: +If you have a lot of files already written and wants to now use +our linting tools, you might have a lot of errors. There's hope! +Just reformat all the files automatically and then manually fix remaining +errors. + +**terminal** ```sh -./node_modules/.bin/eslint . --fix +npm run lint:fix ``` +That line is overly complicated, should get easier when prettier new +version is released. + +## Setup autofix in IDE + +Don't overlook this part, autofixing on save is a huge productivity boost. + +Use any [ESLint integration](http://eslint.org/docs/user-guide/integrations) +and activate "Fix on save" option. + +Also activate "Lint HTML files" when dealing with `.vue` components. + ## Ignoring files See "Ignoring Files and Directories" on [ESLint website](http://eslint.org/docs/user-guide/configuring.html#ignoring-files-and-directories). -## Test +## Contibuting + +### Test We have a [sample-project](sample-project). @@ -86,7 +203,7 @@ We have a [sample-project](sample-project). yarn test ``` -## Release +### Release ```sh npm run release diff --git a/index.js b/base.js similarity index 61% rename from index.js rename to base.js index 20cd963f..c6fb8aad 100644 --- a/index.js +++ b/base.js @@ -6,7 +6,7 @@ module.exports = { node: true, jest: true, }, - parser: 'babel-eslint', // https://github.com/babel/babel-eslint#why-use-babel-eslint + parser: 'babel-eslint', // allows both flowtype and static class properties parserOptions: { ecmaVersion: 6, sourceType: 'module', @@ -16,15 +16,13 @@ module.exports = { jsx: true, }, }, - plugins: ['react', 'import', 'jest', 'prettier'], + plugins: ['import', 'jest', 'prettier'], extends: [ 'eslint:recommended', - 'plugin:react/recommended', 'plugin:import/errors', 'plugin:jest/recommended', - './rules.js', - 'prettier', // enforce prettier rules to pass after our rules, so it disables useless rules - 'prettier/react', + './rules/base.js', + 'prettier', ], settings: { 'import/extensions': ['.js'], diff --git a/flowtype.js b/flowtype.js new file mode 100644 index 00000000..3303e162 --- /dev/null +++ b/flowtype.js @@ -0,0 +1,10 @@ +// eslint-disable-next-line import/no-commonjs +module.exports = { + extends: [ + './base.js', + 'plugin:flowtype/recommended', + 'prettier', + 'prettier/flowtype', + ], + plugins: ['flowtype'], +}; diff --git a/package.json b/package.json index 754dad89..f7c1dd66 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,8 @@ "scripts": { "test": "./scripts/test.sh", "release": "./scripts/release.sh", - "precommit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] + "lint": "eslint . --ignore-pattern sample-project", + "lint:fix": "npm run lint -- --fix" }, "keywords": [ "eslint", @@ -20,28 +15,22 @@ "es6", "algolia" ], - "main": "index.js", - "author": "Algolia ", + "main": "base.js", + "author": "Algolia, Inc.", "license": "MIT", "bugs": { "url": "https://github.com/algolia/eslint-config-algolia" }, "homepage": "https://github.com/algolia/eslint-config-algolia", - "dependencies": { - "babel-eslint": "^7.2.3", + "devDependencies": { + "conventional-changelog-cli": "^1.2.0", + "doctoc": "^1.2.0", "eslint": "^4.0.0", + "eslint-config-algolia": "^10.1.0", "eslint-config-prettier": "^2.1.1", "eslint-plugin-import": "^2.3.0", "eslint-plugin-jest": "^20.0.3", - "eslint-plugin-prettier": "^2.1.1", - "eslint-plugin-react": "^7.0.1", - "prettier": "^1.4.4" - }, - "devDependencies": { - "conventional-changelog-cli": "^1.2.0", - "doctoc": "^1.2.0", - "husky": "^0.13.4", - "json": "^9.0.4", - "lint-staged": "^3.6.1" + "eslint-plugin-prettier": "^2.1.2", + "json": "^9.0.4" } } diff --git a/react.js b/react.js new file mode 100644 index 00000000..b12192e8 --- /dev/null +++ b/react.js @@ -0,0 +1,11 @@ +// eslint-disable-next-line import/no-commonjs +module.exports = { + extends: [ + './base.js', + 'plugin:react/recommended', + './rules/react.js', + 'prettier', + 'prettier/react', + ], + plugins: ['react'], +}; diff --git a/rules.js b/rules/base.js similarity index 98% rename from rules.js rename to rules/base.js index 458fb473..5cd39f4a 100644 --- a/rules.js +++ b/rules/base.js @@ -257,9 +257,6 @@ module.exports = { 'template-curly-spacing': ['error'], 'yield-star-spacing': ['error'], - 'react/no-danger': ['off'], - 'react/display-name': ['off'], - 'react/jsx-key': ['error'], 'import/no-amd': ['error'], 'import/no-commonjs': ['error'], 'import/no-extraneous-dependencies': ['error'], diff --git a/rules/react.js b/rules/react.js new file mode 100644 index 00000000..cfd9e226 --- /dev/null +++ b/rules/react.js @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/no-commonjs +module.exports = { + rules: { + 'react/no-danger': ['off'], + 'react/display-name': ['off'], + 'react/jsx-key': ['error'], + }, +}; diff --git a/sample-project/.eslintignore b/sample-project/.eslintignore deleted file mode 100644 index 2ccbe465..00000000 --- a/sample-project/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/sample-project/.eslintrc.js b/sample-project/.eslintrc.js index 21b387d4..d719e1df 100644 --- a/sample-project/.eslintrc.js +++ b/sample-project/.eslintrc.js @@ -1,3 +1,3 @@ module.exports = { - extends: '../index.js' + extends: '../react.js' } diff --git a/sample-project/package.json b/sample-project/package.json index ae1c8019..39ec1582 100644 --- a/sample-project/package.json +++ b/sample-project/package.json @@ -5,6 +5,10 @@ "main": "index.js", "private": true, "keywords": [], + "scripts": { + "lint": "eslint .", + "lint:fix": "eslint . --fix" + }, "author": "Algolia (https://github.com/algolia/)", "license": "MIT", "dependencies": { diff --git a/scripts/release.sh b/scripts/release.sh index 1db8e201..1d7d2981 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -47,7 +47,7 @@ read -e newVersion # regenerate readme TOC printf "\n\nRelease: generate TOCS" -doctoc README.md --maxlevel 2 +doctoc README.md --maxlevel 3 npm version "$newVersion" --no-git-tag-version diff --git a/scripts/test.sh b/scripts/test.sh index d572f6fa..e2a7bd2e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,6 +2,7 @@ set -e # exit when error +yarn lint cd sample-project yarn -eslint . +yarn lint diff --git a/vue.js b/vue.js new file mode 100644 index 00000000..5db13830 --- /dev/null +++ b/vue.js @@ -0,0 +1,5 @@ +// eslint-disable-next-line import/no-commonjs +module.exports = { + extends: ['./base.js', 'prettier'], + plugins: ['html'], +}; diff --git a/yarn.lock b/yarn.lock index 1b020667..b8e9ce32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,8 +32,8 @@ ajv-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0: - version "4.11.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" + 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" @@ -139,40 +139,36 @@ babel-runtime@^6.22.0: regenerator-runtime "^0.10.0" babel-traverse@^6.23.1: - version "6.23.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" dependencies: babel-code-frame "^6.22.0" babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.23.0" - babylon "^6.15.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-types@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" +babel-types@^6.23.0, babel-types@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" dependencies: babel-runtime "^6.22.0" esutils "^2.0.2" lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.15.0, babylon@^6.17.0: - version "6.17.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" +babylon@^6.17.0, babylon@^6.17.2: + version "6.17.3" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.3.tgz#1327d709950b558f204e5352587fd0290f8d8e48" bail@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.1.tgz#912579de8b391aadf3c5fdf4cd2a0fc225df3bc2" -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -181,13 +177,6 @@ boundary@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/boundary/-/boundary-1.0.1.tgz#4d67dc2602c0cc16dd9bce7ebf87e948290f5812" -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" @@ -195,10 +184,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -buffer-shims@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -349,9 +334,9 @@ contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" -conventional-changelog-angular@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.3.3.tgz#e7ce807a85dd4750e1b417f766045497511e0726" +conventional-changelog-angular@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.3.4.tgz#7d7cdfbd358948312904d02229a61fd6075cf455" dependencies: compare-func "^1.3.1" github-url-from-git "^1.4.0" @@ -379,9 +364,9 @@ conventional-changelog-codemirror@^0.1.0: dependencies: q "^1.4.1" -conventional-changelog-core@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.8.0.tgz#977848b416caf15fb09f20b12a62d40ef145b957" +conventional-changelog-core@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" dependencies: conventional-changelog-writer "^1.1.0" conventional-commits-parser "^1.0.0" @@ -397,9 +382,9 @@ conventional-changelog-core@^1.8.0: read-pkg-up "^1.0.1" through2 "^2.0.0" -conventional-changelog-ember@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.5.tgz#ce21d5cf83cd5ebe05d23fdf232d8844f4b56a4f" +conventional-changelog-ember@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" dependencies: q "^1.4.1" @@ -450,14 +435,14 @@ conventional-changelog-writer@^1.1.0: through2 "^2.0.0" conventional-changelog@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.3.tgz#26283078ac38c094df2af1604b0a46bbc0165c4d" + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" dependencies: - conventional-changelog-angular "^1.3.3" + conventional-changelog-angular "^1.3.4" conventional-changelog-atom "^0.1.0" conventional-changelog-codemirror "^0.1.0" - conventional-changelog-core "^1.8.0" - conventional-changelog-ember "^0.2.5" + conventional-changelog-core "^1.9.0" + conventional-changelog-ember "^0.2.6" conventional-changelog-eslint "^0.1.0" conventional-changelog-express "^0.1.0" conventional-changelog-jquery "^0.1.0" @@ -525,8 +510,8 @@ dargs@^4.0.1: number-is-nan "^1.0.0" date-fns@^1.27.2: - version "1.28.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.0.tgz#3b12f54b66467807bb95e5930caf7bfb4170bc1a" + version "1.28.5" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" dateformat@^1.0.11, dateformat@^1.0.12: version "1.0.12" @@ -541,13 +526,7 @@ debug@2.2.0: dependencies: ms "0.7.1" -debug@^2.1.3, debug@^2.2.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" - dependencies: - ms "0.7.2" - -debug@^2.6.8: +debug@^2.1.3, debug@^2.2.0, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -614,14 +593,14 @@ domelementtype@~1.1.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" domhandler@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + version "2.4.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" dependencies: domelementtype "1" domutils@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + version "1.6.2" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.6.2.tgz#1958cc0b4c9426e9ed367fb1c8e854891b0fa3ff" dependencies: dom-serializer "0" domelementtype "1" @@ -654,6 +633,19 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +eslint-config-algolia@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-algolia/-/eslint-config-algolia-10.1.0.tgz#cc986e596011dd5915570c6869b1bb5dac15124e" + dependencies: + babel-eslint "^7.2.3" + eslint "^4.0.0" + eslint-config-prettier "^2.1.1" + eslint-plugin-import "^2.3.0" + eslint-plugin-jest "^20.0.3" + eslint-plugin-prettier "^2.1.1" + eslint-plugin-react "^7.0.1" + prettier "^1.4.4" + eslint-config-prettier@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.1.1.tgz#ab3923fb704eebecab6960906b7d0d6e801cde58" @@ -694,20 +686,20 @@ eslint-plugin-jest@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-20.0.3.tgz#ec15eba6ac0ab44a67ebf6e02672ca9d7e7cba29" -eslint-plugin-prettier@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.1.1.tgz#2fb7e2ab961f2b61d2c8cf91bc17716ca8c53868" +eslint-plugin-prettier@^2.1.1, 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.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.0.1.tgz#e78107e1e559c6e2b17786bb67c2e2a010ad0d2f" + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz#27770acf39f5fd49cd0af4083ce58104eb390d4c" dependencies: doctrine "^2.0.0" has "^1.0.1" - jsx-ast-utils "^1.3.4" + jsx-ast-utils "^1.4.1" eslint-scope@^3.7.1: version "3.7.1" @@ -806,8 +798,8 @@ exit-hook@^1.0.0: resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" extend@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" external-editor@^2.0.4: version "2.0.4" @@ -945,18 +937,7 @@ github-url-from-git@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" -glob@^7.0.3, glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -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: @@ -967,11 +948,7 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0: - version "9.16.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" - -globals@^9.17.0: +globals@^9.0.0, globals@^9.17.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -995,8 +972,8 @@ graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" handlebars@^4.0.2: - version "4.0.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -1017,8 +994,8 @@ has@^1.0.1: function-bind "^1.0.2" hosted-git-info@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.2.0.tgz#7a0d097863d886c0fabbdcd37bf1758d8becf8a5" + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" htmlparser2@~3.9.2: version "3.9.2" @@ -1041,8 +1018,8 @@ husky@^0.13.4: normalize-path "^1.0.0" iconv-lite@^0.4.17: - version "0.4.17" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.17.tgz#4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d" + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" ignore@^3.3.3: version "3.3.3" @@ -1117,7 +1094,7 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" -is-buffer@^1.0.2: +is-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" @@ -1222,9 +1199,9 @@ isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isexe@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" jest-docblock@^20.0.1: version "20.0.3" @@ -1234,14 +1211,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.4.3: - version "3.8.2" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" - -js-yaml@^3.8.4: +js-yaml@^3.4.3, js-yaml@^3.8.4: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: @@ -1271,24 +1241,22 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" jsonparse@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.0.tgz#85fc245b1d9259acc6941960b905adf64e7de0e8" + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" -jsx-ast-utils@^1.3.4: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.0.tgz#5afe38868f56bc8cc7aeaef0100ba8c75bd12591" - dependencies: - object-assign "^4.1.0" +jsx-ast-utils@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" kind-of@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: - is-buffer "^1.0.2" + is-buffer "^1.1.5" lazy-cache@^1.0.3: version "1.0.4" @@ -1452,11 +1420,11 @@ loud-rejection@^1.0.0: signal-exit "^3.0.0" lru-cache@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" + pseudomap "^1.0.2" + yallist "^2.1.2" map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" @@ -1494,19 +1462,13 @@ mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.4: +minimatch@^3.0.0, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 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" @@ -1514,6 +1476,10 @@ minimist@^1.1.3, minimist@^1.2.0, 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: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -1528,10 +1494,6 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -ms@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -1545,8 +1507,8 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -1756,13 +1718,13 @@ progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" -pseudomap@^1.0.1: +pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" q@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" read-pkg-up@^1.0.1: version "1.0.1" @@ -1795,15 +1757,15 @@ read-pkg@^2.0.0: path-type "^2.0.0" readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2: - version "2.2.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" + version "2.2.11" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.11.tgz#0796b31f8d7688007ff0b93a8088d34aa17c0f72" dependencies: - buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~0.10.x" + safe-buffer "~5.0.1" + string_decoder "~1.0.0" util-deprecate "~1.0.1" redent@^1.0.0: @@ -1814,8 +1776,8 @@ redent@^1.0.0: strip-indent "^1.0.1" regenerator-runtime@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" remark-parse@^1.1.0: version "1.1.0" @@ -1878,8 +1840,8 @@ resolve-from@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" resolve@^1.1.6: - version "1.3.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: path-parse "^1.0.5" @@ -1926,11 +1888,15 @@ rx-lite@*, rx-lite@^4.0.8: resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" rxjs@^5.0.0-beta.11: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.2.0.tgz#db537de8767c05fa73721587a29e0085307d318b" + version "5.4.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626" dependencies: symbol-observable "^1.0.1" +safe-buffer@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + "semver@2 || 3 || 4 || 5", semver@^5.0.1: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -2016,9 +1982,11 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" +string_decoder@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.2.tgz#b29e1f4e1125fa97a10382b8a533737b7491e179" + dependencies: + safe-buffer "~5.0.1" stringify-entities@^1.0.1: version "1.3.0" @@ -2093,8 +2061,8 @@ tempfile@^1.1.1: uuid "^2.0.1" text-extensions@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.4.0.tgz#c385d2e80879fe6ef97893e1709d88d9453726e9" + version "1.5.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" text-table@~0.2.0: version "0.2.0" @@ -2118,8 +2086,8 @@ tmp@^0.0.31: os-tmpdir "~1.0.1" to-fast-properties@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" traverse@^0.6.6: version "0.6.6" @@ -2160,12 +2128,13 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@^2.6: - version "2.8.13" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.13.tgz#d0cdf02f3c661484fac601b7e723207b735a374c" + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: source-map "~0.5.1" - uglify-to-browserify "~1.0.0" yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" uglify-to-browserify@~1.0.0: version "1.0.2" @@ -2194,14 +2163,14 @@ unified@^4.1.1: vfile "^1.0.0" unist-util-remove-position@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.0.tgz#2444fedc344bc5f540dab6353e013b6d78101dc2" + version "1.1.1" + resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz#5a85c1555fc1ba0c101b86707d15e50fa4c871bb" dependencies: unist-util-visit "^1.1.0" unist-util-visit@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.1.1.tgz#e917a3b137658b335cb4420c7da2e74d928e4e94" + version "1.1.3" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.1.3.tgz#ec268e731b9d277a79a5b5aa0643990e405d600b" update-section@^0.3.0: version "0.3.3" @@ -2231,10 +2200,10 @@ vfile@^1.0.0: resolved "https://registry.yarnpkg.com/vfile/-/vfile-1.4.0.tgz#c0fd6fa484f8debdb771f68c31ed75d88da97fe7" which@^1.2.10, which@^1.2.9: - version "1.2.12" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: - isexe "^1.1.1" + isexe "^2.0.0" window-size@0.1.0: version "0.1.0" @@ -2266,7 +2235,7 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" -yallist@^2.0.0: +yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"