Skip to content

Commit

Permalink
Merge branch 'master' into eui-17.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Dec 16, 2019
2 parents 0414339 + a057456 commit 30901cb
Show file tree
Hide file tree
Showing 528 changed files with 11,260 additions and 4,693 deletions.
63 changes: 44 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ module.exports = {
'src/legacy/**/*',
'x-pack/**/*',
'!x-pack/**/*.test.*',
'src/plugins/**/(public|server)/**/*',
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
],
from: [
Expand All @@ -277,16 +278,35 @@ module.exports = {
'!src/core/server/types',
'!src/core/server/*.test.mocks.ts',

'src/plugins/**/public/**/*',
'!src/plugins/**/public/index.{js,ts,tsx}',

'src/plugins/**/server/**/*',
'!src/plugins/**/server/index.{js,ts,tsx}',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
],
allowSameFolder: true,
errorMessage: 'Plugins may only import from top-level public and server modules.',
},
{
target: ['src/core/**/*'],
target: [
'(src|x-pack)/plugins/**/*',
'!(src|x-pack)/plugins/*/server/**/*',

'src/legacy/core_plugins/**/*',
'!src/legacy/core_plugins/*/server/**/*',
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',

'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',
},
{
target: ['src/**/*'],
from: ['x-pack/**/*'],
errorMessage: 'OSS cannot import x-pack files.',
},
Expand All @@ -300,6 +320,11 @@ module.exports = {
],
errorMessage: 'The core cannot depend on any plugins.',
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['ui/**/*', 'uiExports/**/*'],
errorMessage: 'Plugins cannot import legacy UI code.',
},
{
from: ['src/legacy/ui/**/*', 'ui/**/*'],
target: [
Expand Down Expand Up @@ -660,8 +685,6 @@ module.exports = {
'accessor-pairs': 'error',
'array-callback-return': 'error',
'no-array-constructor': 'error',
// This will be turned on after bug fixes are mostly completed
// 'arrow-body-style': ['warn', 'as-needed'],
complexity: 'warn',
// This will be turned on after bug fixes are mostly completed
// 'consistent-return': 'warn',
Expand Down Expand Up @@ -691,7 +714,6 @@ module.exports = {
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-label': 'error',
'no-floating-decimal': 'error',
'no-func-assign': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
Expand Down Expand Up @@ -732,8 +754,6 @@ module.exports = {
'prefer-spread': 'error',
// This style will be turned on after most bugs are fixed
// 'prefer-template': 'warn',
// This style will be turned on after most bugs are fixed
// quotes: ['warn', 'single', { avoidEscape: true }],
'react/boolean-prop-naming': 'error',
'react/button-has-type': 'error',
'react/forbid-dom-props': 'error',
Expand Down Expand Up @@ -769,13 +789,10 @@ module.exports = {
'react/jsx-sort-default-props': 'error',
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
'react/jsx-tag-spacing': 'error',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'rest-spread-spacing': ['error', 'never'],
'symbol-description': 'error',
'template-curly-spacing': 'error',
'vars-on-top': 'error',
},
},
Expand Down Expand Up @@ -810,8 +827,6 @@ module.exports = {
{
files: ['x-pack/legacy/plugins/monitoring/**/*.js'],
rules: {
'block-spacing': ['error', 'always'],
curly: ['error', 'all'],
'no-unused-vars': ['error', { args: 'all', argsIgnorePattern: '^_' }],
'no-else-return': 'error',
},
Expand All @@ -828,7 +843,6 @@ module.exports = {
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
rules: {
radix: 'error',
curly: ['error', 'all'],

// module importing
'import/order': [
Expand All @@ -846,7 +860,6 @@ module.exports = {
'react/self-closing-comp': 'error',
'react/sort-comp': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-wrap-multilines': 'error',
'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }],
'react/forbid-elements': [
'error',
Expand Down Expand Up @@ -923,5 +936,17 @@ module.exports = {
'import/no-default-export': 'error',
},
},

/**
* Prettier disables all conflicting rules, listing as last override so it takes precedence
*/
{
files: ['**/*'],
rules: {
...require('eslint-config-prettier').rules,
...require('eslint-config-prettier/react').rules,
...require('eslint-config-prettier/@typescript-eslint').rules,
},
},
],
};
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,19 @@
/x-pack/plugins/licensing/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/csp/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
/src/legacy/server/i18n/ @elastic/kibana-platform
/src/legacy/server/logging/ @elastic/kibana-platform
/src/legacy/server/saved_objects/ @elastic/kibana-platform
/src/legacy/server/status/ @elastic/kibana-platform

# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
/x-pack/legacy/plugins/security/ @elastic/kibana-security
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/src/legacy/server/csp/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security

Expand Down
18 changes: 13 additions & 5 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"console": "src/legacy/core_plugins/console",
"core": "src/core",
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"data": [
"src/legacy/core_plugins/data",
"src/plugins/data"
],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
Expand All @@ -21,7 +24,7 @@
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
"navigation": "src/legacy/core_plugins/navigation",
"navigation": "src/plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
"regionMap": "src/legacy/core_plugins/region_map",
"server": "src/legacy/server",
Expand All @@ -36,8 +39,13 @@
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visualizations": ["src/plugins/visualizations", "src/legacy/core_plugins/visualizations"]
"visualizations": [
"src/plugins/visualizations",
"src/legacy/core_plugins/visualizations"
]
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"exclude": [
"src/legacy/ui/ui_render/ui_render_mixin.js"
],
"translations": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export class MyPlugin implements Plugin {
setup({ application }) {
application.register({
id: 'my-app',
async mount(context, params) {
async mount(params) {
const { renderApp } = await import('./application');
return renderApp(context, params);
return renderApp(params);
},
});
}
Expand All @@ -38,7 +38,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';

export renderApp = (context, { appBasePath, element }) => {
import { CoreStart, AppMountParams } from 'src/core/public';
import { MyPluginDepsStart } from './plugin';

export renderApp = ({ appBasePath, element }: AppMountParams) => {
ReactDOM.render(
// pass `appBasePath` to `basename`
<BrowserRouter basename={appBasePath}>
Expand Down
7 changes: 7 additions & 0 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsCreateOptions](./kibana-plugin-public.savedobjectscreateoptions.md) | |
| [SavedObjectsFindOptions](./kibana-plugin-public.savedobjectsfindoptions.md) | |
| [SavedObjectsFindResponsePublic](./kibana-plugin-public.savedobjectsfindresponsepublic.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
| [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
| [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) | Represents a failure to import. |
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
| [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
| [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
| [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
| [SavedObjectsMigrationVersion](./kibana-plugin-public.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
| [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) | |
| [SavedObjectsUpdateOptions](./kibana-plugin-public.savedobjectsupdateoptions.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md)

## SavedObjectsImportConflictError interface

Represents a failure to import due to a conflict.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportConflictError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md) | <code>'conflict'</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md)

## SavedObjectsImportConflictError.type property

<b>Signature:</b>

```typescript
type: 'conflict';
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [error](./kibana-plugin-public.savedobjectsimporterror.error.md)

## SavedObjectsImportError.error property

<b>Signature:</b>

```typescript
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [id](./kibana-plugin-public.savedobjectsimporterror.id.md)

## SavedObjectsImportError.id property

<b>Signature:</b>

```typescript
id: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md)

## SavedObjectsImportError interface

Represents a failure to import.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [error](./kibana-plugin-public.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError &#124; SavedObjectsImportUnsupportedTypeError &#124; SavedObjectsImportMissingReferencesError &#124; SavedObjectsImportUnknownError</code> | |
| [id](./kibana-plugin-public.savedobjectsimporterror.id.md) | <code>string</code> | |
| [title](./kibana-plugin-public.savedobjectsimporterror.title.md) | <code>string</code> | |
| [type](./kibana-plugin-public.savedobjectsimporterror.type.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [title](./kibana-plugin-public.savedobjectsimporterror.title.md)

## SavedObjectsImportError.title property

<b>Signature:</b>

```typescript
title?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimporterror.type.md)

## SavedObjectsImportError.type property

<b>Signature:</b>

```typescript
type: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md)

## SavedObjectsImportMissingReferencesError.blocking property

<b>Signature:</b>

```typescript
blocking: Array<{
type: string;
id: string;
}>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md)

## SavedObjectsImportMissingReferencesError interface

Represents a failure to import due to missing references.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportMissingReferencesError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [references](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.references.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [type](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.type.md) | <code>'missing_references'</code> | |

Loading

0 comments on commit 30901cb

Please sign in to comment.