Skip to content

Commit

Permalink
Merge branch 'master' into fix/72875
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Aug 31, 2020
2 parents e7be705 + 7b807b7 commit abd3551
Show file tree
Hide file tree
Showing 123 changed files with 3,102 additions and 1,525 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ target
/x-pack/legacy/plugins/maps/public/vendor/**

# package overrides
/packages/eslint-config-kibana
/packages/elastic-eslint-config-kibana
/packages/kbn-interpreter/src/common/lib/grammar.js
/packages/kbn-plugin-generator/template
/packages/kbn-pm/dist
Expand Down
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 @@ -48,7 +48,7 @@ If you’re installing dependencies and seeing an error that looks
something like

....
Unsupported URL Type: link:packages/eslint-config-kibana
Unsupported URL Type: link:packages/elastic-eslint-config-kibana
....

you’re likely running `npm`. To install dependencies in {kib} you
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eslint-config-kibana
# elastic-eslint-config-kibana

The eslint config used by the kibana team

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": ".eslintrc.js",
"repository": {
"type": "git",
"url": "git+https://github.com/elastic/eslint-config-kibana.git"
"url": "git+https://github.com/elastic/kibana.git"
},
"keywords": [],
"author": "Spencer Alger <email@spalger.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana"
"url": "https://github.com/elastic/kibana/tree/master/packages/elastic-eslint-config-kibana"
},
"homepage": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana",
"homepage": "https://github.com/elastic/kibana/tree/master/packages/elastic-eslint-config-kibana",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^3.10.0",
"@typescript-eslint/parser": "^3.10.0",
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/kbn-pm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ From a plugin perspective there are two different types of Kibana dependencies:
runtime and static dependencies. Runtime dependencies are things that are
instantiated at runtime and that are injected into the plugin, for example
config and elasticsearch clients. Static dependencies are those dependencies
that we want to `import`. `eslint-config-kibana` is one example of this, and
that we want to `import`. `elastic-eslint-config-kibana` is one example of this, and
it's actually needed because eslint requires it to be a separate package. But we
also have dependencies like `datemath`, `flot`, `eui` and others that we
control, but where we want to `import` them in plugins instead of injecting them
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 abd3551

Please sign in to comment.