diff --git a/evm/src/helpersV2.ts b/evm/src/helpersV2.ts index 308fb06a217..a142b3235b3 100644 --- a/evm/src/helpersV2.ts +++ b/evm/src/helpersV2.ts @@ -242,7 +242,7 @@ export function decodeRunRequest(log?: ethers.providers.Log): RunRequest { id: toHex(requestId), jobId: log.topics[1], payment: toHex(payment), - requester: requester, + requester, topic: log.topics[0], } } diff --git a/explorer/client/src/__tests__/reducers/jobRuns.test.ts b/explorer/client/src/__tests__/reducers/jobRuns.test.ts index de9d1e6340a..e0305eebb93 100644 --- a/explorer/client/src/__tests__/reducers/jobRuns.test.ts +++ b/explorer/client/src/__tests__/reducers/jobRuns.test.ts @@ -38,7 +38,7 @@ describe('reducers/jobRuns', () => { }) const action: FetchJobRunsSucceededAction = { type: 'FETCH_JOB_RUNS_SUCCEEDED', - data: data, + data, } const state = reducer(INITIAL_STATE, action) @@ -66,7 +66,7 @@ describe('reducers/jobRuns', () => { }) const action: FetchJobRunSucceededAction = { type: 'FETCH_JOB_RUN_SUCCEEDED', - data: data, + data, } const state = reducer(INITIAL_STATE, action) diff --git a/explorer/client/src/__tests__/reducers/jobRunsIndex.test.ts b/explorer/client/src/__tests__/reducers/jobRunsIndex.test.ts index 29046c0f1d1..57af2219086 100644 --- a/explorer/client/src/__tests__/reducers/jobRunsIndex.test.ts +++ b/explorer/client/src/__tests__/reducers/jobRunsIndex.test.ts @@ -22,7 +22,7 @@ describe('reducers/jobRunsIndex', () => { type: 'FETCH_JOB_RUNS_SUCCEEDED', data: { chainlinkNodes: [], - jobRuns: jobRuns, + jobRuns, meta: { currentPageJobRuns: { data: jobRuns, @@ -51,7 +51,7 @@ describe('reducers/jobRunsIndex', () => { }) const action: FetchJobRunSucceededAction = { type: 'FETCH_JOB_RUN_SUCCEEDED', - data: data, + data, } const state = reducer(INITIAL_STATE, action) diff --git a/explorer/client/src/__tests__/utils/status.test.ts b/explorer/client/src/__tests__/utils/status.test.ts index e999530f346..be187e28c38 100644 --- a/explorer/client/src/__tests__/utils/status.test.ts +++ b/explorer/client/src/__tests__/utils/status.test.ts @@ -18,7 +18,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITHOUT_STATUS] const jobRun = partialAsFull({ status: 'in_progress', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) @@ -30,7 +30,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITH_STATUS] const jobRun = partialAsFull({ status: 'in_progress', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) @@ -50,7 +50,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITHOUT_STATUS] const jobRun = partialAsFull({ status: 'error', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) @@ -62,7 +62,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITH_STATUS] const jobRun = partialAsFull({ status: 'error', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) @@ -82,7 +82,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITHOUT_STATUS] const jobRun = partialAsFull({ status: 'completed', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) @@ -94,7 +94,7 @@ describe('utils/status', () => { const taskRuns: TaskRun[] = [COMPLETED_ETHTX_WITH_STATUS] const jobRun = partialAsFull({ status: 'completed', - taskRuns: taskRuns, + taskRuns, }) const [text, unfulfilledEthTx] = status(jobRun) diff --git a/explorer/client/src/actions/helpers.ts b/explorer/client/src/actions/helpers.ts index cd3c2b68230..14e27234ee8 100644 --- a/explorer/client/src/actions/helpers.ts +++ b/explorer/client/src/actions/helpers.ts @@ -68,7 +68,7 @@ export function request< } else { dispatch({ type: 'NOTIFY_ERROR', - error: error, + error, }) } }) diff --git a/explorer/src/controllers/admin/nodes.ts b/explorer/src/controllers/admin/nodes.ts index 58f36ed678f..f19411a200f 100644 --- a/explorer/src/controllers/admin/nodes.ts +++ b/explorer/src/controllers/admin/nodes.ts @@ -41,7 +41,7 @@ router.post('/nodes', async (req, res) => { return res.status(httpStatus.CREATED).json({ id: savedNode.id, accessKey: savedNode.accessKey, - secret: secret, + secret, }) } catch (e) { if ( diff --git a/explorer/src/controllers/jobRuns.ts b/explorer/src/controllers/jobRuns.ts index 75d6f948e89..64e6597cfa8 100644 --- a/explorer/src/controllers/jobRuns.ts +++ b/explorer/src/controllers/jobRuns.ts @@ -17,7 +17,7 @@ const searchParams = (req: Request): SearchParams => { return { searchQuery: req.query.query, - page: page, + page, limit: size, } } diff --git a/explorer/src/entity/ChainlinkNode.ts b/explorer/src/entity/ChainlinkNode.ts index 9ebfbcc2c53..8a4d805921c 100644 --- a/explorer/src/entity/ChainlinkNode.ts +++ b/explorer/src/entity/ChainlinkNode.ts @@ -106,7 +106,7 @@ export const deleteChainlinkNode = async (db: Connection, name: string) => { .delete() .from(ChainlinkNode) .where('name = :name', { - name: name, + name, }) .execute() } diff --git a/explorer/src/serializers/chainlinkNodesSerializer.ts b/explorer/src/serializers/chainlinkNodesSerializer.ts index 362fec4b39b..f9957e4b121 100644 --- a/explorer/src/serializers/chainlinkNodesSerializer.ts +++ b/explorer/src/serializers/chainlinkNodesSerializer.ts @@ -12,7 +12,7 @@ const chainlinkNodesSerializer = ( const opts = { attributes: BASE_ATTRIBUTES, keyForAttribute: 'camelCase', - meta: { count: count }, + meta: { count }, } as SerializerOptions return new JSONAPISerializer('chainlink_nodes', opts).serialize( diff --git a/explorer/src/serializers/jobRunsSerializer.ts b/explorer/src/serializers/jobRunsSerializer.ts index e5b21fe8e61..a1b1c20ac26 100644 --- a/explorer/src/serializers/jobRunsSerializer.ts +++ b/explorer/src/serializers/jobRunsSerializer.ts @@ -8,7 +8,7 @@ import { BASE_ATTRIBUTES, chainlinkNode } from './jobRunSerializer' const jobRunsSerializer = (runs: JobRun[], runCount: number) => { const opts = { attributes: BASE_ATTRIBUTES, - chainlinkNode: chainlinkNode, + chainlinkNode, keyForAttribute: 'camelCase', meta: { count: runCount }, } as SerializerOptions diff --git a/operator_ui/__tests__/connectors/reducers/notifications.test.js b/operator_ui/__tests__/connectors/reducers/notifications.test.js index 894f1fae76d..477d37ada0d 100644 --- a/operator_ui/__tests__/connectors/reducers/notifications.test.js +++ b/operator_ui/__tests__/connectors/reducers/notifications.test.js @@ -72,12 +72,12 @@ describe('connectors/reducers/notifications', () => { const component = () => {} const props = {} - const action = { type: NOTIFY_SUCCESS, component: component, props: props } + const action = { type: NOTIFY_SUCCESS, component, props } const state = reducer(previousState, action) expect(state.notifications).toEqual({ errors: [], - successes: [{ component: component, props: props }], + successes: [{ component, props }], currentUrl: null, }) }) @@ -95,12 +95,12 @@ describe('connectors/reducers/notifications', () => { const error = { errors: [{ detail: 'Error 1' }, { detail: 'Error 2' }], } - const action = { type: NOTIFY_ERROR, component: component, error: error } + const action = { type: NOTIFY_ERROR, component, error } const state = reducer(previousState, action) expect(state.notifications.errors).toEqual([ - { component: component, props: { msg: 'Error 1' } }, - { component: component, props: { msg: 'Error 2' } }, + { component, props: { msg: 'Error 1' } }, + { component, props: { msg: 'Error 2' } }, ]) }) @@ -114,11 +114,11 @@ describe('connectors/reducers/notifications', () => { const component = () => {} const error = { message: 'Single Error' } - const action = { type: NOTIFY_ERROR, component: component, error: error } + const action = { type: NOTIFY_ERROR, component, error } const state = reducer(previousState, action) expect(state.notifications.errors).toEqual([ - { component: component, props: { msg: 'Single Error' } }, + { component, props: { msg: 'Single Error' } }, ]) }) @@ -132,7 +132,7 @@ describe('connectors/reducers/notifications', () => { const component = () => {} const error = {} - const action = { type: NOTIFY_ERROR, component: component, error: error } + const action = { type: NOTIFY_ERROR, component, error } const state = reducer(previousState, action) expect(state.notifications.errors).toEqual([{}]) @@ -148,7 +148,7 @@ describe('connectors/reducers/notifications', () => { const component = () => {} const error = {} - const action = { type: NOTIFY_ERROR, component: component, error: error } + const action = { type: NOTIFY_ERROR, component, error } const state = reducer(previousState, action) expect(state.notifications.successes).toEqual([]) diff --git a/operator_ui/__tests__/containers/JobRuns/Index.test.js b/operator_ui/__tests__/containers/JobRuns/Index.test.js index a7ea2713ab4..28e241cb476 100644 --- a/operator_ui/__tests__/containers/JobRuns/Index.test.js +++ b/operator_ui/__tests__/containers/JobRuns/Index.test.js @@ -35,7 +35,7 @@ describe('containers/JobRuns/Index', () => { const runsResponse = jsonApiJobSpecRunFactory([{ jobId: jobSpecId }]) global.fetch.getOnce(globPath('/v2/runs'), runsResponse) - const props = { match: { params: { jobSpecId: jobSpecId } } } + const props = { match: { params: { jobSpecId } } } const wrapper = mountIndex(props) await syncFetch(wrapper) @@ -52,7 +52,7 @@ describe('containers/JobRuns/Index', () => { ) global.fetch.getOnce(globPath('/v2/runs'), pageOneResponse) - const props = { match: { params: { jobSpecId: jobSpecId } }, pageSize: 1 } + const props = { match: { params: { jobSpecId } }, pageSize: 1 } const wrapper = mountIndex(props) await syncFetch(wrapper) @@ -104,7 +104,7 @@ describe('containers/JobRuns/Index', () => { const runsResponse = jsonApiJobSpecRunFactory([]) await global.fetch.getOnce(globPath('/v2/runs'), runsResponse) - const props = { match: { params: { jobSpecId: jobSpecId } } } + const props = { match: { params: { jobSpecId } } } const wrapper = mountIndex(props) await syncFetch(wrapper) diff --git a/operator_ui/__tests__/containers/JobRuns/Show/Overview.test.js b/operator_ui/__tests__/containers/JobRuns/Show/Overview.test.js index 786343305b5..ef42d6d07ab 100644 --- a/operator_ui/__tests__/containers/JobRuns/Show/Overview.test.js +++ b/operator_ui/__tests__/containers/JobRuns/Show/Overview.test.js @@ -52,7 +52,7 @@ describe('containers/JobRuns/Show/Overview', () => { global.fetch.getOnce(globPath(`/v2/runs/${jobRunId}`), jobRunResponse) const props = { - match: { params: { jobSpecId: jobSpecId, jobRunId: jobRunId } }, + match: { params: { jobSpecId, jobRunId } }, } const wrapper = mountShow(props) diff --git a/operator_ui/__tests__/containers/Jobs/Show.test.js b/operator_ui/__tests__/containers/Jobs/Show.test.js index 5a1790fa9b1..9822643608b 100644 --- a/operator_ui/__tests__/containers/Jobs/Show.test.js +++ b/operator_ui/__tests__/containers/Jobs/Show.test.js @@ -45,7 +45,7 @@ describe('containers/Jobs/Show', () => { ]) global.fetch.getOnce(globPath('/v2/runs'), jobRunResponse) - const props = { match: { params: { jobSpecId: jobSpecId } } } + const props = { match: { params: { jobSpecId } } } const wrapper = mountShow(props) await syncFetch(wrapper) @@ -75,7 +75,7 @@ describe('containers/Jobs/Show', () => { global.fetch.getOnce(globPath(`/v2/specs/${jobSpecId}`), jobSpecResponse) global.fetch.getOnce(globPath('/v2/runs'), jobRunsResponse) - const props = { match: { params: { jobSpecId: jobSpecId } } } + const props = { match: { params: { jobSpecId } } } const wrapper = mountShow(props) await syncFetch(wrapper) diff --git a/operator_ui/__tests__/containers/Notifications.test.js b/operator_ui/__tests__/containers/Notifications.test.js index 4b77dfac440..51696e88f5d 100644 --- a/operator_ui/__tests__/containers/Notifications.test.js +++ b/operator_ui/__tests__/containers/Notifications.test.js @@ -31,8 +31,8 @@ describe('containers/Notifications', () => { ] const state = { notifications: { - successes: successes, - errors: errors, + successes, + errors, currentUrl: null, }, } diff --git a/operator_ui/src/actions.ts b/operator_ui/src/actions.ts index 2458e996170..977aa5178c4 100644 --- a/operator_ui/src/actions.ts +++ b/operator_ui/src/actions.ts @@ -19,10 +19,10 @@ type Errors = | jsonapi.ServerError | jsonapi.UnknownResponseError -const createAction = (type: string) => ({ type: type }) +const createAction = (type: string) => ({ type }) const createErrorAction = (error: Error, type: string) => ({ - type: type, + type, error: error.stack, }) @@ -56,7 +56,7 @@ interface Match { export const matchRoute = (match: Match) => { return { type: RouterActionType.MATCH_ROUTE, - match: match, + match, } } @@ -65,8 +65,8 @@ export const NOTIFY_SUCCESS = 'NOTIFY_SUCCESS' export const notifySuccess = (component: React.ReactNode, props: object) => { return { type: NOTIFY_SUCCESS, - component: component, - props: props, + component, + props, } } @@ -74,8 +74,8 @@ export const NOTIFY_ERROR = 'NOTIFY_ERROR' export const notifyError = (component: React.ReactNode, error: Error) => ({ type: NOTIFY_ERROR, - component: component, - error: error, + component, + error, }) export const REQUEST_SIGNIN = 'REQUEST_SIGNIN' @@ -161,7 +161,7 @@ export const RECEIVE_DELETE_ERROR = 'RECEIVE_DELETE_ERROR' const receiveDeleteSuccess = (id: string) => ({ type: RECEIVE_DELETE_SUCCESS, - id: id, + id, }) export const REQUEST_UPDATE = 'REQUEST_UPDATE' @@ -170,7 +170,7 @@ export const RECEIVE_UPDATE_ERROR = 'RECEIVE_UPDATE_ERROR' const receiveUpdateSuccess = (response: Response) => ({ type: RECEIVE_UPDATE_SUCCESS, - response: response, + response, }) export const submitSignIn = (data: Parameter) => diff --git a/operator_ui/src/connectors/redux/reducers/notifications.js b/operator_ui/src/connectors/redux/reducers/notifications.js index 4b311c7a998..9e714bd6c6f 100644 --- a/operator_ui/src/connectors/redux/reducers/notifications.js +++ b/operator_ui/src/connectors/redux/reducers/notifications.js @@ -55,13 +55,13 @@ export default (state = initialState, action = {}) => { if (error.errors) { errorNotifications = error.errors.map(e => ({ - component: component, + component, props: { msg: e.detail }, })) } else if (error.message) { errorNotifications = [ { - component: component, + component, props: { msg: error.message }, }, ] diff --git a/operator_ui/src/containers/JobRuns/Index.js b/operator_ui/src/containers/JobRuns/Index.js index 11f45ae7e55..4ef6517f925 100644 --- a/operator_ui/src/containers/JobRuns/Index.js +++ b/operator_ui/src/containers/JobRuns/Index.js @@ -81,10 +81,10 @@ export const Index = useHooks(props => { ? parseInt(props.match.params.jobRunsPage, 10) || FIRST_PAGE : FIRST_PAGE setPage(queryPage) - fetchJobRuns({ jobSpecId: jobSpecId, page: queryPage, size: pageSize }) + fetchJobRuns({ jobSpecId, page: queryPage, size: pageSize }) }, []) const handleChangePage = (_, pageNum) => { - fetchJobRuns({ jobSpecId: jobSpecId, page: pageNum, size: pageSize }) + fetchJobRuns({ jobSpecId, page: pageNum, size: pageSize }) setPage(pageNum) } diff --git a/operator_ui/src/containers/Jobs/RegionalNav.tsx b/operator_ui/src/containers/Jobs/RegionalNav.tsx index 91fe4f35ae6..93b9f71e22d 100644 --- a/operator_ui/src/containers/Jobs/RegionalNav.tsx +++ b/operator_ui/src/containers/Jobs/RegionalNav.tsx @@ -249,7 +249,7 @@ const RegionalNav = ({