Without bypassing the warning no-unused-vars
, how can I fix this code for ESLint to not complain about _
?
I thought renaming the variable to _
would solve the issue.
type ById = (_: any) => string
export const normalize = (byId: ById) => (acc: Record<string, unknown>, doc: { data: () => unknown }) => ({
...acc,
[byId(doc)]: doc.data(),
})
2:14 error '_' is defined but never used no-unused-vars