mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 04:42:13 +08:00
PackageJson: Prettify markdown/mdx on commit with lint-staged (#37616)
* Format md,mdx files with prettier on lint-staged * Manually run prettier on docs/sources
This commit is contained in:
@ -16,7 +16,7 @@ Allow the user to learn your plugin in small steps. Provide a useful default con
|
||||
For example, by selecting the first field of an expected type, the panel can display a visualization without any user configuration. If a user explicitly selects a field, then use that one. Otherwise, default to the first field of type `string`:
|
||||
|
||||
```ts
|
||||
const numberField = frame.fields.find(field =>
|
||||
const numberField = frame.fields.find((field) =>
|
||||
options.numberFieldName ? field.name === options.numberFieldName : field.type === FieldType.number
|
||||
);
|
||||
```
|
||||
@ -54,10 +54,10 @@ Users have full freedom when they create data source queries for panels. If your
|
||||
|
||||
```ts
|
||||
if (!numberField) {
|
||||
throw new Error('Query result is missing a number field')
|
||||
throw new Error('Query result is missing a number field');
|
||||
}
|
||||
|
||||
if (frame.length === 0) {
|
||||
throw new Error('Query returned an empty result')
|
||||
throw new Error('Query returned an empty result');
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user