-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into issue-move-autocomp…
…lete-to-unified-search
- Loading branch information
Showing
587 changed files
with
81,274 additions
and
77,878 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ xpack: | |
- ciGroup27 | ||
- ciGroup28 | ||
- ciGroup29 | ||
- ciGroup30 |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ | |
"@elastic/apm-rum": "^5.10.2", | ||
"@elastic/apm-rum-react": "^1.3.4", | ||
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace", | ||
"@elastic/charts": "45.1.1", | ||
"@elastic/charts": "46.0.0", | ||
"@elastic/datemath": "5.0.3", | ||
"@elastic/elasticsearch": "npm:@elastic/[email protected]", | ||
"@elastic/ems-client": "8.2.0", | ||
|
@@ -211,6 +211,7 @@ | |
"@types/jsonwebtoken": "^8.5.6", | ||
"@types/mapbox__vector-tile": "1.3.0", | ||
"@types/moment-duration-format": "^2.2.3", | ||
"@types/react-is": "^16.7.1", | ||
"JSONStream": "1.3.5", | ||
"abort-controller": "^3.0.0", | ||
"antlr4ts": "^0.5.0-alpha.3", | ||
|
@@ -226,7 +227,7 @@ | |
"chokidar": "^3.4.3", | ||
"chroma-js": "^1.4.1", | ||
"classnames": "2.2.6", | ||
"color": "1.0.3", | ||
"color": "^4.2.3", | ||
"commander": "^4.1.1", | ||
"compare-versions": "3.5.1", | ||
"constate": "^1.3.2", | ||
|
@@ -539,7 +540,7 @@ | |
"@types/chromedriver": "^81.0.1", | ||
"@types/classnames": "^2.2.9", | ||
"@types/cmd-shim": "^2.0.0", | ||
"@types/color": "^3.0.0", | ||
"@types/color": "^3.0.3", | ||
"@types/compression-webpack-plugin": "^2.0.2", | ||
"@types/cypress-cucumber-preprocessor": "^1.14.1", | ||
"@types/cytoscape": "^3.14.0", | ||
|
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
8 changes: 0 additions & 8 deletions
8
packages/kbn-coloring/src/shared_components/coloring/palette_configuration.scss
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,56 @@ | ||
# @kbn/eslint-plugin-imports | ||
|
||
ESLint plugin providing custom rules for validating imports in the Kibana repo with custom logic beyond what's possible with custom config to eslint-plugin-imports and even a custom resolver | ||
ESLint plugin providing custom rules for validating imports in the Kibana repo with custom logic beyond what's possible with custom config to eslint-plugin-imports and even a custom resolver. | ||
|
||
## `resolveKibanaImport(request: string, dirname: string)` | ||
For the purposes of this ESLint plugin "imports" include: | ||
|
||
Resolve an import request (the "from" string from an import statement, or any other relative/absolute import path) from a given directory. The `dirname` should be the same for all files in a given directory. | ||
- `import` statements | ||
- `import()` expressions | ||
- `export ... from` statements | ||
- `require()` calls | ||
- `require.resolve()` calls | ||
- `jest.mock()` and related calls | ||
|
||
Result will be `null` when the import path does not resolve, but all valid/committed import paths *should* resolve. Other result values are documented in src/resolve_result.ts. | ||
An "import request" is the string defining the target package/module by any of the previous mentioned "import" types | ||
|
||
## `@kbn/imports/no_unresolvable_imports` | ||
|
||
This rule validates that every import request in the repository can be resolved by `@kbn/import-resolver`. | ||
|
||
This rule is not configurable, should never be skipped, and is auto-fixable. | ||
|
||
If a valid import request can't be resolved for some reason please reach out to Kibana Operations to work on either a different strategy for the import or help updating the resolve to support the new import strategy. | ||
|
||
## `@kbn/imports/uniform_imports` | ||
|
||
This rule validates that every import request in the repsitory follows a standard set of formatting rules. See the rule implemeation for a full breakdown but here is a breif summary: | ||
|
||
- imports within a single package must use relative paths | ||
- imports across packages must reference the other package using it's module id | ||
- imports to code not in a package must use relative paths | ||
- imports to an `index` file end with the directory name, ie `/index` or `/index.{ext}` are stripped | ||
- unless this is a `require.resolve()`, the imports should not mention file extensions. `require.resolve()` calls will retain the extension if added manually | ||
|
||
This rule is not configurable, should never be skipped, and is auto-fixable. | ||
|
||
## `@kbn/imports/exports_moved_packages` | ||
|
||
This rule assists package authors who are doing the good work of breaking up large packages. The goal is to define exports which used to be part of one package as having moved to another package. The configuration maintains this mapping and is designed to be extended in the future is additional needs arrise like targetting specific package types. | ||
|
||
Config example: | ||
```ts | ||
'@kbn/imports/exports_moved_packages': ['error', [ | ||
{ | ||
fromPackage: '@kbn/kitchen-sink', | ||
toPackage: '@kbn/spatula', | ||
exportNames: [ | ||
'Spatula', | ||
'isSpatula' | ||
] | ||
} | ||
]] | ||
``` | ||
|
||
This config will find any import of `@kbn/kitchen-sink` which specifically references the `Spatula` or `isSpatula` exports, remove the old exports from the import (potentially removing the entire import), and add a new import after the previous following it's style pointing to the new package. | ||
|
||
The auto-fixer here covers the vast majority of import styles in the repository but might not cover everything, including `import * as Namespace from '@kbn/kitchen-sink'`. Imports like this will need to be found and updated manually, though TypeScript should be able to find the vast majority of those. |
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,13 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test/jest_node', | ||
rootDir: '../..', | ||
roots: ['<rootDir>/packages/kbn-eslint-plugin-imports'], | ||
}; |
Oops, something went wrong.