eslint: changed unused-args to always warn.

master
Tom Hacohen 5 years ago
parent 566261b91a
commit f3de2a641a

@ -41,7 +41,7 @@ module.exports = {
}], }],
"@typescript-eslint/no-unused-vars": ["warn", { "@typescript-eslint/no-unused-vars": ["warn", {
"vars": "all", "vars": "all",
"args": "after-used", "args": "all",
"ignoreRestSiblings": true, "ignoreRestSiblings": true,
"argsIgnorePattern": "^_", "argsIgnorePattern": "^_",
}], }],

@ -134,7 +134,7 @@ class Journal extends React.Component<PropsTypeInner> {
variant="fullWidth" variant="fullWidth"
style={{ backgroundColor: theme.palette.primary.main }} style={{ backgroundColor: theme.palette.primary.main }}
value={currentTab} value={currentTab}
onChange={(event, tab) => this.setState({ tab })} onChange={(_event, tab) => this.setState({ tab })}
> >
<Tab label={itemsTitle} disabled={journalOnly} /> <Tab label={itemsTitle} disabled={journalOnly} />
<Tab label="Journal Entries" /> <Tab label="Journal Entries" />

@ -116,7 +116,7 @@ class PimMain extends React.PureComponent<PropsType> {
variant="fullWidth" variant="fullWidth"
style={{ backgroundColor: theme.palette.primary.main }} style={{ backgroundColor: theme.palette.primary.main }}
value={tab} value={tab}
onChange={(event, value) => this.setState({ tab: value })} onChange={(_event, value) => this.setState({ tab: value })}
> >
<Tab <Tab
label={addressBookTitle} label={addressBookTitle}

@ -21,7 +21,7 @@ function eventPropGetter(event: EventType) {
}; };
} }
function agendaHeaderFormat(date: {start: Date, end: Date}, culture: string, localizer: any) { function agendaHeaderFormat(date: {start: Date, end: Date}, _culture: string, localizer: any) {
const format = 'll'; const format = 'll';
return localizer.format(date.start, format) + ' - ' + localizer.format(date.end, format); return localizer.format(date.start, format) + ' - ' + localizer.format(date.end, format);
} }

@ -377,7 +377,7 @@ class ContactEdit extends React.PureComponent<PropsType> {
name="phone" name="phone"
placeholder="Phone" placeholder="Phone"
types={telTypes} types={telTypes}
value={this.state.phone[idx]} value={x}
onClearRequest={(name: string) => this.removeValueType(name, idx)} onClearRequest={(name: string) => this.removeValueType(name, idx)}
onChange={(name: string, type: string, value: string) => ( onChange={(name: string, type: string, value: string) => (
this.handleValueTypeChange(name, idx, { type, value }) this.handleValueTypeChange(name, idx, { type, value })
@ -400,7 +400,7 @@ class ContactEdit extends React.PureComponent<PropsType> {
name="email" name="email"
placeholder="Email" placeholder="Email"
types={emailTypes} types={emailTypes}
value={this.state.email[idx]} value={x}
onClearRequest={(name: string) => this.removeValueType(name, idx)} onClearRequest={(name: string) => this.removeValueType(name, idx)}
onChange={(name: string, type: string, value: string) => ( onChange={(name: string, type: string, value: string) => (
this.handleValueTypeChange(name, idx, { type, value }) this.handleValueTypeChange(name, idx, { type, value })
@ -423,7 +423,7 @@ class ContactEdit extends React.PureComponent<PropsType> {
name="impp" name="impp"
placeholder="IMPP" placeholder="IMPP"
types={imppTypes} types={imppTypes}
value={this.state.impp[idx]} value={x}
onClearRequest={(name: string) => this.removeValueType(name, idx)} onClearRequest={(name: string) => this.removeValueType(name, idx)}
onChange={(name: string, type: string, value: string) => ( onChange={(name: string, type: string, value: string) => (
this.handleValueTypeChange(name, idx, { type, value }) this.handleValueTypeChange(name, idx, { type, value })
@ -446,7 +446,7 @@ class ContactEdit extends React.PureComponent<PropsType> {
name="address" name="address"
placeholder="Address" placeholder="Address"
types={addressTypes} types={addressTypes}
value={this.state.address[idx]} value={x}
onClearRequest={(name: string) => this.removeValueType(name, idx)} onClearRequest={(name: string) => this.removeValueType(name, idx)}
onChange={(name: string, type: string, value: string) => ( onChange={(name: string, type: string, value: string) => (
this.handleValueTypeChange(name, idx, { type, value }) this.handleValueTypeChange(name, idx, { type, value })

@ -70,7 +70,7 @@ export const addJournal = createAction(
return journalManager.create(journal); return journalManager.create(journal);
}, },
(etesync: CredentialsData, journal: EteSync.Journal) => { (_etesync: CredentialsData, journal: EteSync.Journal) => {
return { item: journal }; return { item: journal };
} }
); );
@ -84,7 +84,7 @@ export const updateJournal = createAction(
return journalManager.update(journal); return journalManager.update(journal);
}, },
(etesync: CredentialsData, journal: EteSync.Journal) => { (_etesync: CredentialsData, journal: EteSync.Journal) => {
return { item: journal }; return { item: journal };
} }
); );
@ -98,7 +98,7 @@ export const deleteJournal = createAction(
return journalManager.delete(journal); return journalManager.delete(journal);
}, },
(etesync: CredentialsData, journal: EteSync.Journal) => { (_etesync: CredentialsData, journal: EteSync.Journal) => {
return { item: journal }; return { item: journal };
} }
); );
@ -112,7 +112,7 @@ export const { fetchEntries, addEntries } = createActions({
return entryManager.list(prevUid); return entryManager.list(prevUid);
}, },
(etesync: CredentialsData, journalUid: string, prevUid: string | null) => { (_etesync: CredentialsData, journalUid: string, prevUid: string | null) => {
return { journal: journalUid, prevUid }; return { journal: journalUid, prevUid };
}, },
], ],
@ -124,7 +124,7 @@ export const { fetchEntries, addEntries } = createActions({
return entryManager.create(newEntries, prevUid).then(() => newEntries); return entryManager.create(newEntries, prevUid).then(() => newEntries);
}, },
(etesync: CredentialsData, journalUid: string, newEntries: EteSync.Entry[], prevUid: string | null) => { (_etesync: CredentialsData, journalUid: string, newEntries: EteSync.Entry[], prevUid: string | null) => {
return { journal: journalUid, entries: newEntries, prevUid }; return { journal: journalUid, entries: newEntries, prevUid };
}, },
], ],
@ -149,7 +149,7 @@ export const createUserInfo = createAction(
return userInfoManager.create(userInfo); return userInfoManager.create(userInfo);
}, },
(etesync: CredentialsData, userInfo: UserInfo) => { (_etesync: CredentialsData, userInfo: UserInfo) => {
return { userInfo }; return { userInfo };
} }
); );

Loading…
Cancel
Save