Eslint clean up

pull/15355/head
Zoe Steinkamp 2019-10-08 15:50:55 -06:00
parent 5e4ff33ec0
commit e6c2a9f373
4 changed files with 18 additions and 17 deletions

View File

@ -41,7 +41,6 @@ describe('Checks', () => {
}) })
describe('When a check does not exist', () => { describe('When a check does not exist', () => {
for(let i = 0; i < 100; i++){
it('should route the user to the alerting index page', () => { it('should route the user to the alerting index page', () => {
const nonexistentID = '046cd86a2030f000' const nonexistentID = '046cd86a2030f000'
@ -49,10 +48,12 @@ describe('Checks', () => {
cy.get('@org').then(({id}: Organization) => { cy.get('@org').then(({id}: Organization) => {
cy.fixture('routes').then(({orgs, alerting, checks}) => { cy.fixture('routes').then(({orgs, alerting, checks}) => {
cy.visit(`${orgs}/${id}${alerting}${checks}/${nonexistentID}/edit`) cy.visit(`${orgs}/${id}${alerting}${checks}/${nonexistentID}/edit`)
cy.url().should('eq', `${Cypress.config().baseUrl}${orgs}/${id}${alerting}`) cy.url().should(
'eq',
`${Cypress.config().baseUrl}${orgs}/${id}${alerting}`
)
}) })
}) })
}) })
}
}) })
}) })

View File

@ -2,7 +2,6 @@
import {Dispatch} from 'react' import {Dispatch} from 'react'
import {push} from 'react-router-redux' import {push} from 'react-router-redux'
// Constants // Constants
import * as copy from 'src/shared/copy/notifications' import * as copy from 'src/shared/copy/notifications'
@ -70,7 +69,8 @@ export const removeLabelFromCheck = (checkID: string, label: Label) => ({
}) })
export const getChecks = () => async ( export const getChecks = () => async (
dispatch: Dispatch<Action | NotificationAction | ReturnType<typeof checkChecksLimits> dispatch: Dispatch<
Action | NotificationAction | ReturnType<typeof checkChecksLimits>
>, >,
getState: GetState getState: GetState
) => { ) => {
@ -98,12 +98,13 @@ export const getChecks = () => async (
} }
export const getCheckForTimeMachine = (checkID: string) => async ( export const getCheckForTimeMachine = (checkID: string) => async (
dispatch: Dispatch<TimeMachineAction | NotificationAction>, getState: GetState dispatch: Dispatch<TimeMachineAction | NotificationAction>,
getState: GetState
) => { ) => {
try { try {
dispatch(setCheckStatus(RemoteDataState.Loading)) dispatch(setCheckStatus(RemoteDataState.Loading))
const { const {
orgs: {org} orgs: {org},
} = getState() } = getState()
const resp = await api.getCheck({checkID}) const resp = await api.getCheck({checkID})

View File

@ -19,7 +19,7 @@ interface DispatchProps {
} }
interface StateProps { interface StateProps {
endpoint: NotificationEndpoint, endpoint: NotificationEndpoint
} }
type Props = WithRouterProps & DispatchProps & StateProps type Props = WithRouterProps & DispatchProps & StateProps

View File

@ -163,7 +163,6 @@ class Root extends PureComponent {
<Route path="/"> <Route path="/">
<IndexRoute component={RouteToOrg} /> <IndexRoute component={RouteToOrg} />
<Route path="orgs" component={App}> <Route path="orgs" component={App}>
<Route path="new" component={CreateOrgOverlay} /> <Route path="new" component={CreateOrgOverlay} />
<Route path=":orgID" component={SetOrg}> <Route path=":orgID" component={SetOrg}>
<IndexRoute component={MePage} /> <IndexRoute component={MePage} />