kibana/packages/kbn-plugin-check
Nick Partridge 49a985625b
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>
2024-07-24 17:29:05 +01:00
..
dependencies [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
lib [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
.eslintrc.json [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
const.ts [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
dependents.ts [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
index.ts [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
jest.config.js [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
kibana.jsonc [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
package.json [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
rank.ts [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
README.md [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
tsconfig.json [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
types.ts Upgrade prettier dependencies (#188032) 2024-07-24 17:29:05 +01:00

@kbn/plugin-check

This package contains a CLI to detect inconsistencies between the manifest and Typescript types of a Kibana plugin. Future work will include automatically fixing these inconsistencies.

Usage

To check a single plugin, run the following command from the root of the Kibana repo:

node scripts/plugin_check --plugin pluginName

To check all plugins owned by a team, run the following:

node scripts/plugin_check --team @elastic/team_name