diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-07-18 11:13:29 +0100 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-07-20 09:26:35 +0200 |
| commit | e55f701d98cb873168212bf14a3b7cf4f91cad0d (patch) | |
| tree | 1e2b1359e129fab98716b9149415d4cb8df8085a | |
| parent | 697832619aab799faf7930b7f2e8c894b9f01f6d (diff) | |
| download | mullvadvpn-e55f701d98cb873168212bf14a3b7cf4f91cad0d.tar.xz mullvadvpn-e55f701d98cb873168212bf14a3b7cf4f91cad0d.zip | |
- Replace magic numbers with corresponding string options
- Enforce comma-spacing rule
| -rw-r--r-- | .eslintrc | 31 | ||||
| -rw-r--r-- | app/main.js | 2 | ||||
| -rw-r--r-- | test/login.spec.js | 2 |
3 files changed, 18 insertions, 17 deletions
@@ -12,22 +12,23 @@ }, "plugins": [ "react", "flowtype" ], "rules": { - "indent": [ 2, 2 ], - "quotes": [ 2, "single" ], - "linebreak-style": [ 2, "unix" ], + "indent": [ "error", 2 ], + "quotes": [ "error", "single" ], + "linebreak-style": [ "error", "unix" ], "semi": [ 2, "always" ], - "no-console": [ 0 ], - "no-loop-func": [ 0 ], - "new-cap": [ 0 ], - "no-trailing-spaces": [ 2, { "skipBlankLines": true } ], - "no-param-reassign": [ 0 ], - "func-names": [ 0 ], - "comma-dangle": [ 0 ], - "no-unused-expressions" : [ 0 ], // until fixed https://github.com/babel/babel-eslint/issues/158 - "no-unused-vars": ["error", {"args": all, "argsIgnorePattern": "_.*"}], - "block-scoped-var": [ 0 ], // until fixed https://github.com/eslint/eslint/issues/2253 - "react/prop-types": [ 0 ], - "flowtype/define-flow-type": 1 + "no-console": "off", + "no-loop-func": "warn", + "new-cap": "off", + "no-trailing-spaces": [ "error", { "skipBlankLines": true } ], + "no-param-reassign": "warn", + "func-names": "off", + "comma-dangle": "off", + "comma-spacing": "warn", + "no-unused-expressions" : "off", // until fixed https://github.com/babel/babel-eslint/issues/158 + "no-unused-vars": ["error", {"args": "all", "argsIgnorePattern": "_.*"}], + "block-scoped-var": "off", // until fixed https://github.com/eslint/eslint/issues/2253 + "react/prop-types": "off", + "flowtype/define-flow-type": "warn" }, "env": { "es6": true, diff --git a/app/main.js b/app/main.js index ec148ac5c7..c3e6d1cca9 100644 --- a/app/main.js +++ b/app/main.js @@ -175,7 +175,7 @@ const appDelegate = { log.debug('Reading the ipc connection info from', rpcAddressFile); - fs.readFile(rpcAddressFile, 'utf8', function (err,data) { + fs.readFile(rpcAddressFile, 'utf8', function (err, data) { if (err) { return log.error('Could not find backend connection info', err); } diff --git a/test/login.spec.js b/test/login.spec.js index f220eb25a7..950205804c 100644 --- a/test/login.spec.js +++ b/test/login.spec.js @@ -49,7 +49,7 @@ describe('Logging in', () => { it('should indicate failure for non-existing accounts', (done) => { const { store, mockIpc, backend } = setupBackendAndStore(); - mockIpc.getAccountData = (_num) => new Promise((_,reject) => { + mockIpc.getAccountData = (_num) => new Promise((_, reject) => { reject('NO SUCH ACCOUNT'); }); |
