Skip to content

Commit e750c14

Browse files
author
John Conway
committed
Added eslint
1 parent 57d6bad commit e750c14

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
parser: 'babel-eslint',
3+
env: {
4+
browser: true,
5+
es6: true,
6+
jest: true,
7+
},
8+
extends: 'eslint:recommended',
9+
globals: {
10+
Atomics: 'readonly',
11+
SharedArrayBuffer: 'readonly',
12+
},
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
ecmaVersion: 2018,
18+
sourceType: 'module',
19+
},
20+
plugins: ['react'],
21+
rules: {},
22+
};

src/client/client.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import client from './client';
2+
// Require get request import for mocks to work
3+
// eslint-disable-next-line no-unused-vars
24
import getRequest from './getRequest';
35

46
// SEE __mocks__/getRequest for which endpoint paths result in what types of

src/client/createClient.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import createClient from './createClient';
2+
// Require get request import for mocks to work
3+
// eslint-disable-next-line no-unused-vars
24
import getRequest from './getRequest';
35

46
// SEE __mocks__/getRequest for which endpoint paths result in what types of

src/client/getRequest.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ const getRequest = path =>
88
if (response === null) {
99
return throwError('API Timed out', response);
1010
}
11-
console.log('api response: ', response);
1211
return response;
1312
}),
1413
catchError(error => {
15-
console.log(error);
16-
console.error('api error: ', error.response);
1714
return of(error);
1815
}),
1916
);
File renamed without changes.

0 commit comments

Comments
 (0)