Skip to content

Commit b698df9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into kbn-77020-migrate-optimizer-mixin
2 parents 1291e3b + 83c6bcc commit b698df9

File tree

1,691 files changed

+40389
-14330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,691 files changed

+40389
-14330
lines changed

.eslintrc.js

Lines changed: 57 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ module.exports = {
794794
{
795795
files: ['x-pack/plugins/fleet/**/*.{js,mjs,ts,tsx}'],
796796
rules: {
797+
'@typescript-eslint/consistent-type-imports': 'error',
797798
'import/order': [
798799
'warn',
799800
{
@@ -828,48 +829,12 @@ module.exports = {
828829
// typescript only for front and back end
829830
files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
830831
rules: {
831-
// This will be turned on after bug fixes are complete
832-
// '@typescript-eslint/explicit-member-accessibility': 'warn',
833832
'@typescript-eslint/no-this-alias': 'error',
834833
'@typescript-eslint/no-explicit-any': 'error',
835834
'@typescript-eslint/no-useless-constructor': 'error',
836-
// This will be turned on after bug fixes are complete
837-
// '@typescript-eslint/no-object-literal-type-assertion': 'warn',
838835
'@typescript-eslint/unified-signatures': 'error',
839-
840-
// eventually we want this to be a warn and then an error since this is a recommended linter rule
841-
// for now, keeping it commented out to avoid too much IDE noise until the other linter issues
842-
// are fixed in the next release or two
843-
// '@typescript-eslint/explicit-function-return-type': 'warn',
844-
845-
// these rules cannot be turned on and tested at the moment until this issue is resolved:
846-
// https://github.com/prettier/prettier-eslint/issues/201
847-
// '@typescript-eslint/await-thenable': 'error',
848-
// '@typescript-eslint/no-non-null-assertion': 'error'
849-
// '@typescript-eslint/no-unnecessary-type-assertion': 'error',
850-
// '@typescript-eslint/no-unused-vars': 'error',
851-
// '@typescript-eslint/prefer-includes': 'error',
852-
// '@typescript-eslint/prefer-string-starts-ends-with': 'error',
853-
// '@typescript-eslint/promise-function-async': 'error',
854-
// '@typescript-eslint/prefer-regexp-exec': 'error',
855-
// '@typescript-eslint/promise-function-async': 'error',
856-
// '@typescript-eslint/require-array-sort-compare': 'error',
857-
// '@typescript-eslint/restrict-plus-operands': 'error',
858-
// '@typescript-eslint/unbound-method': 'error',
859836
},
860837
},
861-
// {
862-
// // will introduced after the other warns are fixed
863-
// // typescript and javascript for front end react performance
864-
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,mjs,ts,tsx}'],
865-
// plugins: ['react-perf'],
866-
// rules: {
867-
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
868-
// // 'react-perf/jsx-no-new-array-as-prop': 'error',
869-
// // 'react-perf/jsx-no-new-function-as-prop': 'error',
870-
// // 'react/jsx-no-bind': 'error',
871-
// },
872-
// },
873838
{
874839
// typescript and javascript for front and back end
875840
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
@@ -882,21 +847,6 @@ module.exports = {
882847
'array-callback-return': 'error',
883848
'no-array-constructor': 'error',
884849
complexity: 'warn',
885-
// This will be turned on after bug fixes are mostly completed
886-
// 'consistent-return': 'warn',
887-
// This will be turned on after bug fixes are mostly completed
888-
// 'func-style': ['warn', 'expression'],
889-
// These will be turned on after bug fixes are mostly completed and we can
890-
// run a fix-lint
891-
/*
892-
'import/order': [
893-
'warn',
894-
{
895-
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
896-
'newlines-between': 'always',
897-
},
898-
],
899-
*/
900850
'node/no-deprecated-api': 'error',
901851
'no-bitwise': 'error',
902852
'no-continue': 'error',
@@ -936,12 +886,8 @@ module.exports = {
936886
'no-useless-catch': 'error',
937887
'no-useless-concat': 'error',
938888
'no-useless-computed-key': 'error',
939-
// This will be turned on after bug fixes are mostly complete
940-
// 'no-useless-escape': 'warn',
941889
'no-useless-rename': 'error',
942890
'no-useless-return': 'error',
943-
// This will be turned on after bug fixers are mostly complete
944-
// 'no-void': 'warn',
945891
'one-var-declaration-per-line': 'error',
946892
'prefer-object-spread': 'error',
947893
'prefer-promise-reject-errors': 'error',
@@ -957,9 +903,6 @@ module.exports = {
957903
'react/no-danger-with-children': 'error',
958904
'react/no-deprecated': 'error',
959905
'react/no-did-mount-set-state': 'error',
960-
// Re-enable once we have better options per this issue:
961-
// https://github.com/airbnb/javascript/issues/1875
962-
// 'react/no-did-update-set-state': 'error',
963906
'react/no-direct-mutation-state': 'error',
964907
'react/no-find-dom-node': 'error',
965908
'react/no-redundant-should-component-update': 'error',
@@ -971,8 +914,6 @@ module.exports = {
971914
'react/no-unsafe': 'error',
972915
'react/no-unused-prop-types': 'error',
973916
'react/no-unused-state': 'error',
974-
// will introduced after the other warns are fixed
975-
// 'react/sort-comp': 'error',
976917
'react/void-dom-elements-no-children': 'error',
977918
'react/jsx-no-comment-textnodes': 'error',
978919
'react/jsx-no-literals': 'error',
@@ -1006,7 +947,62 @@ module.exports = {
1006947
},
1007948
},
1008949
{
1009-
// typescript and javascript for front and back end
950+
// typescript for /public and /common
951+
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
952+
rules: {
953+
'@typescript-eslint/no-for-in-array': 'error',
954+
},
955+
},
956+
{
957+
// typescript for /public and /common
958+
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
959+
plugins: ['react'],
960+
env: {
961+
jest: true,
962+
},
963+
rules: {
964+
'react/boolean-prop-naming': 'error',
965+
'react/button-has-type': 'error',
966+
'react/display-name': 'error',
967+
'react/forbid-dom-props': 'error',
968+
'react/no-access-state-in-setstate': 'error',
969+
'react/no-children-prop': 'error',
970+
'react/no-danger-with-children': 'error',
971+
'react/no-deprecated': 'error',
972+
'react/no-did-mount-set-state': 'error',
973+
'react/no-did-update-set-state': 'error',
974+
'react/no-direct-mutation-state': 'error',
975+
'react/no-find-dom-node': 'error',
976+
'react/no-redundant-should-component-update': 'error',
977+
'react/no-render-return-value': 'error',
978+
'react/no-typos': 'error',
979+
'react/no-string-refs': 'error',
980+
'react/no-this-in-sfc': 'error',
981+
'react/no-unescaped-entities': 'error',
982+
'react/no-unsafe': 'error',
983+
'react/no-unused-prop-types': 'error',
984+
'react/no-unused-state': 'error',
985+
'react/sort-comp': 'error',
986+
'react/void-dom-elements-no-children': 'error',
987+
'react/jsx-no-comment-textnodes': 'error',
988+
'react/jsx-no-literals': 'error',
989+
'react/jsx-no-target-blank': 'error',
990+
'react/jsx-fragments': 'error',
991+
'react/jsx-sort-default-props': 'error',
992+
},
993+
},
994+
{
995+
files: ['x-pack/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'],
996+
plugins: ['react-perf'],
997+
rules: {
998+
'react-perf/jsx-no-new-object-as-prop': 'error',
999+
'react-perf/jsx-no-new-array-as-prop': 'error',
1000+
'react-perf/jsx-no-new-function-as-prop': 'error',
1001+
'react/jsx-no-bind': 'error',
1002+
},
1003+
},
1004+
{
1005+
// typescript and javascript for front and back
10101006
files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'],
10111007
plugins: ['eslint-plugin-node'],
10121008
env: {

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@
231231
/x-pack/plugins/telemetry_collection_xpack/ @elastic/kibana-core
232232
/.telemetryrc.json @elastic/kibana-core
233233
/x-pack/.telemetryrc.json @elastic/kibana-core
234-
src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry
235-
x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry @elastic/infra-telemetry
234+
/src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry
235+
/x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry
236236

237237
# Kibana Localization
238238
/src/dev/i18n/ @elastic/kibana-localization @elastic/kibana-core

.github/workflows/backport.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
- name: Run Backport
3232
uses: ./actions/backport
3333
with:
34-
branch: master
3534
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
3635
commit_user: kibanamachine
3736
commit_email: 42973632+kibanamachine@users.noreply.github.com
37+
auto_merge: 'true'
38+
auto_merge_method: 'squash'
39+
manual_backport_command_template: 'node scripts/backport --pr %pullNumber%'

WORKSPACE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1010
# Fetch Node.js rules
1111
http_archive(
1212
name = "build_bazel_rules_nodejs",
13-
sha256 = "bfacf15161d96a6a39510e7b3d3b522cf61cb8b82a31e79400a84c5abcab5347",
14-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.1/rules_nodejs-3.2.1.tar.gz"],
13+
sha256 = "55a25a762fcf9c9b88ab54436581e671bc9f4f523cb5a1bd32459ebec7be68a8",
14+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.2.2/rules_nodejs-3.2.2.tar.gz"],
1515
)
1616

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

2020
# Assure we have at least a given rules_nodejs version
21-
check_rules_nodejs_version(minimum_version_string = "3.2.1")
21+
check_rules_nodejs_version(minimum_version_string = "3.2.2")
2222

2323
# Setup the Node.js toolchain for the architectures we want to support
2424
#

api_docs/charts.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99
"children": [
1010
{
1111
"type": "Object",
12-
"label": "{ onChange, color: selectedColor, id, label }",
12+
"label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n}",
1313
"isRequired": true,
1414
"signature": [
1515
"ColorPickerProps"
1616
],
1717
"description": [],
1818
"source": {
1919
"path": "src/plugins/charts/public/static/components/color_picker.tsx",
20-
"lineNumber": 83
20+
"lineNumber": 108
2121
}
2222
}
2323
],
2424
"signature": [
25-
"({ onChange, color: selectedColor, id, label }: ColorPickerProps) => JSX.Element"
25+
"({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, }: ColorPickerProps) => JSX.Element"
2626
],
2727
"description": [],
2828
"label": "ColorPicker",
2929
"source": {
3030
"path": "src/plugins/charts/public/static/components/color_picker.tsx",
31-
"lineNumber": 83
31+
"lineNumber": 108
3232
},
3333
"tags": [],
3434
"returnComment": [],

api_docs/core.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@
14311431
"description": [],
14321432
"source": {
14331433
"path": "src/core/public/doc_links/doc_links_service.ts",
1434-
"lineNumber": 282
1434+
"lineNumber": 283
14351435
}
14361436
},
14371437
{
@@ -1442,7 +1442,7 @@
14421442
"description": [],
14431443
"source": {
14441444
"path": "src/core/public/doc_links/doc_links_service.ts",
1445-
"lineNumber": 283
1445+
"lineNumber": 284
14461446
}
14471447
},
14481448
{
@@ -1453,7 +1453,7 @@
14531453
"description": [],
14541454
"source": {
14551455
"path": "src/core/public/doc_links/doc_links_service.ts",
1456-
"lineNumber": 284
1456+
"lineNumber": 285
14571457
},
14581458
"signature": [
14591459
"{ 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>; }"
@@ -1462,7 +1462,7 @@
14621462
],
14631463
"source": {
14641464
"path": "src/core/public/doc_links/doc_links_service.ts",
1465-
"lineNumber": 281
1465+
"lineNumber": 282
14661466
},
14671467
"initialIsOpen": false
14681468
},

0 commit comments

Comments
 (0)