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", {
"vars": "all",
"args": "after-used",
"args": "all",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
}],

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

@ -116,7 +116,7 @@ class PimMain extends React.PureComponent<PropsType> {
variant="fullWidth"
style={{ backgroundColor: theme.palette.primary.main }}
value={tab}
onChange={(event, value) => this.setState({ tab: value })}
onChange={(_event, value) => this.setState({ tab: value })}
>
<Tab
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';
return localizer.format(date.start, format) + ' - ' + localizer.format(date.end, format);
}

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

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

Loading…
Cancel
Save