Update tslint and fix warnings.

master
Tom Hacohen 6 years ago
parent a7251f6dc7
commit ad45ad3f83

@ -94,7 +94,7 @@ class JournalEdit extends React.PureComponent<PropsTypeInner> {
</InputLabel> </InputLabel>
<Select <Select
name="type" name="type"
required={true} required
value={this.state.info.type} value={this.state.info.type}
onChange={this.handleInputChange} onChange={this.handleInputChange}
> >
@ -105,7 +105,7 @@ class JournalEdit extends React.PureComponent<PropsTypeInner> {
</FormControl> </FormControl>
<TextField <TextField
name="displayName" name="displayName"
required={true} required
label="Display name of this collection" label="Display name of this collection"
value={this.state.info.displayName} value={this.state.info.displayName}
onChange={this.handleInputChange} onChange={this.handleInputChange}

@ -37,7 +37,7 @@ class Journals extends React.PureComponent {
<Switch> <Switch>
<Route <Route
path={routeResolver.getRoute('journals')} path={routeResolver.getRoute('journals')}
exact={true} exact
render={({ history }) => ( render={({ history }) => (
<> <>
<JournalsList <JournalsList

@ -38,7 +38,7 @@ export function journalView(JournalList: any, JournalItem: any) {
<Switch> <Switch>
<Route <Route
path={routeResolver.getRoute('journals._id')} path={routeResolver.getRoute('journals._id')}
exact={true} exact
render={() => ( render={() => (
<JournalList entries={objValues(items)} onItemClick={this.itemClicked} /> <JournalList entries={objValues(items)} onItemClick={this.itemClicked} />
) )
@ -46,7 +46,7 @@ export function journalView(JournalList: any, JournalItem: any) {
/> />
<Route <Route
path={routeResolver.getRoute('journals._id.items._id')} path={routeResolver.getRoute('journals._id.items._id')}
exact={true} exact
render={({match}) => { render={({match}) => {
return ( return (

@ -54,9 +54,9 @@ class LoginGate extends React.Component {
error={this.props.credentials.error} error={this.props.credentials.error}
loading={this.props.credentials.fetching} loading={this.props.credentials.fetching}
/> />
<hr style={style.divider}/> <hr style={style.divider} />
<ExternalLink style={style.isSafe} href="https://www.etesync.com/faq/#signed-pages"> <ExternalLink style={style.isSafe} href="https://www.etesync.com/faq/#signed-pages">
<img src={SignedPagesBadge}/> <img src={SignedPagesBadge} />
</ExternalLink> </ExternalLink>
<ul> <ul>
<li><ExternalLink style={style.isSafe} href={C.homePage}> <li><ExternalLink style={style.isSafe} href={C.homePage}>

@ -133,7 +133,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
<Switch> <Switch>
<Route <Route
path={routeResolver.getRoute(props.routePrefix + '.new')} path={routeResolver.getRoute(props.routePrefix + '.new')}
exact={true} exact
render={({match}) => ( render={({match}) => (
<Container style={{maxWidth: '30rem'}}> <Container style={{maxWidth: '30rem'}}>
<ComponentEdit <ComponentEdit
@ -146,7 +146,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
/> />
<Route <Route
path={routeResolver.getRoute(props.routePrefix + '._id.edit')} path={routeResolver.getRoute(props.routePrefix + '._id.edit')}
exact={true} exact
render={({match}) => ( render={({match}) => (
<Container style={{maxWidth: '30rem'}}> <Container style={{maxWidth: '30rem'}}>
{(match.params.itemUid in props.items) && {(match.params.itemUid in props.items) &&
@ -164,7 +164,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
/> />
<Route <Route
path={routeResolver.getRoute(props.routePrefix + '._id.log')} path={routeResolver.getRoute(props.routePrefix + '._id.log')}
exact={true} exact
render={({match}) => ( render={({match}) => (
<Container> <Container>
<ItemChangeLog <ItemChangeLog
@ -177,7 +177,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(
/> />
<Route <Route
path={routeResolver.getRoute(props.routePrefix + '._id')} path={routeResolver.getRoute(props.routePrefix + '._id')}
exact={true} exact
render={({match, history}) => ( render={({match, history}) => (
<Container> <Container>
<div style={{textAlign: 'right', marginBottom: 15}}> <div style={{textAlign: 'right', marginBottom: 15}}>
@ -316,7 +316,7 @@ class Pim extends React.PureComponent {
<Switch> <Switch>
<Route <Route
path={routeResolver.getRoute('pim')} path={routeResolver.getRoute('pim')}
exact={true} exact
render={({history}) => ( render={({history}) => (
<PimMain <PimMain
contacts={objValues(addressBookItems)} contacts={objValues(addressBookItems)}

@ -68,7 +68,7 @@ class SideMenu extends React.PureComponent<PropsTypeInner> {
this.props.history.push(routeResolver.getRoute('settings')); this.props.history.push(routeResolver.getRoute('settings'));
}} }}
/> />
<ListItem primaryText="Log Out" leftIcon={<LogoutIcon/>} onClick={this.logout} /> <ListItem primaryText="Log Out" leftIcon={<LogoutIcon />} onClick={this.logout} />
</React.Fragment> </React.Fragment>
); );
} }

@ -195,7 +195,7 @@ class SyncGate extends React.PureComponent<PropsTypeInner> {
<Switch> <Switch>
<Route <Route
path={routeResolver.getRoute('home')} path={routeResolver.getRoute('home')}
exact={true} exact
render={({match}) => ( render={({match}) => (
<Redirect to={routeResolver.getRoute('pim')} /> <Redirect to={routeResolver.getRoute('pim')} />
)} )}
@ -229,7 +229,7 @@ class SyncGate extends React.PureComponent<PropsTypeInner> {
/> />
<Route <Route
path={routeResolver.getRoute('settings')} path={routeResolver.getRoute('settings')}
exact={true} exact
render={({history}) => ( render={({history}) => (
<Settings <Settings
history={history} history={history}

@ -76,7 +76,7 @@ class Calendar extends React.PureComponent<PropsType> {
defaultDate={new Date()} defaultDate={new Date()}
localizer={calendarLocalizer} localizer={calendarLocalizer}
events={entries} events={entries}
selectable={true} selectable
onSelectEvent={this.props.onItemClick as any} onSelectEvent={this.props.onItemClick as any}
onSelectSlot={this.slotClicked as any} onSelectSlot={this.slotClicked as any}
formats={{agendaHeaderFormat: agendaHeaderFormat as any}} formats={{agendaHeaderFormat: agendaHeaderFormat as any}}

@ -117,7 +117,7 @@ class Contact extends React.PureComponent {
return ( return (
<ListItem <ListItem
key={idx} key={idx}
insetChildren={true} insetChildren
primaryText={val} primaryText={val}
secondaryText={prop.name} secondaryText={prop.name}
/> />
@ -134,7 +134,7 @@ class Contact extends React.PureComponent {
{items} {items}
</List> </List>
<List> <List>
<Divider inset={true} /> <Divider inset />
</List> </List>
</React.Fragment> </React.Fragment>
); );

@ -470,7 +470,7 @@ class ContactEdit extends React.PureComponent<PropsType> {
<TextField <TextField
name="note" name="note"
multiline={true} multiline
placeholder="Note" placeholder="Note"
style={styles.fullWidth} style={styles.fullWidth}
value={this.state.note} value={this.state.note}

@ -73,7 +73,7 @@ class EncryptionLoginForm extends React.PureComponent {
<form style={styles.form} onSubmit={this.generateEncryption}> <form style={styles.form} onSubmit={this.generateEncryption}>
<TextField <TextField
type="password" type="password"
autoFocus={true} autoFocus
error={!!this.state.errors.errorEncryptionPassword} error={!!this.state.errors.errorEncryptionPassword}
helperText={this.state.errors.errorEncryptionPassword} helperText={this.state.errors.errorEncryptionPassword}
label="Encryption Password" label="Encryption Password"

@ -28,7 +28,7 @@ class Event extends React.PureComponent {
<React.Fragment> <React.Fragment>
<PimItemHeader text={this.props.item.summary} backgroundColor={this.props.item.color}> <PimItemHeader text={this.props.item.summary} backgroundColor={this.props.item.color}>
<div>{formatDateRange(this.props.item.startDate, this.props.item.endDate)} {timezone && <small>({timezone})</small>}</div> <div>{formatDateRange(this.props.item.startDate, this.props.item.endDate)} {timezone && <small>({timezone})</small>}</div>
<br/> <br />
<div><u>{this.props.item.location}</u></div> <div><u>{this.props.item.location}</u></div>
</PimItemHeader> </PimItemHeader>
<div style={style.content}> <div style={style.content}>

@ -297,7 +297,7 @@ class EventEdit extends React.PureComponent<PropsType> {
<TextField <TextField
name="description" name="description"
placeholder="Add description" placeholder="Add description"
multiline={true} multiline
style={styles.fullWidth} style={styles.fullWidth}
value={this.state.description} value={this.state.description}
onChange={this.handleInputChange} onChange={this.handleInputChange}

@ -35,7 +35,7 @@ class Task extends React.PureComponent {
{ item.dueDate && { item.dueDate &&
<div>Due: {formatDate(item.dueDate)} {timezone && <small>({timezone})</small>}</div> <div>Due: {formatDate(item.dueDate)} {timezone && <small>({timezone})</small>}</div>
} }
<br/> <br />
<div><u>{this.props.item.location}</u></div> <div><u>{this.props.item.location}</u></div>
</PimItemHeader> </PimItemHeader>
<div style={style.content}> <div style={style.content}>

@ -301,7 +301,7 @@ class TaskEdit extends React.PureComponent<PropsType> {
<TextField <TextField
name="description" name="description"
placeholder="Add description" placeholder="Add description"
multiline={true} multiline
style={styles.fullWidth} style={styles.fullWidth}
value={this.state.description} value={this.state.description}
onChange={this.handleInputChange} onChange={this.handleInputChange}

@ -4,10 +4,13 @@
"no-console": [true, "error"], "no-console": [true, "error"],
"interface-name": [true, "never-prefix"], "interface-name": [true, "never-prefix"],
"ordered-imports": false, "ordered-imports": false,
"jsx-boolean-value": [true, "never"],
"jsx-curly-spacing": [true, "never"], "jsx-curly-spacing": [true, "never"],
"jsx-no-bind": [true, "allowArrowFunctions"], "jsx-no-bind": [true, "allowArrowFunctions"],
"jsx-no-lambda": [false], "jsx-no-lambda": [false],
"jsx-no-multiline-js": false, "jsx-no-multiline-js": false,
"jsx-space-before-trailing-slash": true,
"jsx-key": true,
"max-classes-per-file": [false, 0], "max-classes-per-file": [false, 0],
"max-line-length": false, "max-line-length": false,
"no-consecutive-blank-lines": false, "no-consecutive-blank-lines": false,

Loading…
Cancel
Save