Skip to content

Commit

Permalink
docs: configure spell-check (#25)
Browse files Browse the repository at this point in the history
This PR configures the spell-check added to the docs workflow in the
github-actions repo: FuelLabs/github-actions#23

The files checked are configured in `.spellcheck.yml`. This is also
where you can configure what types of elements are ignored.

Right now it ignores:
- All code blocks that have a language (and will check code blocks that
do not have a language)
- Anything in between backticks
- Words in `spell-check-custom-words.txt` (case sensitive, only exact
match)
- Numbers, even if they are attached to a word
- Links in markdown link format

#### Handling errors:

If the test fails:
- look up the word in the question to verify it is a real word and is
correctly spelled
- If it is a file name or is code, use backticks to ignore the word.
- If it is a real word that is spelled correctly, or an acronym that is
either common or is defined already, add it to
`spell-check-custom-words.txt`.
- If needed, rewrite the sentence. Ex: DON'T use "`lock`ing" and add
"ing" to the custom words list. Instead, rewrite the sentence as
"locking with the `lock` method".
- If it otherwise should be ignored, you can configure the pipeline in
`.spellcheck.yml`.
  • Loading branch information
sarahschwartz authored Dec 7, 2023
1 parent 2b807e6 commit 1e3ffb8
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
doc-folder-path: 'docs'
src-folder-path: 'src'
spellcheck-config-path: '.spellcheck.yml'

lint-code:
name: Lint Code
Expand Down
21 changes: 21 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
matrix:
- name: SPCheck
aspell:
lang: en
dictionary:
encoding: utf-8
wordlists:
- ./spell-check-custom-words.txt
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- pymdownx.superfences
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
sources:
- '**/docs/*.mdx'
- '**/docs/**/*.mdx'
default_encoding: utf-8
2 changes: 1 addition & 1 deletion docs/how-to-use-graphql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ category: How To Use GraphQL

This section covers the fundamentals for how to use a GraphQL API.

For further documentation and resources about GraphQL, check out the offical GraphQL Documenation at [graphql.org](https://graphql.org/).
For further documentation and resources about GraphQL, check out the official GraphQL Documentation at [graphql.org](https://graphql.org/).
4 changes: 2 additions & 2 deletions docs/how-to-use-graphql/apis-explained.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ GraphQL comes with a set of default scalar types out-of-the-box such as below:
- `Float`: A signed double-precision floating-point value.
- `String`: A UTF‐8 character sequence.
- `Boolean`: true or false.
- `ID`: The ID scalar type represents a unique identifier, often used to refetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, defining it as an ID signifies that it is not intended to be humanreadable.
- `ID`: The ID scalar type represents a unique identifier, often used to re-fetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, defining it as an ID signifies that it is not intended to be humanreadable.

Fields can also be of types that are not scalar by default, but resolve to scalar values upon querying. For instance, in the following query, the `name` and `appearsIn` fields resolve to scalar types.

Expand Down Expand Up @@ -154,7 +154,7 @@ edges: [SomethingEdge!]!
nodes: [Something!]!
```

### PageInfo
### `PageInfo`

`pageInfo` returns an object that includes information about the returned page of results:

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/enums.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Reference

## `ReceiptType`

The receipt type inidicating what kind of transaction generated the receipt.
The receipt type indicating what kind of transaction generated the receipt.

`CALL`:
The receipt was generated from a contract call.
Expand All @@ -25,10 +25,10 @@ The receipt was generated from a failed contract call that panicked.
The receipt was generated from a failed contract call that reverted.

`LOG`:
The receipt was generated from a log in the contract. The Log receipt is generated for non-reference types, namely bool, u8, u16, u32, and u64.
The receipt was generated from a log in the contract. The Log receipt is generated for non-reference types, namely `bool`, `u8`, `u16`, `u32`, and `u64`.

`LOG_DATA`:
The receipt was generated from a log in the contract. LogData is generated for reference types which include all types except for the non_reference types mentioned above.
The receipt was generated from a log in the contract. `LogData` is generated for reference types which include all types except for the non_reference types mentioned above.

`TRANSFER`:
The receipt was generated from a transaction that transferred coins to a contract.
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ The dependent gas cost per unit.

## `ExcludeInput`

The input type for the `resourcesToSpend` query that defines what utxos and messages to exclude.
The input type for the `resourcesToSpend` query that defines what UTXOs and messages to exclude.

**fields:**

`utxos`: [`[UtxoId!]!`](/docs/reference/scalars/#utxoid)

An array of utxo IDs to exclude.
An array of UTXO IDs to exclude.

`messages`: [`[Nonce!]!`](/docs/reference/scalars/#nonce)

Expand Down Expand Up @@ -957,7 +957,7 @@ The predicate input parameters.

## `MerkleProof`

Information about a merkelproof.
Information about a merkle proof.

**fields:**

Expand Down Expand Up @@ -1303,7 +1303,7 @@ The status for a submitted transaction.

The time a transaction was submitted

## TimeParameters
## `TimeParameters`

An object containing information about block times

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/queries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The asset id for the balance.

## `contractBalances`

Returns a [`ContractBalanceConnection!`](/docs/reference/objects/#contractbalance) for an arrray of balances for all assets owned by a given contract
Returns a [`ContractBalanceConnection!`](/docs/reference/objects/#contractbalance) for an array of balances for all assets owned by a given contract

**args:**

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/scalars.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ An address of an externally owned account identified by a 32 byte string prefixe

## `AssetId`

A 32 byte unique ID used to identify a coin. On the testnet, the assetId is `0x0000000000000000000000000000000000000000000000000000000000000000`.
A 32 byte unique ID used to identify a coin. On the testnet, the `assetId` is `0x0000000000000000000000000000000000000000000000000000000000000000`.

## `BlockId`

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/unions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The type of coin being used.

[`Coin`](/docs/reference/objects/#coin): Coin

[`MessageCoin`](/docs/reference/objects/#messagecoin): MessageCoin
[`MessageCoin`](/docs/reference/objects/#messagecoin): `MessageCoin`

## `Consensus`

Expand Down
75 changes: 75 additions & 0 deletions spell-check-custom-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
SDK
SDKs
testnet
testnets
mainnet
config
JSON
abigen
blockchain
blockchain's
ABI
ABIs
ERC
Ethereum
Ethereum's
natively
toolchain
toolchains
relayer
relayers
Infura
RPC
Sepolia
PoA
PoS
PoW
validator
validators
codespace
codespaces
Github
quickstart
forc
bytecode
struct
Fuelup
fuelup
LSP
graphQL
GraphQL
graphql
repo
customizations
VSCode
frontend
dapp
fullstack
TypeScript
params
VM
FuelVM
FVM
stateful
runnable
CLI
dev
TODO
backend
https
APIs
urql
enums
queryable
UTF
UTXO
UTXOs
ALU
TAI
cryptographic
backtraces
merkle
Merkle
mempool
EOA
args

0 comments on commit 1e3ffb8

Please # to comment.