mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-29 18:08:16 +03:00
dead3f9ad9
Profile switching was subtly broken because action creators weren't being correctly re-bound due to a missing dependency in a `useCallback` call. I also tried to reduce boilerplate in this PR by adding additional exhaustive deps protection via eslint for `useSelector`, `useAppSelector`, and `useActionCreator`. The removes the need for using `useCallback` or each of those. Fixes #280
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
plugins: ['prettier', '@typescript-eslint', 'react-hooks'],
|
|
rules: {
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': [
|
|
'error',
|
|
{
|
|
additionalHooks: '(useSelector|useAppSelector|useActionCreator)',
|
|
},
|
|
],
|
|
},
|
|
}
|