Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-xxx-remove-le…
Browse files Browse the repository at this point in the history
…gacy-ui-public
  • Loading branch information
pgayvallet committed Sep 1, 2020
2 parents 925942f + 630d2d5 commit 8d017e8
Show file tree
Hide file tree
Showing 95 changed files with 2,187 additions and 1,119 deletions.
19 changes: 0 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/plugins/es_ui_shared/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/kibana_react/**/*.{js,mjs,ts,tsx}'],
rules: {
Expand All @@ -125,25 +119,12 @@ 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/ml/**/*.{js,mjs,ts,tsx}'],
rules: {
'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
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export const useGlobalFlyout = () => {
Array.from(getContents()).forEach(removeContent);
}
};
// https://github.com/elastic/kibana/issues/73970
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [removeContent]);

return { ...ctx, addContent };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const JsonEditor = React.memo(
isControlled,
});

// https://github.com/elastic/kibana/issues/73971
/* eslint-disable-next-line react-hooks/exhaustive-deps */
const debouncedSetContent = useCallback(debounce(setContent, 300), [setContent]);

// We let the consumer control the validation and the error message.
Expand All @@ -76,6 +78,7 @@ export const JsonEditor = React.memo(
debouncedSetContent(updated);
}
},
/* eslint-disable-next-line react-hooks/exhaustive-deps */
[isControlled]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export const useJson = <T extends object = { [key: string]: any }>({
} else {
didMount.current = true;
}
// https://github.com/elastic/kibana/issues/73971
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [content]);

return {
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';
184 changes: 0 additions & 184 deletions src/plugins/es_ui_shared/public/request/np_ready_request.ts

This file was deleted.

Loading

0 comments on commit 8d017e8

Please sign in to comment.