eslint

eslint Очистка кэша - новые правила приводят к ошибкам, хотя код уже поменялся

Возможное решение

Как вариант можно вручную удалить файл кэша eslint-а, он может лежать по адресу:

node_modules/.cache/.eslintcache

Either include them or remove the dependency array Ошибка. Что если эти зависимости не нужны

Без строчки // eslint-disable-next-line получаем предупреждение:

React Hook React.useEffect has missing dependencies: 'history.location.search' and 'match.params'. Either include them or remove the dependency array react-hooks/exhaustive-deps

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

для кода:

React Hook React.useCallback has an unnecessary dependency: '...'. Either exclude it or remove the dependency array

Line 29:8: React Hook React.useCallback has an unnecessary dependency: 'sortByPriceDown'. Either exclude it or remove the dependency array. Outer scope values like 'sortByPriceDown' aren't valid dependencies because mutating them doesn't re-render the component react-hooks/exhaustive-deps

Для кода:

Subscribe to RSS - eslint