Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbe11d1

Browse files
committedOct 22, 2022
just getting rid of vale warnings
Signed-off-by: Fredrik Adelöw <[email protected]>
1 parent fda7d90 commit cbe11d1

File tree

24 files changed

+133
-108
lines changed

24 files changed

+133
-108
lines changed
 

‎.changeset/gorgeous-balloons-sit.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@backstage/plugin-auth-backend': patch
3+
'@backstage/plugin-cost-insights': patch
4+
'@backstage/plugin-dynatrace': patch
5+
'@backstage/plugin-stack-overflow-backend': patch
6+
'@backstage/plugin-techdocs': patch
7+
---
8+
9+
Tweak README

‎.github/vale/Vocab/Backstage/accept.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
abc
22
accessors
3+
ACLs
34
addon
45
addons
56
ADRs
@@ -17,6 +18,7 @@ autoscaling
1718
Autoscaling
1819
autoselect
1920
Avro
21+
backend's
2022
backported
2123
backporting
2224
Bigtable
@@ -88,6 +90,8 @@ dockerfiles
8890
Dockerize
8991
dockerode
9092
Docusaurus
93+
DOMPurify
94+
don'ts
9195
dynatrace
9296
Dynatrace
9397
ecco
@@ -96,6 +100,8 @@ Env
96100
elasticsearch
97101
esbuild
98102
eslint
103+
ESModule
104+
ESModules
99105
etag
100106
Expedia
101107
facto
@@ -136,8 +142,10 @@ iLert
136142
img
137143
incentivised
138144
Indal
145+
indexable
139146
inlined
140147
inlinehilite
148+
integrator's
141149
interop
142150
JaCoCo
143151
JavaScript
@@ -168,6 +176,7 @@ lunr
168176
Luxon
169177
magiclink
170178
mailto
179+
maintainer's
171180
maintainership
172181
makefile
173182
md
@@ -222,6 +231,7 @@ orgs
222231
pagerduty
223232
pageview
224233
parallelization
234+
parseable
225235
Patrik
226236
Peloton
227237
performant
@@ -306,6 +316,10 @@ stringify
306316
stringified
307317
subcomponent
308318
subcomponents
319+
subfolder
320+
subfolders
321+
subheader
322+
subheaders
309323
subkey
310324
subroutes
311325
subtree
@@ -326,6 +340,7 @@ templater
326340
Templater
327341
templaters
328342
Templaters
343+
TFRecord
329344
theia
330345
thumbsup
331346
todo
@@ -365,6 +380,7 @@ VSCode
365380
Wayfair
366381
Weaveworks
367382
Webpack
383+
widget's
368384
winston
369385
www
370386
WWW

‎STYLE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Our TypeScript style is inspired by the [style guidelines](https://github.com/Mi
1111
1. Use PascalCase for type names.
1212
1. Do not use `I` as a prefix for interface names.
1313
1. Use PascalCase for `enum` values.
14-
1. Use camelCase for function names.
15-
1. Use camelCase for property names and local variables.
14+
1. Use `camelCase` for function names.
15+
1. Use `camelCase` for property names and local variables.
1616
1. Do not use `_` as a prefix for private properties.
1717
1. Use whole words in names when possible.
1818
1. Give type parameters names prefixed with `T`, for example `Request<TBody>`.

‎docs/api/utility-apis.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@ both with other plugins and the app itself.
1313

1414
Backstage provides two primary methods for plugins to communicate across their
1515
boundaries in client-side code. The first one being the
16-
[createPlugin](../reference/core-plugin-api.createplugin.md) API along with the
16+
[`createPlugin`](../reference/core-plugin-api.createplugin.md) API along with the
1717
extensions that it can provide, and the second one being Utility APIs. While the
18-
[createPlugin](../reference/core-plugin-api.createplugin.md) API is focused on
18+
[`createPlugin`](../reference/core-plugin-api.createplugin.md) API is focused on
1919
the initialization plugins and the app, the Utility APIs provide ways for
2020
plugins to communicate during their entire life cycle.
2121

2222
## Consuming APIs
2323

24-
Each Utility API is tied to an [ApiRef](../reference/core-plugin-api.apiref.md)
24+
Each Utility API is tied to an [`ApiRef`](../reference/core-plugin-api.apiref.md)
2525
instance, which is a global singleton object without any additional state or
2626
functionality, its only purpose is to reference Utility APIs.
27-
[ApiRef](../reference/core-plugin-api.apiref.md)s are created using
28-
[createApiRef](../reference/core-plugin-api.createapiref.md), which is exported
29-
by [@backstage/core-plugin-api](../reference/core-plugin-api.md). There are also
27+
[`ApiRef`](../reference/core-plugin-api.apiref.md)s are created using
28+
[`createApiRef`](../reference/core-plugin-api.createapiref.md), which is exported
29+
by [`@backstage/core-plugin-api`](../reference/core-plugin-api.md). There are also
3030
many predefined Utility APIs in
31-
[@backstage/core-plugin-api](../reference/core-plugin-api.md), and they're all
31+
[`@backstage/core-plugin-api`](../reference/core-plugin-api.md), and they're all
3232
exported with a name of the pattern `*ApiRef`, for example
33-
[errorApiRef](../reference/core-plugin-api.errorapiref.md).
33+
[`errorApiRef`](../reference/core-plugin-api.errorapiref.md).
3434

3535
To access one of the Utility APIs inside a React component, use the
36-
[useApi](../reference/core-plugin-api.useapi.md) hook exported by
37-
[@backstage/core-plugin-api](../reference/core-plugin-api.md), or the
38-
[withApis](../reference/core-plugin-api.withapis.md) HOC if you prefer class
36+
[`useApi`](../reference/core-plugin-api.useapi.md) hook exported by
37+
[`@backstage/core-plugin-api`](../reference/core-plugin-api.md), or the
38+
[`withApis`](../reference/core-plugin-api.withapis.md) HOC if you prefer class
3939
components. For example, the
40-
[ErrorApi](../reference/core-plugin-api.errorapi.md) can be accessed like this:
40+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md) can be accessed like this:
4141

4242
```tsx
4343
import React from 'react';
@@ -56,30 +56,30 @@ export const MyComponent = () => {
5656
```
5757

5858
Note that there is no explicit type given for
59-
[ErrorApi](../reference/core-plugin-api.errorapi.md). This is because the
60-
[errorApiRef](../reference/core-plugin-api.errorapiref.md) has the type
61-
embedded, and [useApi](../reference/core-plugin-api.useapi.md) is able to infer
59+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md). This is because the
60+
[`errorApiRef`](../reference/core-plugin-api.errorapiref.md) has the type
61+
embedded, and [`useApi`](../reference/core-plugin-api.useapi.md) is able to infer
6262
the type.
6363

6464
Also note that consuming Utility APIs is not limited to plugins, it can be done
6565
from any component inside Backstage, including the ones in
66-
[@backstage/core-plugin-api](../reference/core-plugin-api.md). The only
66+
[`@backstage/core-plugin-api`](../reference/core-plugin-api.md). The only
6767
requirement is that they are beneath the `AppProvider` in the react tree.
6868

6969
## Supplying APIs
7070

7171
### API Factories
7272

7373
APIs are registered in the form of
74-
[ApiFactories](../reference/core-plugin-api.apifactory.md), which encapsulate
74+
[`ApiFactory`](../reference/core-plugin-api.apifactory.md) instances, which encapsulate
7575
the process of instantiating an API. It is a collection of three things: the
76-
[ApiRef](../reference/core-plugin-api.apiref.md) of the API to instantiate, a
76+
[`ApiRef`](../reference/core-plugin-api.apiref.md) of the API to instantiate, a
7777
list of all required dependencies, and a factory function that returns a new API
7878
instance.
7979

8080
For example, this is the default
81-
[ApiFactory](../reference/core-plugin-api.apifactory.md) for the
82-
[ErrorApi](../reference/core-plugin-api.errorapi.md):
81+
[`ApiFactory`](../reference/core-plugin-api.apifactory.md) for the
82+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md):
8383

8484
```ts
8585
createApiFactory({
@@ -93,25 +93,25 @@ createApiFactory({
9393
});
9494
```
9595

96-
In this example the [errorApiRef](../reference/core-plugin-api.errorapiref.md)
96+
In this example the [`errorApiRef`](../reference/core-plugin-api.errorapiref.md)
9797
is our API, which encapsulates the
98-
[ErrorApi](../reference/core-plugin-api.errorapi.md) type. The
99-
[alertApiRef](../reference/core-plugin-api.alertapiref.md) is our single
98+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md) type. The
99+
[`alertApiRef`](../reference/core-plugin-api.alertapiref.md) is our single
100100
dependency, which we give the name `alertApi`, and is then passed on to the
101101
factory function, which returns an implementation of the
102-
[ErrorApi](../reference/core-plugin-api.errorapi.md).
102+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md).
103103

104-
The [createApiFactory](../reference/core-plugin-api.createapifactory.md)
104+
The [`createApiFactory`](../reference/core-plugin-api.createapifactory.md)
105105
function is a thin wrapper that enables TypeScript type inference. You may
106106
notice that there are no type annotations in the above example, and that is
107107
because we're able to infer all types from the
108-
[ApiRef](../reference/core-plugin-api.apiref.md)s. TypeScript will make sure
108+
[`ApiRef`](../reference/core-plugin-api.apiref.md)s. TypeScript will make sure
109109
that the return value of the `factory` function matches the type embedded in
110-
`api`'s [ApiRef](../reference/core-plugin-api.apiref.md), in this case the
111-
[ErrorApi](../reference/core-plugin-api.errorapi.md). It will also match the
110+
`api`'s [`ApiRef`](../reference/core-plugin-api.apiref.md), in this case the
111+
[`ErrorApi`](../reference/core-plugin-api.errorapi.md). It will also match the
112112
types between the `deps` and the parameters of the `factory` function, again
113113
using the type embedded within the
114-
[ApiRef](../reference/core-plugin-api.apiref.md)s.
114+
[`ApiRef`](../reference/core-plugin-api.apiref.md)s.
115115

116116
## Registering API Factories
117117

@@ -123,27 +123,27 @@ app, and the app itself.
123123

124124
Starting with the Backstage core library, it provides implementations for all of
125125
the core APIs. The core APIs are the ones exported by
126-
[@backstage/core-plugin-api](../reference/core-plugin-api.md), such as the
127-
[errorApiRef](../reference/core-plugin-api.errorapiref.md) and
128-
[configApiRef](../reference/core-plugin-api.configapiref.md).
126+
[`@backstage/core-plugin-api`](../reference/core-plugin-api.md), such as the
127+
[`errorApiRef`](../reference/core-plugin-api.errorapiref.md) and
128+
[`configApiRef`](../reference/core-plugin-api.configapiref.md).
129129

130130
The core APIs are loaded for any app created with
131-
[createApp](../reference/app-defaults.createapp.md) from
132-
[@backstage/core-plugin-api](../reference/app-defaults.md), which means that
131+
[`createApp`](../reference/app-defaults.createapp.md) from
132+
[`@backstage/core-plugin-api`](../reference/app-defaults.md), which means that
133133
there is no step that needs to be taken to include these APIs in an app.
134134

135135
### Plugin APIs
136136

137137
In addition to the core APIs, plugins can define and export their own APIs.
138138
While doing so they should usually also provide default implementations of their
139139
own APIs, for example, the `catalog` plugin exports `catalogApiRef`, and also
140-
supplies a default [ApiFactory](../reference/core-plugin-api.apifactory.md) of
140+
supplies a default [`ApiFactory`](../reference/core-plugin-api.apifactory.md) of
141141
that API using the `CatalogClient`. There is one restriction to plugin-provided
142142
API Factories: plugins may not supply factories for core APIs, trying to do so
143143
will cause the app to refuse to start.
144144

145145
Plugins supply their APIs through the `apis` option of
146-
[createPlugin](../reference/core-plugin-api.createplugin.md), for example:
146+
[`createPlugin`](../reference/core-plugin-api.createplugin.md), for example:
147147

148148
```ts
149149
export const techdocsPlugin = createPlugin({
@@ -168,7 +168,7 @@ Lastly, the app itself is the final point where APIs can be added, and what has
168168
the final say in what APIs will be loaded at runtime. The app may override the
169169
factories for any of the core or plugin APIs, with the exception of the config,
170170
app theme, and identity APIs. These are static APIs that are tied into the
171-
[createApp](../reference/app-defaults.createapp.md) implementation, and
171+
[`createApp`](../reference/app-defaults.createapp.md) implementation, and
172172
therefore not possible to override.
173173

174174
Overriding APIs is useful for apps that want to switch out behavior to tailor it
@@ -231,19 +231,19 @@ const app = createApp({
231231
```
232232

233233
Note that the above line will cause an error if `IgnoreErrorApi` does not fully
234-
implement the [ErrorApi](../reference/core-plugin-api.errorapi.md), as it is
234+
implement the [`ErrorApi`](../reference/core-plugin-api.errorapi.md), as it is
235235
checked by the type embedded in the
236-
[errorApiRef](../reference/core-plugin-api.errorapiref.md) at compile time.
236+
[`errorApiRef`](../reference/core-plugin-api.errorapiref.md) at compile time.
237237

238238
## Defining custom Utility APIs
239239

240240
Plugins are free to define their own Utility APIs. Simply define the TypeScript
241241
interface for the API, and create an
242-
[ApiRef](../reference/core-plugin-api.apiref.md) using
243-
[createApiRef](../reference/core-plugin-api.createapiref.md) exported from
244-
[@backstage/core-plugin-api](../reference/core-plugin-api.md). Also be sure to
242+
[`ApiRef`](../reference/core-plugin-api.apiref.md) using
243+
[`createApiRef`](../reference/core-plugin-api.createapiref.md) exported from
244+
[`@backstage/core-plugin-api`](../reference/core-plugin-api.md). Also be sure to
245245
provide at least one implementation of the API, and to declare a default factory
246-
for the API in [createPlugin](../reference/core-plugin-api.createplugin.md).
246+
for the API in [`createPlugin`](../reference/core-plugin-api.createplugin.md).
247247

248248
Custom Utility APIs can be either public or private, which is up to the plugin
249249
to choose. Private APIs do not expose an external API surface, and it's
@@ -255,16 +255,16 @@ backwards compatibility of public APIs, as you may otherwise break apps that are
255255
using your plugin.
256256

257257
To make an API public, simply export the
258-
[ApiRef](../reference/core-plugin-api.apiref.md) of the API, and any associated
258+
[`ApiRef`](../reference/core-plugin-api.apiref.md) of the API, and any associated
259259
types. To make an API private, just avoid exporting the
260-
[ApiRef](../reference/core-plugin-api.apiref.md), but still be sure to supply a
261-
default factory to [createPlugin](../reference/core-plugin-api.createplugin.md).
260+
[`ApiRef`](../reference/core-plugin-api.apiref.md), but still be sure to supply a
261+
default factory to [`createPlugin`](../reference/core-plugin-api.createplugin.md).
262262

263263
Private APIs are useful for plugins that want to depend on other APIs outside of
264264
React components, but not have to expose an entire API surface to maintain. When
265265
using private APIs, it is fine to use the `typeof` of an implementing class as
266266
the type parameter passed to
267-
[createApiRef](../reference/core-plugin-api.createapiref.md), while public APIs
267+
[`createApiRef`](../reference/core-plugin-api.createapiref.md), while public APIs
268268
should always define a separate TypeScript interface type.
269269

270270
Plugins may depend on APIs from other plugins, both in React components and as
@@ -273,13 +273,13 @@ dependencies between plugins.
273273

274274
## Architecture
275275

276-
The [ApiRef](../reference/core-plugin-api.apiref.md) instances mentioned above
276+
The [`ApiRef`](../reference/core-plugin-api.apiref.md) instances mentioned above
277277
provide a point of indirection between consumers and producers of Utility APIs.
278278
It allows for plugins and components to depend on APIs in a type-safe way,
279279
without having a direct reference to a concrete implementation of the APIs. The
280280
Apps are also given a lot of flexibility in what implementations to provide. As
281281
long as they adhere to the contract established by an
282-
[ApiRef](../reference/core-plugin-api.apiref.md), they are free to choose any
282+
[`ApiRef`](../reference/core-plugin-api.apiref.md), they are free to choose any
283283
implementation they want.
284284

285285
The figure below shows the relationship between
@@ -304,16 +304,16 @@ The indirection provided by Utility APIs also makes it straightforward to test
304304
components that depend on APIs, and to provide a standard common development
305305
environment for plugins. A proper test wrapper with mocked API implementations
306306
is not yet ready, but it will be provided as a part of
307-
[@backstage/test-utils](../reference/test-utils.md). It will provide mocked
307+
[`@backstage/test-utils`](../reference/test-utils.md). It will provide mocked
308308
variants of APIs, with additional methods for asserting a component's
309309
interaction with the API.
310310

311311
The common development environment for plugins is included in
312-
[@backstage/dev-utils](../reference/dev-utils.md), where the exported
313-
[createDevApp](../reference/dev-utils.createdevapp.md) function creates an
312+
[`@backstage/dev-utils`](../reference/dev-utils.md), where the exported
313+
[`createDevApp`](../reference/dev-utils.createdevapp.md) function creates an
314314
application with implementations for all core APIs already present. Contrary to
315315
the method for wiring up Utility API implementations in an app created with
316-
[createApp](../reference/app-defaults.createapp.md),
317-
[createDevApp](../reference/dev-utils.createdevapp.md) uses automatic dependency
316+
[`createApp`](../reference/app-defaults.createapp.md),
317+
[`createDevApp`](../reference/dev-utils.createdevapp.md) uses automatic dependency
318318
injection. This is to make it possible to replace any API implementation, and
319319
having that be reflected in dependents of that API.

‎docs/architecture-decisions/adr003-avoid-default-exports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ thing well". The module would be consumed
1515
(`const localName = require('the-module');`) without having to know the internal
1616
structure.
1717

18-
Now, ESModules are the primary authoring format. They have numerous benefits,
18+
Now, `ESModules` are the primary authoring format. They have numerous benefits,
1919
such as compile-time verification of exports, and standards-defined semantics.
2020
They have a similar mechanism known as "default exports", which allows for a
2121
consumer to `import localName from 'the-module';`. This is implicitly the same

‎docs/architecture-decisions/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Records should be stored under the `architecture-decisions` directory.
3434

3535
## Superseding an ADR
3636

37-
If an ADR supersedes an older ADR then the older ADR's status is changed to
38-
superseded by ADR-XXXX and links to the new ADR.
37+
If an ADR supersedes an older ADR then the status of the older ADR is changed to
38+
"superseded by ADR-XXXX", and links to the new ADR.

‎docs/auth/gitlab/provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Settings for local development:
1818

1919
- Name: Backstage (or your custom app name)
2020
- Redirect URI: `http://localhost:7007/api/auth/gitlab/handler/frame`
21-
- Scopes: read_user
21+
- Scopes: `read_user`
2222

2323
## Configuration
2424

‎docs/conf/defining.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ may need to pass in all files using one or multiple `--config <path>` options.
138138
> to change for different deployment environments should be static
139139
> configuration, while it should otherwise be avoided.
140140
141-
When defining configuration for your plugin, keep keys camelCased and stick to
141+
When defining configuration for your plugin, keep keys on `camelCase` form and stick to
142142
existing casing conventions such as `baseUrl` rather than `baseURL`.
143143

144144
It is also usually best to prefer objects over arrays, as it makes it possible

0 commit comments

Comments
 (0)
Please sign in to comment.