Fix all spelling across the project

This commit is contained in:
Dolan Miu
2022-07-06 14:05:37 +01:00
parent 6d447033c9
commit 64addc85ee
11 changed files with 81 additions and 59 deletions

View File

@ -27,24 +27,26 @@ import { Document, Packer, Paragraph, TextRun } from "docx";
// Documents contain sections, you can have multiple sections per document, go here to learn more about sections
// This simple example will only contain one section
const doc = new Document({
sections: [{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: "Foo Bar",
bold: true,
}),
new TextRun({
text: "\tGithub is the best",
bold: true,
}),
],
}),
],
}],
sections: [
{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: "Foo Bar",
bold: true,
}),
new TextRun({
text: "\tGithub is the best",
bold: true,
}),
],
}),
],
},
],
});
// Used to export the file into a .docx file
@ -56,6 +58,7 @@ Packer.toBuffer(doc).then((buffer) => {
```
<p align="center">
<!-- cspell:disable-next-line -->
<img alt="clippy the assistant" src="./clippy.png">
</p>

View File

@ -26,13 +26,15 @@ Please write good commit messages when making a commit: https://chris.beams.io/p
**Do not:**
<!-- cspell:disable -->
```
c // What?
rtl // Adding acryonyms without explaining anything else is not helpful
rtl // Adding acronyms without explaining anything else is not helpful
works! // Glad its working, but the message is not helpful
demo updated // Getting better, but capitalize the first letter
Unesesary coment removed // Make sure to use correct spelling
```
<!-- cspell:enable -->
**Do**
@ -42,9 +44,9 @@ Unesesary coment removed // Make sure to use correct spelling
public float(tableFloatOptions: ITableFloatOptions): Table
```
## Delcariative API
## Declarative API
Make sure the API is declarative, so no _method calling_ or _mutation_. This is a design decision, consistent with the rest of the project. There are benefits to delcariative code over other styles of code, explained here: https://dzone.com/articles/why-declarative-coding-makes-you-a-better-programm
Make sure the API is declarative, so no _method calling_ or _mutation_. This is a design decision, consistent with the rest of the project. There are benefits to declarative code over other styles of code, explained here: https://dzone.com/articles/why-declarative-coding-makes-you-a-better-programm
**Do not:**

View File

@ -37,7 +37,7 @@ sub-sublists, etc. Each level includes the following properties:
numbers from each numbering level before this one. Thus a level
text of `%d)` with a number format of `lowerLetter` would result in
the sequence "a)", "b)", ...
* and a few others, which you can see in the OXML spec section 17.9.6
* and a few others, which you can see in the OOXML spec section 17.9.6
## Document-level bullets/numbering definitions (concrete)

View File

@ -146,7 +146,7 @@ const doc = new Document({
});
```
**Note**: If you are using the `.headingX` or `.title` methods of paragraphs, you must make sure to define `HeadingX` or `Title` styles for these. Otherwise they'll show up unstyled :(. If you are using the `.bullet` or `.setNumbering` methods, you need to define a `ListParagraph` style or the numbers may not show up.
**Note**: If you are using the `.headingX` or `.title` methods of paragraphs, you must make sure to define `HeadingX` or `Title` styles for these. Otherwise they'll show up un-styled :(. If you are using the `.bullet` or `.setNumbering` methods, you need to define a `ListParagraph` style or the numbers may not show up.
### Document defaults
@ -199,7 +199,7 @@ For these properties, the rules state the following conflict resolution in case
## Examples
### Declaritive styles
### Declarative styles
Importing Images from file system path