Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rotkiw opened this issue Mar 19, 2021 · 0 comments

Comments

@rotkiw
Copy link

rotkiw commented Mar 19, 2021

`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 rotkiw changed the title bug: lodash/prefer-lodash-method false positive with react router replace bug: lodash/prefer-lodash-method false positive with nextjs (react) router replace Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant