From fc32623fce1eba7fb304d332aca8bf5bdb629453 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Thu, 28 Jul 2016 19:55:46 +0100 Subject: [PATCH] Replace eslint-plugin-flow-vars with eslint-plugin-flowtype This is the one people are converging on, and flow-vars may get deprecated. --- config/eslint.js | 9 +++++---- package.json | 2 +- template/README.md | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/eslint.js b/config/eslint.js index 47c3064d2..5d6831b82 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -22,7 +22,7 @@ module.exports = { parser: 'babel-eslint', // import plugin is termporarily disabled, scroll below to see why - plugins: [/*'import', */'flow-vars', 'jsx-a11y', 'react'], + plugins: [/*'import', */'flowtype', 'jsx-a11y', 'react'], env: { browser: true, @@ -197,8 +197,9 @@ module.exports = { 'jsx-a11y/img-redundant-alt': 'warn', 'jsx-a11y/no-access-key': 'warn', - // https://github.com/zertosh/eslint-plugin-flow-vars - 'flow-vars/define-flow-type': 'warn', - 'flow-vars/use-flow-type': 'warn' + // https://github.com/gajus/eslint-plugin-flowtype + 'flowtype/define-flow-type': 'warn', + 'flowtype/require-valid-file-annotation': 'warn', + 'flowtype/use-flow-type': 'warn' } }; diff --git a/package.json b/package.json index c4999d125..fd023afb2 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "detect-port": "0.1.4", "eslint": "3.1.1", "eslint-loader": "1.4.1", - "eslint-plugin-flow-vars": "0.5.0", + "eslint-plugin-flowtype": "2.4.0", "eslint-plugin-import": "1.12.0", "eslint-plugin-jsx-a11y": "2.0.1", "eslint-plugin-react": "5.2.2", diff --git a/template/README.md b/template/README.md index f41620b59..6572a1091 100644 --- a/template/README.md +++ b/template/README.md @@ -257,7 +257,7 @@ If you don’t need ESLint integration with your editor, you can safely delete t Finally, you will need to install some packages *globally*: ```sh -npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flow-vars +npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype ``` We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months. -- GitLab