-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into multi-field-terms
- Loading branch information
Showing
608 changed files
with
6,968 additions
and
3,198 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Data view field editor example | ||
|
||
This example data view field editor app shows how to: | ||
- Edit data view fields via flyout | ||
- Delete data view runtime fields with modal confirm prompt | ||
|
||
To run this example, use the command `yarn start --run-examples`. |
6 changes: 3 additions & 3 deletions
6
..._pattern_field_editor_example/kibana.json → ...ata_view_field_editor_example/kibana.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"id": "indexPatternFieldEditorExample", | ||
"id": "dataViewFieldEditorExample", | ||
"kibanaVersion": "kibana", | ||
"version": "0.0.1", | ||
"server": false, | ||
"ui": true, | ||
"requiredPlugins": ["data", "indexPatternFieldEditor", "developerExamples"], | ||
"requiredPlugins": ["data", "dataViewFieldEditor", "developerExamples"], | ||
"optionalPlugins": [], | ||
"requiredBundles": [], | ||
"owner": { | ||
"name": "App Services", | ||
"githubTeam": "kibana-app-services" | ||
}, | ||
"description": "Index pattern field editor example app" | ||
"description": "Data view field editor example app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
packages/kbn-eslint-plugin-eslint/rules/no_this_in_property_initializers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
const tsEstree = require('@typescript-eslint/typescript-estree'); | ||
const traverse = require('eslint-traverse'); | ||
const esTypes = tsEstree.AST_NODE_TYPES; | ||
|
||
/** @typedef {import("eslint").Rule.RuleModule} Rule */ | ||
/** @typedef {import("@typescript-eslint/typescript-estree").TSESTree.Node} Node */ | ||
/** @typedef {import("@typescript-eslint/typescript-estree").TSESTree.ClassBody} ClassBody */ | ||
|
||
/** | ||
* @param {string} arg | ||
*/ | ||
const ERROR_MSG = `"this" is not fully initialized in class property intializers, define the value for this property in the constructor instead`; | ||
|
||
/** @type {Rule} */ | ||
module.exports = { | ||
meta: { | ||
schema: [], | ||
}, | ||
create: (context) => ({ | ||
ClassBody(_) { | ||
const node = /** @type {ClassBody} */ (_); | ||
|
||
for (const prop of node.body) { | ||
if (prop.type !== esTypes.PropertyDefinition) { | ||
continue; | ||
} | ||
|
||
const visitor = (path) => { | ||
/** @type {Node} node */ | ||
const node = path.node; | ||
|
||
if ( | ||
node.type === esTypes.FunctionExpression || | ||
node.type === esTypes.ArrowFunctionExpression | ||
) { | ||
return traverse.STOP; | ||
} | ||
|
||
if ( | ||
node.type === esTypes.ThisExpression && | ||
node.parent?.type !== esTypes.MemberExpression | ||
) { | ||
context.report({ | ||
message: ERROR_MSG, | ||
loc: node.loc, | ||
}); | ||
} | ||
}; | ||
|
||
traverse(context, prop, visitor); | ||
} | ||
}, | ||
}), | ||
}; |
Oops, something went wrong.