mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
## 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> |
||
---|---|---|
.. | ||
dependencies | ||
lib | ||
.eslintrc.json | ||
const.ts | ||
dependents.ts | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
rank.ts | ||
README.md | ||
tsconfig.json | ||
types.ts |
@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