feat: TechDocs - Add vale linter to check words quality in md files. (#2631)

* fix(docs): typos which were reflacted from vale linter's command

* feat: Implement Vale linter (#2031)
Initialize .vale.ini file
Add 'lint:docs' script to package.json, to lint all md files except the ones which are located in node_modules
Generate 'vocab.txt' by using command 'yarn run lint:docs' | grep -o ''[a-z A-Z]*'' | grep -o '[a-z A-Z]*' | sort | uniq > .github/styles/vocab.txt
Add steps to github workflow 'master' to check docs quality

* chore: Separate workflow for quality checking

* chore: Added 'shx' dev dependency to support grep command in cross platform

* feat: Add script to operate same quality check process on different platform

* ignore: remove lint:docs from lint-stages which was added for experiment purpose

* fix: check-all-files on push event & check-changed-files on pull_request event

* chore(CI): triggle workflow only when there is any updates in .md file(s) on pull request

* fix: use spawnSync to solve 'The command line is too long.' error

* fix: github workflow syntax

* fix: prettier error

* chore: add vale command directly to lint-staged

* chore: use shebang for easy access

* fix: windows script issue & remove shebang

* chore: Add shebang flag

* chore: better error message related to vale

* chore: mention vale linter in documentation

* fix: spelling errors & add keywords to vocab.txt
This commit is contained in:
Mayursinh Sarvaiya
2020-10-02 10:50:47 +05:30
committed by GitHub
parent 73440c7d9a
commit 5c6a0356c0
22 changed files with 336 additions and 21 deletions
@@ -88,7 +88,7 @@ Some good examples exist here:
- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/file.ts
- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/github.ts
### Registerinng your own Preparer
### Registering your own Preparer
You can register the preparer that you have created with the `PreparerBuilder`
by using the `PreparerKey` from the Catalog, for example like this:
+1 -1
View File
@@ -35,4 +35,4 @@ well as a selection of Python Markdown extensions that TechDocs supports.
Not right now. We are currently using MkDocs to generate the documentation from
source, so the files have to be in Markdown format. However, in the future we
want to support other static site generators which will make it possible to use
otherfile formats.
other file formats.
+1 -1
View File
@@ -166,7 +166,7 @@ because it fulfills all the principles above:
**Fulfills Input/Output Principle**: Verifies the output changes when the
input changes
**Fufills Blackbox Principle**: Does not verify _how_ the `<Loading />`
**Fulfills Blackbox Principle**: Does not verify _how_ the `<Loading />`
component is mounted, just that it is mounted in response to the input.
**Fulfills Scalability Principle**: If we decide to refactor the entire way
+1 -1
View File
@@ -73,7 +73,7 @@ Referenced by: [alert\$](#alert).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
+1 -1
View File
@@ -135,7 +135,7 @@ Referenced by: [activeThemeId\$](#activethemeid).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
+1 -1
View File
@@ -93,7 +93,7 @@ Referenced by: [error\$](#error).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
@@ -11,7 +11,8 @@ The following Utility API implements this type:
### createAuthRequester()
A utility for showing login popups or similar things, and merging together
multiple requests for different scopes into one request that inclues all scopes.
multiple requests for different scopes into one request that includes all
scopes.
The passed in options provide information about the login provider, and how to
handle auth requests.
@@ -30,7 +31,7 @@ createAuthRequester&lt;AuthResponse&gt;(
### authRequest\$()
Observers panding auth requests. The returned observable will emit all current
Observers pending auth requests. The returned observable will emit all current
active auth request, at most one for each created auth requester.
Each request has its own info about the login provider, forwarded from the auth
@@ -156,7 +157,7 @@ Referenced by: [authRequest\$](#authrequest).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
+1 -1
View File
@@ -81,7 +81,7 @@ Referenced by: [sessionState\$](#sessionstate).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
@@ -62,7 +62,7 @@ Referenced by: [sessionState\$](#sessionstate).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
+3 -3
View File
@@ -35,7 +35,7 @@ remove(key: string): Promise&lt;void&gt;
### set()
Save persistant data, and emit messages to anyone that is using observe\$ for
Save persistent data, and emit messages to anyone that is using observe\$ for
this key
<pre>
@@ -85,7 +85,7 @@ Referenced by: [observe\$](#observe), [StorageApi](#storageapi).
### Observer
This file contains non-react related core types used throught Backstage.
This file contains non-react related core types used through Backstage.
Observer interface for consuming an Observer, see TC39.
@@ -129,7 +129,7 @@ export interface StorageApi {
remove(key: string): Promise&lt;void&gt;;
/**
* Save persistant data, and emit messages to anyone that is using observe$ for this key
* Save persistent data, and emit messages to anyone that is using observe$ for this key
*
* @param {String} key Unique key associated with the data.
*/