eslint-plugin-lodash icon indicating copy to clipboard operation
eslint-plugin-lodash copied to clipboard

bug: lodash/prefer-lodash-method false positive with nextjs (react) router replace

Open rotkiw opened this issue 4 years ago • 0 comments

`import { useRouter } from 'next/router' const router = useRouter()

router.replace('/')`

with plugin:lodash/recommended: ESLint: Prefer '_.replace' over the native function. (lodash/prefer-lodash-method)

quick fix rule: 'lodash/prefer-lodash-method': [2, { ignoreMethods: ['replace'] }]

rotkiw avatar Mar 19 '21 15:03 rotkiw