Introduce CSpell

This commit is contained in:
Dolan Miu
2022-07-04 14:51:36 +01:00
parent bb6eb87313
commit c888f589d0
6 changed files with 1893 additions and 13 deletions

30
.cspell.json Normal file
View File

@ -0,0 +1,30 @@
// cSpell Settings
{
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en_US",
"dictionaries": ["en_US", "typescript", "softwareTerms", "fonts"],
// words - list of words to be always considered correct
"words": [
"Xmlable",
"twip",
"twips",
"jsonify",
"Media",
"falsey",
"aiueo",
"iroha",
"aiueo",
"iroha",
"chosung",
"Abjad",
"Initializable"
],
"ignoreRegExpList": ["/w:.+/", "/s:.+/", "/a:.+/", "/pic:.+/", "/xmlns:.+/", "/[^\\s]{40,}/", "/<xsd:.+/>/", "/[A-Z_]+ = \".+\"/", "/XmlAttributeComponent<{(.|\\n| )+}>/"],
"allowCompoundWords": true,
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": ["hte"]
}

1860
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,7 @@
"typedoc": "rimraf ./build && typedoc src/index.ts --tsconfig tsconfig.typedoc.json",
"style": "prettier -l \"src/**/*.ts\"",
"style.fix": "npm run style -- --write",
"cspell": "cspell \"/**/*.{ts,scss,html}\"",
"fix-types": "ts-node --skip-project scripts/types-absolute-fixer.ts",
"e2e": "ts-node scripts/e2e.ts",
"serve.docs": "cd docs && docsify serve",
@ -73,6 +74,7 @@
"@types/webpack": "^5.0.0",
"buffer": "^6.0.3",
"chai": "^3.5.0",
"cspell": "^6.2.2",
"docsify-cli": "^4.3.0",
"glob": "^8.0.1",
"jszip": "^3.1.5",

View File

@ -90,25 +90,25 @@ export interface ITableFloatOptions {
readonly relativeVerticalPosition?: RelativeVerticalPosition;
/**
* Specifies the minimun distance to be maintained between the table and the top of text in the paragraph
* Specifies the minimum distance to be maintained between the table and the top of text in the paragraph
* below the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
*/
readonly bottomFromText?: number | string;
/**
* Specifies the minimun distance to be maintained between the table and the bottom edge of text in the paragraph
* Specifies the minimum distance to be maintained between the table and the bottom edge of text in the paragraph
* above the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
*/
readonly topFromText?: number | string;
/**
* Specifies the minimun distance to be maintained between the table and the edge of text in the paragraph
* Specifies the minimum distance to be maintained between the table and the edge of text in the paragraph
* to the left of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
*/
readonly leftFromText?: number | string;
/**
* Specifies the minimun distance to be maintained between the table and the edge of text in the paragraph
* Specifies the minimum distance to be maintained between the table and the edge of text in the paragraph
* to the right of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
*/
readonly rightFromText?: number | string;

View File

@ -13,7 +13,7 @@ describe("Deleted Page", () => {
});
});
describe("Delted NumberOfPages", () => {
describe("Deleted NumberOfPages", () => {
describe("#constructor()", () => {
it("uses the font name for both ascii and hAnsi", () => {
const tree = new Formatter().format(new DeletedNumberOfPages());

View File

@ -141,12 +141,12 @@ export class ImportDotx {
}
private async addRelationshipToWrapper(
relationhipFile: IRelationshipFileInfo,
relationshipFile: IRelationshipFileInfo,
zipContent: JSZip,
wrapper: HeaderWrapper | FooterWrapper,
media: Media,
): Promise<void> {
const refFile = zipContent.files[`word/_rels/${relationhipFile.target}.rels`];
const refFile = zipContent.files[`word/_rels/${relationshipFile.target}.rels`];
if (!refFile) {
return;