Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into chore/update-…
Browse files Browse the repository at this point in the history
…react-fc-types

# Conflicts:
#	src/plugins/share/public/components/url_panel_content.tsx
  • Loading branch information
patrykkopycinski committed Nov 19, 2019
2 parents 8f4b436 + 483cb9a commit 53b9a8b
Show file tree
Hide file tree
Showing 176 changed files with 3,140 additions and 2,635 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"expressions": "src/plugins/expressions",
"inputControl": "src/legacy/core_plugins/input_control_vis",
Expand Down
4 changes: 2 additions & 2 deletions TYPESCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Since `@elastic/eui` already ships with a module declaration, any local addition
// file `typings/@elastic/eui/index.d.ts`

import { CommonProps } from '@elastic/eui';
import { SFC } from 'react';
import { FC } from 'react';

declare module '@elastic/eui' {
export type EuiNewComponentProps = CommonProps & {
additionalProp: string;
};
export const EuiNewComponent: SFC<EuiNewComponentProps>;
export const EuiNewComponent: FC<EuiNewComponentProps>;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export interface ChromeNavControl

| Property | Type | Description |
| --- | --- | --- |
| [mount](./kibana-plugin-public.chromenavcontrol.mount.md) | <code>MountPoint</code> | |
| [order](./kibana-plugin-public.chromenavcontrol.order.md) | <code>number</code> | |

## Methods

| Method | Description |
| --- | --- |
| [mount(targetDomElement)](./kibana-plugin-public.chromenavcontrol.mount.md) | |

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,10 @@

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [ChromeNavControl](./kibana-plugin-public.chromenavcontrol.md) &gt; [mount](./kibana-plugin-public.chromenavcontrol.mount.md)

## ChromeNavControl.mount() method
## ChromeNavControl.mount property

<b>Signature:</b>

```typescript
mount(targetDomElement: HTMLElement): () => void;
mount: MountPoint;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| targetDomElement | <code>HTMLElement</code> | |

<b>Returns:</b>

`() => void`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ A function that should mount DOM content inside the provided container element a
<b>Signature:</b>

```typescript
export declare type MountPoint = (element: HTMLElement) => UnmountCallback;
export declare type MountPoint<T extends HTMLElement = HTMLElement> = (element: T) => UnmountCallback;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export interface OverlayStart
| Property | Type | Description |
| --- | --- | --- |
| [banners](./kibana-plugin-public.overlaystart.banners.md) | <code>OverlayBannersStart</code> | [OverlayBannersStart](./kibana-plugin-public.overlaybannersstart.md) |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>(flyoutChildren: React.ReactNode, flyoutProps?: {</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>(modalChildren: React.ReactNode, modalProps?: {</code><br/><code> className?: string;</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>OverlayFlyoutStart['open']</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>OverlayModalStart['open']</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

## OverlayStart.openFlyout property


<b>Signature:</b>

```typescript
openFlyout: (flyoutChildren: React.ReactNode, flyoutProps?: {
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openFlyout: OverlayFlyoutStart['open'];
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

## OverlayStart.openModal property


<b>Signature:</b>

```typescript
openModal: (modalChildren: React.ReactNode, modalProps?: {
className?: string;
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openModal: OverlayModalStart['open'];
```
4 changes: 1 addition & 3 deletions docs/user/reporting/development/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ However, these docs will be kept up-to-date to reflect the current implementatio
[float]
[[reporting-nav-bar-extensions]]
=== Share menu extensions
X-Pack uses the `ShareContextMenuExtensionsRegistryProvider` to register actions in the share menu.

This integration will likely be changing in the near future as we move towards a unified actions abstraction across {kib}.
X-Pack uses the `share` plugin of the Kibana platform to register actions in the share menu.

[float]
=== Generate job URL
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@
"@types/uuid": "^3.4.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"@typescript-eslint/parser": "^2.8.0",
"angular-mocks": "^1.7.8",
"archiver": "^3.1.1",
"axe-core": "^3.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"@typescript-eslint/parser": "^2.8.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.5.1",
"eslint-plugin-babel": "^5.3.0",
Expand Down
137 changes: 78 additions & 59 deletions packages/eslint-config-kibana/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
const semver = require('semver');
const PKG = require('../../package.json');

const eslintConfigPrettierTypescriptEslintRules = require('eslint-config-prettier/@typescript-eslint').rules;
const eslintConfigPrettierTypescriptEslintRules = require('eslint-config-prettier/@typescript-eslint')
.rules;

module.exports = {
overrides: [
{
files: ['**/*.{ts,tsx}'],
parser: '@typescript-eslint/parser',

plugins: [
'@typescript-eslint',
'ban',
'import',
'prefer-object-spread',
],
plugins: ['@typescript-eslint', 'ban', 'import', 'prefer-object-spread'],

settings: {
'import/resolver': {
Expand All @@ -43,7 +39,7 @@ module.exports = {
sourceType: 'module',
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
jsx: true,
},
// NOTE: That is to avoid a known performance issue related with the `ts.Program` used by
// typescript eslint. As we are not using rules that need types information, we can safely
Expand All @@ -52,7 +48,7 @@ module.exports = {
// https://github.com/typescript-eslint/typescript-eslint/issues/389
// https://github.com/typescript-eslint/typescript-eslint/issues/243
// https://github.com/typescript-eslint/typescript-eslint/pull/361
project: undefined
project: undefined,
},

// NOTE: we can't override the extends option here to apply
Expand All @@ -69,62 +65,79 @@ module.exports = {
//
// Old recommended tslint rules
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],
'@typescript-eslint/ban-types': 'error',
'camelcase': 'off',
'@typescript-eslint/camelcase': ['error', {
'properties': 'never',
'ignoreDestructuring': true,
'allow': ['^[A-Z0-9_]+$']
}],
'@typescript-eslint/array-type': [
'error',
{ default: 'array-simple', readonly: 'array-simple' },
],
'@typescript-eslint/ban-types': [
'error',
{
types: { SFC: null, 'React.SFC': null },
},
],
camelcase: 'off',
'@typescript-eslint/camelcase': [
'error',
{
properties: 'never',
ignoreDestructuring: true,
allow: ['^[A-Z0-9_]+$'],
},
],
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/explicit-member-accessibility': ['error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'off',
overrides: {
accessors: 'explicit',
constructors: 'no-public',
parameterProperties: 'explicit'
}
}
parameterProperties: 'explicit',
},
},
],
'indent': 'off',
'@typescript-eslint/indent': [ 'error', 2, { SwitchCase: 1 } ],
indent: 'off',
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/member-ordering': ['error', {
'default': ['public-static-field', 'static-field', 'instance-field']
}],
'@typescript-eslint/member-ordering': [
'error',
{
default: ['public-static-field', 'static-field', 'instance-field'],
},
],
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/triple-slash-reference': ['error', {
path: 'never',
types: 'never',
lib: 'never'
}],
'@typescript-eslint/triple-slash-reference': [
'error',
{
path: 'never',
types: 'never',
lib: 'never',
},
],
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'arrow-body-style': 'error',
'arrow-parens': 'error',
'comma-dangle': ['error', 'always-multiline'],
'constructor-super': 'error',
'curly': 'error',
curly: 'error',
'dot-notation': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'always', {'null': 'ignore'}],
eqeqeq: ['error', 'always', { null: 'ignore' }],
'guard-for-in': 'error',
'import/order': ['error', {
'groups': [
['external', 'builtin'],
'internal',
['parent', 'sibling', 'index'],
],
}],
'import/order': [
'error',
{
groups: [['external', 'builtin'], 'internal', ['parent', 'sibling', 'index']],
},
],
'max-classes-per-file': ['error', 1],
'max-len': [ 'error', { code: 120, ignoreComments: true, ignoreUrls: true } ],
'max-len': ['error', { code: 120, ignoreComments: true, ignoreUrls: true }],
'new-parens': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
Expand All @@ -146,34 +159,40 @@ module.exports = {
'no-var': 'error',
'object-curly-spacing': 'error',
'object-shorthand': 'error',
'one-var': [ 'error', 'never' ],
'one-var': ['error', 'never'],
'prefer-const': 'error',
'quotes': ['error', 'double', { 'avoidEscape': true }],
quotes: ['error', 'double', { avoidEscape: true }],
'quote-props': ['error', 'consistent-as-needed'],
'radix': 'error',
'semi': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always'
}],
'spaced-comment': ["error", "always", {
"exceptions": ["/"]
}],
radix: 'error',
semi: 'error',
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'spaced-comment': [
'error',
'always',
{
exceptions: ['/'],
},
],
'use-isnan': 'error',

// Old tslint yml override or defined rules
'ban/ban': [
2,
{'name': ['describe', 'only'], 'message': 'No exclusive suites.'},
{'name': ['it', 'only'], 'message': 'No exclusive tests.'},
{'name': ['test', 'only'], 'message': 'No exclusive tests.'},

{ name: ['describe', 'only'], message: 'No exclusive suites.' },
{ name: ['it', 'only'], message: 'No exclusive tests.' },
{ name: ['test', 'only'], message: 'No exclusive tests.' },
],
'import/no-default-export': 'error',
},
eslintConfigPrettierTypescriptEslintRules
)
),
},
]
],
};
Loading

0 comments on commit 53b9a8b

Please sign in to comment.