From f3de2a641a42c0f0ec617eb0c5c8f6ed23fece10 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 7 Nov 2019 12:02:51 +0200 Subject: [PATCH] eslint: changed unused-args to always warn. --- .eslintrc.js | 2 +- src/Journals/Journal.tsx | 2 +- src/Pim/PimMain.tsx | 2 +- src/components/Calendar.tsx | 2 +- src/components/ContactEdit.tsx | 8 ++++---- src/store/actions.ts | 12 ++++++------ 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3deb42f..b445957 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -41,7 +41,7 @@ module.exports = { }], "@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", - "args": "after-used", + "args": "all", "ignoreRestSiblings": true, "argsIgnorePattern": "^_", }], diff --git a/src/Journals/Journal.tsx b/src/Journals/Journal.tsx index 9772db1..976a27e 100644 --- a/src/Journals/Journal.tsx +++ b/src/Journals/Journal.tsx @@ -134,7 +134,7 @@ class Journal extends React.Component { variant="fullWidth" style={{ backgroundColor: theme.palette.primary.main }} value={currentTab} - onChange={(event, tab) => this.setState({ tab })} + onChange={(_event, tab) => this.setState({ tab })} > diff --git a/src/Pim/PimMain.tsx b/src/Pim/PimMain.tsx index 8a4fa8d..54d291b 100644 --- a/src/Pim/PimMain.tsx +++ b/src/Pim/PimMain.tsx @@ -116,7 +116,7 @@ class PimMain extends React.PureComponent { variant="fullWidth" style={{ backgroundColor: theme.palette.primary.main }} value={tab} - onChange={(event, value) => this.setState({ tab: value })} + onChange={(_event, value) => this.setState({ tab: value })} > { 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 { 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 { 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 { 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 }) diff --git a/src/store/actions.ts b/src/store/actions.ts index 5e2319f..1275a31 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -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 }; } );