Skip to content

Commit

Permalink
Merge branch 'master' into move_analyze_to_file_upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 20, 2021
2 parents 34c2686 + 7e5dbdf commit 1c2a9ac
Show file tree
Hide file tree
Showing 2,147 changed files with 51,486 additions and 28,411 deletions.
118 changes: 57 additions & 61 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ module.exports = {
{
files: ['x-pack/plugins/fleet/**/*.{js,mjs,ts,tsx}'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import/order': [
'warn',
{
Expand Down Expand Up @@ -828,48 +829,12 @@ module.exports = {
// typescript only for front and back end
files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
rules: {
// This will be turned on after bug fixes are complete
// '@typescript-eslint/explicit-member-accessibility': 'warn',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
// This will be turned on after bug fixes are complete
// '@typescript-eslint/no-object-literal-type-assertion': 'warn',
'@typescript-eslint/unified-signatures': 'error',

// eventually we want this to be a warn and then an error since this is a recommended linter rule
// for now, keeping it commented out to avoid too much IDE noise until the other linter issues
// are fixed in the next release or two
// '@typescript-eslint/explicit-function-return-type': 'warn',

// these rules cannot be turned on and tested at the moment until this issue is resolved:
// https://github.com/prettier/prettier-eslint/issues/201
// '@typescript-eslint/await-thenable': 'error',
// '@typescript-eslint/no-non-null-assertion': 'error'
// '@typescript-eslint/no-unnecessary-type-assertion': 'error',
// '@typescript-eslint/no-unused-vars': 'error',
// '@typescript-eslint/prefer-includes': 'error',
// '@typescript-eslint/prefer-string-starts-ends-with': 'error',
// '@typescript-eslint/promise-function-async': 'error',
// '@typescript-eslint/prefer-regexp-exec': 'error',
// '@typescript-eslint/promise-function-async': 'error',
// '@typescript-eslint/require-array-sort-compare': 'error',
// '@typescript-eslint/restrict-plus-operands': 'error',
// '@typescript-eslint/unbound-method': 'error',
},
},
// {
// // will introduced after the other warns are fixed
// // typescript and javascript for front end react performance
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,mjs,ts,tsx}'],
// plugins: ['react-perf'],
// rules: {
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
// // 'react-perf/jsx-no-new-array-as-prop': 'error',
// // 'react-perf/jsx-no-new-function-as-prop': 'error',
// // 'react/jsx-no-bind': 'error',
// },
// },
{
// typescript and javascript for front and back end
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
Expand All @@ -882,21 +847,6 @@ module.exports = {
'array-callback-return': 'error',
'no-array-constructor': 'error',
complexity: 'warn',
// This will be turned on after bug fixes are mostly completed
// 'consistent-return': 'warn',
// This will be turned on after bug fixes are mostly completed
// 'func-style': ['warn', 'expression'],
// These will be turned on after bug fixes are mostly completed and we can
// run a fix-lint
/*
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
*/
'node/no-deprecated-api': 'error',
'no-bitwise': 'error',
'no-continue': 'error',
Expand Down Expand Up @@ -936,12 +886,8 @@ module.exports = {
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-computed-key': 'error',
// This will be turned on after bug fixes are mostly complete
// 'no-useless-escape': 'warn',
'no-useless-rename': 'error',
'no-useless-return': 'error',
// This will be turned on after bug fixers are mostly complete
// 'no-void': 'warn',
'one-var-declaration-per-line': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
Expand All @@ -957,9 +903,6 @@ module.exports = {
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'error',
// Re-enable once we have better options per this issue:
// https://github.com/airbnb/javascript/issues/1875
// 'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-redundant-should-component-update': 'error',
Expand All @@ -971,8 +914,6 @@ module.exports = {
'react/no-unsafe': 'error',
'react/no-unused-prop-types': 'error',
'react/no-unused-state': 'error',
// will introduced after the other warns are fixed
// 'react/sort-comp': 'error',
'react/void-dom-elements-no-children': 'error',
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-literals': 'error',
Expand Down Expand Up @@ -1006,7 +947,62 @@ module.exports = {
},
},
{
// typescript and javascript for front and back end
// typescript for /public and /common
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-for-in-array': 'error',
},
},
{
// typescript for /public and /common
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
plugins: ['react'],
env: {
jest: true,
},
rules: {
'react/boolean-prop-naming': 'error',
'react/button-has-type': 'error',
'react/display-name': 'error',
'react/forbid-dom-props': 'error',
'react/no-access-state-in-setstate': 'error',
'react/no-children-prop': 'error',
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'error',
'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-redundant-should-component-update': 'error',
'react/no-render-return-value': 'error',
'react/no-typos': 'error',
'react/no-string-refs': 'error',
'react/no-this-in-sfc': 'error',
'react/no-unescaped-entities': 'error',
'react/no-unsafe': 'error',
'react/no-unused-prop-types': 'error',
'react/no-unused-state': 'error',
'react/sort-comp': 'error',
'react/void-dom-elements-no-children': 'error',
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-literals': 'error',
'react/jsx-no-target-blank': 'error',
'react/jsx-fragments': 'error',
'react/jsx-sort-default-props': 'error',
},
},
{
files: ['x-pack/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'],
plugins: ['react-perf'],
rules: {
'react-perf/jsx-no-new-object-as-prop': 'error',
'react-perf/jsx-no-new-array-as-prop': 'error',
'react-perf/jsx-no-new-function-as-prop': 'error',
'react/jsx-no-bind': 'error',
},
},
{
// typescript and javascript for front and back
files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node'],
env: {
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
/src/plugins/dashboard/ @elastic/kibana-presentation
/src/plugins/input_control_vis/ @elastic/kibana-presentation
/src/plugins/vis_type_markdown/ @elastic/kibana-presentation
/src/plugins/presentation_util/ @elastic/kibana-presentation
/test/functional/apps/dashboard/ @elastic/kibana-presentation
/x-pack/plugins/canvas/ @elastic/kibana-presentation
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-presentation
Expand Down Expand Up @@ -145,7 +146,6 @@
# Operations
/src/dev/ @elastic/kibana-operations
/src/setup_node_env/ @elastic/kibana-operations
/src/optimize/ @elastic/kibana-operations
/packages/*eslint*/ @elastic/kibana-operations
/packages/*babel*/ @elastic/kibana-operations
/packages/kbn-dev-utils*/ @elastic/kibana-operations
Expand Down Expand Up @@ -232,8 +232,8 @@
/x-pack/plugins/telemetry_collection_xpack/ @elastic/kibana-core
/.telemetryrc.json @elastic/kibana-core
/x-pack/.telemetryrc.json @elastic/kibana-core
src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry
x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry
/src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry
/x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry

# Kibana Localization
/src/dev/i18n/ @elastic/kibana-localization @elastic/kibana-core
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
- name: Run Backport
uses: ./actions/backport
with:
branch: master
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
commit_user: kibanamachine
commit_email: [email protected]
auto_merge: 'true'
auto_merge_method: 'squash'
manual_backport_command_template: 'node scripts/backport --pr %pullNumber%'
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "bfacf15161d96a6a39510e7b3d3b522cf61cb8b82a31e79400a84c5abcab5347",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.1/rules_nodejs-3.2.1.tar.gz"],
sha256 = "55a25a762fcf9c9b88ab54436581e671bc9f4f523cb5a1bd32459ebec7be68a8",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.2/rules_nodejs-3.2.2.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.2.1")
check_rules_nodejs_version(minimum_version_string = "3.2.2")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand Down
18 changes: 0 additions & 18 deletions api_docs/case.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions api_docs/cases.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "case",
"id": "cases",
"client": {
"classes": [],
"functions": [],
Expand Down Expand Up @@ -34,7 +34,7 @@
{
"pluginId": "cases",
"scope": "server",
"docId": "kibCasePluginApi",
"docId": "kibCasesPluginApi",
"section": "def-server.CasesClient",
"text": "CasesClient"
}
Expand All @@ -60,4 +60,4 @@
"misc": [],
"objects": []
}
}
}
18 changes: 18 additions & 0 deletions api_docs/cases.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: kibCasesPluginApi
slug: /kibana-dev-docs/casesPluginApi
title: cases
image: https://source.unsplash.com/400x175/?github
summary: API docs for the cases plugin
date: 2020-11-16
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---

import casesObj from './cases.json';

## Server

### Interfaces
<DocDefinitionList data={casesObj.server.interfaces}/>

8 changes: 4 additions & 4 deletions api_docs/charts.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
"children": [
{
"type": "Object",
"label": "{ onChange, color: selectedColor, id, label }",
"label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n}",
"isRequired": true,
"signature": [
"ColorPickerProps"
],
"description": [],
"source": {
"path": "src/plugins/charts/public/static/components/color_picker.tsx",
"lineNumber": 83
"lineNumber": 108
}
}
],
"signature": [
"({ onChange, color: selectedColor, id, label }: ColorPickerProps) => JSX.Element"
"({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, }: ColorPickerProps) => JSX.Element"
],
"description": [],
"label": "ColorPicker",
"source": {
"path": "src/plugins/charts/public/static/components/color_picker.tsx",
"lineNumber": 83
"lineNumber": 108
},
"tags": [],
"returnComment": [],
Expand Down
8 changes: 4 additions & 4 deletions api_docs/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@
"description": [],
"source": {
"path": "src/core/public/doc_links/doc_links_service.ts",
"lineNumber": 282
"lineNumber": 283
}
},
{
Expand All @@ -1442,7 +1442,7 @@
"description": [],
"source": {
"path": "src/core/public/doc_links/doc_links_service.ts",
"lineNumber": 283
"lineNumber": 284
}
},
{
Expand All @@ -1453,7 +1453,7 @@
"description": [],
"source": {
"path": "src/core/public/doc_links/doc_links_service.ts",
"lineNumber": 284
"lineNumber": 285
},
"signature": [
"{ readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; }; readonly auditbeat: { readonly base: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly enterpriseSearch: { readonly base: string; readonly appSearchBase: string; readonly workplaceSearchBase: string; }; readonly heartbeat: { readonly base: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite_missing_bucket: string; readonly date_histogram: string; readonly date_range: string; readonly date_format_pattern: string; readonly filter: string; readonly filters: string; readonly geohash_grid: string; readonly histogram: string; readonly ip_range: string; readonly range: string; readonly significant_terms: string; readonly terms: string; readonly avg: string; readonly avg_bucket: string; readonly max_bucket: string; readonly min_bucket: string; readonly sum_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative_sum: string; readonly derivative: string; readonly geo_bounds: string; readonly geo_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving_avg: string; readonly percentile_ranks: string; readonly serial_diff: string; readonly std_dev: string; readonly sum: string; readonly top_hits: string; }; readonly runtimeFields: string; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly indexPatterns: { readonly loadingData: string; readonly introduction: string; }; readonly addData: string; readonly kibana: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly guide: string; readonly gettingStarted: string; }; readonly query: { readonly eql: string; readonly luceneQuerySyntax: string; readonly queryDsl: string; readonly kueryQuerySyntax: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putWatch: string; updateTransform: string; }>; readonly observability: Record<string, string>; readonly alerting: Record<string, string>; readonly maps: Record<string, string>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; }"
Expand All @@ -1462,7 +1462,7 @@
],
"source": {
"path": "src/core/public/doc_links/doc_links_service.ts",
"lineNumber": 281
"lineNumber": 282
},
"initialIsOpen": false
},
Expand Down
Loading

0 comments on commit 1c2a9ac

Please sign in to comment.