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

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

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

@ -54,9 +54,9 @@ class LoginGate extends React.Component {
error={this.props.credentials.error}
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">
<img src={SignedPagesBadge}/>
<img src={SignedPagesBadge} />
</ExternalLink>
<ul>
<li><ExternalLink style={style.isSafe} href={C.homePage}>

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

@ -68,7 +68,7 @@ class SideMenu extends React.PureComponent<PropsTypeInner> {
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>
);
}

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

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

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

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

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

@ -28,7 +28,7 @@ class Event extends React.PureComponent {
<React.Fragment>
<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>
<br/>
<br />
<div><u>{this.props.item.location}</u></div>
</PimItemHeader>
<div style={style.content}>

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

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

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

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

Loading…
Cancel
Save