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

Fix es_ui_shared eslint violations for useRequest hook #72947

Merged
merged 26 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d996312
Remove index_management and snapshot_restore from eslintrc.
cjcenizal Apr 24, 2020
21fb1e6
Reconcile request helpers with eslint rules for React hooks.
cjcenizal Mar 9, 2020
5e29bf4
Replace original request.ts with np_ready_request.ts.
cjcenizal Mar 11, 2020
a813c3c
Remove cleanup function which introduced a bug by setting isMounted t…
cjcenizal Apr 24, 2020
248608e
Bring back isOutdatedRequest to gracefully handle changing poll inter…
cjcenizal Apr 24, 2020
7de3e5b
Fix useRequest and sendRequest tests. Split into two test files.
cjcenizal Jul 28, 2020
82ba37c
Reorganize modules and convert tests to TS.
cjcenizal Jul 30, 2020
cb6a82d
Ignore eslint violation from isOutdatedRequest flag.
cjcenizal Jul 30, 2020
2fe8e19
Remove unnecessary useMemo.
cjcenizal Aug 1, 2020
ea6d8e4
Merge branch 'master' into chore/use-request-eslint
cjcenizal Aug 3, 2020
ba508fe
Revert "Remove unnecessary useMemo."
cjcenizal Aug 4, 2020
6492468
Add comment explaining purpose of stringifiedQuery.
cjcenizal Aug 4, 2020
ff5f88a
Clarify purpose of deserializer return value test.
cjcenizal Aug 4, 2020
b83fc41
Rename helpers files to test.helpers to clarify their role.
cjcenizal Aug 4, 2020
ded10ed
Remove outdated comments.
cjcenizal Aug 4, 2020
bb429c3
Convert useRequest to implement useCallback to define sendRequest bas…
cjcenizal Aug 5, 2020
c4ab04d
Merge branch 'master' into chore/use-request-eslint
cjcenizal Aug 6, 2020
646b5fa
Merge branch 'master' into chore/use-request-eslint
cjcenizal Aug 24, 2020
a542b42
Convert everything to hooks, fix bug tracking outdated responses, and…
cjcenizal Aug 29, 2020
e5dc061
Merge branch 'master' into chore/use-request-eslint
cjcenizal Aug 29, 2020
6ff6124
Remove unnecessary mention of isMounted from scheduling useEffect hook.
cjcenizal Aug 30, 2020
40820aa
Skip lint rule for other modules.
cjcenizal Aug 30, 2020
1df8e52
Merge branch 'master' into chore/use-request-eslint
elasticmachine Aug 31, 2020
fc2f91e
Clarify comments.
cjcenizal Aug 31, 2020
b3414b7
Apply Seb's comments re comments.
cjcenizal Aug 31, 2020
0e99888
Fix Watcher memoization bugs.
cjcenizal Aug 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},
{
files: ['x-pack/legacy/plugins/index_management/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/plugins/lens/**/*.{js,mjs,ts,tsx}'],
rules: {
Expand All @@ -144,12 +137,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},

/**
* Files that require Apache 2.0 headers, settings
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/es_ui_shared/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export {
UseRequestResponse,
sendRequest,
useRequest,
} from './request/np_ready_request';
} from './request';

export { indices } from './indices';

Expand Down
10 changes: 2 additions & 8 deletions src/plugins/es_ui_shared/public/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,5 @@
* under the License.
*/

export {
SendRequestConfig,
SendRequestResponse,
UseRequestConfig,
UseRequestResponse,
sendRequest,
useRequest,
} from './request';
export { SendRequestConfig, SendRequestResponse, sendRequest } from './send_request';
export { UseRequestConfig, UseRequestResponse, useRequest } from './use_request';
262 changes: 0 additions & 262 deletions src/plugins/es_ui_shared/public/request/request.test.js

This file was deleted.

Loading