chore: fix flow linting
This commit is contained in:
parent
c09e826c15
commit
8b95f41c51
|
@ -8,12 +8,14 @@ module.exports = {
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:import/errors',
|
'plugin:import/errors',
|
||||||
'plugin:import/warnings',
|
'plugin:import/warnings',
|
||||||
|
'plugin:flowtype/recommended',
|
||||||
],
|
],
|
||||||
parser: 'babel-eslint',
|
parser: 'babel-eslint',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
ecmaVersion: 8,
|
ecmaVersion: 8,
|
||||||
},
|
},
|
||||||
|
plugins: ['flowtype'],
|
||||||
rules: {
|
rules: {
|
||||||
'no-trailing-spaces': ['error'],
|
'no-trailing-spaces': ['error'],
|
||||||
'import/first': ['error'],
|
'import/first': ['error'],
|
||||||
|
@ -45,6 +47,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
'require-await': ['error'],
|
'require-await': ['error'],
|
||||||
semi: ['error', 'always'],
|
semi: ['error', 'always'],
|
||||||
|
'flowtype/generic-spacing': [0],
|
||||||
},
|
},
|
||||||
|
|
||||||
// Used to lint the TypeScript type declaration file
|
// Used to lint the TypeScript type declaration file
|
||||||
|
|
|
@ -9550,6 +9550,15 @@
|
||||||
"pkg-dir": "^2.0.0"
|
"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": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.20.1",
|
"version": "2.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
"esdoc-standard-plugin": "^1.0.0",
|
"esdoc-standard-plugin": "^1.0.0",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"eslint-config-prettier": "^6.0.0",
|
"eslint-config-prettier": "^6.0.0",
|
||||||
|
"eslint-plugin-flowtype": "^4.6.0",
|
||||||
"eslint-plugin-import": "2.20.1",
|
"eslint-plugin-import": "2.20.1",
|
||||||
"eslint-plugin-jest": "22.19.0",
|
"eslint-plugin-jest": "22.19.0",
|
||||||
"eslint-plugin-prettier": "^3.0.0",
|
"eslint-plugin-prettier": "^3.0.0",
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
import {Client as RpcWebSocketClient} from 'rpc-websockets';
|
import {Client as RpcWebSocketClient} from 'rpc-websockets';
|
||||||
|
|
||||||
// Define TEST_LIVE in the environment to test against the real full node
|
// Define TEST_LIVE in the environment to test against the real full node
|
||||||
|
|
Loading…
Reference in New Issue