chore: fix flow linting

This commit is contained in:
Justin Starry 2020-02-28 17:45:57 +08:00 committed by Michael Vines
parent c09e826c15
commit 8b95f41c51
4 changed files with 15 additions and 0 deletions

View File

@ -8,12 +8,14 @@ module.exports = {
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:flowtype/recommended',
],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaVersion: 8,
},
plugins: ['flowtype'],
rules: {
'no-trailing-spaces': ['error'],
'import/first': ['error'],
@ -45,6 +47,7 @@ module.exports = {
],
'require-await': ['error'],
semi: ['error', 'always'],
'flowtype/generic-spacing': [0],
},
// Used to lint the TypeScript type declaration file

View File

@ -9550,6 +9550,15 @@
"pkg-dir": "^2.0.0"
}
},
"eslint-plugin-flowtype": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.6.0.tgz",
"integrity": "sha512-W5hLjpFfZyZsXfo5anlu7HM970JBDqbEshAJUkeczP6BFCIfJXuiIBQXyberLRtOStT0OGPF8efeTbxlHk4LpQ==",
"dev": true,
"requires": {
"lodash": "^4.17.15"
}
},
"eslint-plugin-import": {
"version": "2.20.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",

View File

@ -107,6 +107,7 @@
"esdoc-standard-plugin": "^1.0.0",
"eslint": "6.8.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-flowtype": "^4.6.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jest": "22.19.0",
"eslint-plugin-prettier": "^3.0.0",

View File

@ -1,3 +1,5 @@
// @flow
import {Client as RpcWebSocketClient} from 'rpc-websockets';
// Define TEST_LIVE in the environment to test against the real full node