mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Upgrade prettier dependencies (#188032)
## Summary - Upgrade `prettier` to `v2.8.x`. - Upgrade related decencies. - Adds `prettier` group to renovate config. - Fixes bootstrapping type error. ## Main Changes ### Add parentheses for `TypeofTypeAnnotation` to improve readability [link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-for-typeoftypeannotation-to-improve-readability-14458-by-fisker) ```ts // Input type A = (typeof node.children)[]; // Prettier 2.8.4 type A = typeof node.children[]; // Prettier 2.8.5 type A = (typeof node.children)[]; ``` ### Add parentheses to head of `ExpressionStatement` instead of the whole statement [link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-to-head-of-expressionstatement-instead-of-the-whole-statement-14077-by-fisker) ```ts // Input ({}).toString.call(foo) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo); // Prettier 2.8.1 ({}.toString.call(foo) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo)); // Prettier 2.8.2 ({}).toString.call(foo.forEach) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo); ``` ## Details This started because I noticed we were on `typescript@^5` but still on an old prettier that complained about use of new TS features such as [`satisfies`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator). --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
b4d1bc5dd7
commit
49a985625b
269 changed files with 628 additions and 590 deletions
|
@ -19,28 +19,28 @@ import {
|
|||
} from './const';
|
||||
|
||||
/** An enumeration of plugin classes within a single plugin. */
|
||||
export type PluginLayer = typeof PLUGIN_LAYERS[number];
|
||||
export type PluginLayer = (typeof PLUGIN_LAYERS)[number];
|
||||
|
||||
/** An enumeration of dependency requirements for a plugin. */
|
||||
export type PluginRequirement = typeof PLUGIN_REQUIREMENTS[number];
|
||||
export type PluginRequirement = (typeof PLUGIN_REQUIREMENTS)[number];
|
||||
|
||||
/** An enumeration of lifecycles a plugin should implement. */
|
||||
export type PluginLifecycle = typeof PLUGIN_LIFECYCLES[number];
|
||||
export type PluginLifecycle = (typeof PLUGIN_LIFECYCLES)[number];
|
||||
|
||||
/** An enumeration of manifest requirement states for a plugin dependency. */
|
||||
export type ManifestRequirement = typeof MANIFEST_REQUIREMENTS[number];
|
||||
export type ManifestRequirement = (typeof MANIFEST_REQUIREMENTS)[number];
|
||||
|
||||
/** An enumeration of derived manifest states for a plugin dependency. */
|
||||
export type ManifestState = typeof MANIFEST_STATES[number];
|
||||
export type ManifestState = (typeof MANIFEST_STATES)[number];
|
||||
|
||||
/** An enumeration of derived plugin states for a dependency. */
|
||||
export type PluginState = typeof PLUGIN_STATES[number];
|
||||
export type PluginState = (typeof PLUGIN_STATES)[number];
|
||||
|
||||
/** An enumeration of derived dependency states. */
|
||||
export type DependencyState = typeof DEPENDENCY_STATES[number];
|
||||
export type DependencyState = (typeof DEPENDENCY_STATES)[number];
|
||||
|
||||
/** An enumeration of where a type could be derived from a plugin class. */
|
||||
export type SourceOfType = typeof SOURCE_OF_TYPE[number];
|
||||
export type SourceOfType = (typeof SOURCE_OF_TYPE)[number];
|
||||
|
||||
/** Information about a given plugin. */
|
||||
export interface PluginInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue