chore: merging eslint rules
This commit is contained in:
parent
b05ba2122a
commit
916a570cfb
81 changed files with 91 additions and 1351 deletions
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/clean-theme/.gitignore
vendored
11
packages/clean-theme/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -16,7 +16,7 @@
|
|||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -25,11 +25,11 @@ export class CleanTheme extends liquid.LiquidTheme
|
|||
// Figure out the defaults for types.
|
||||
switch (content.element)
|
||||
{
|
||||
case "legal":
|
||||
case "title":
|
||||
results.weasyprint = {
|
||||
pad: "none",
|
||||
};
|
||||
case "legal":
|
||||
case "title":
|
||||
results.weasyprint = {
|
||||
pad: "none",
|
||||
};
|
||||
}
|
||||
|
||||
// Return the theme elements.
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/contracts/.gitignore
vendored
11
packages/contracts/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -69,7 +69,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file Automatically generated by barrelsby.
|
||||
*/
|
||||
|
||||
export * from "./FormatImageCallback";
|
||||
export * from "./FormatImageRequest";
|
||||
export * from "./FormatImageResponse";
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file Automatically generated by barrelsby.
|
||||
*/
|
||||
|
||||
export * from "./ContentArgs";
|
||||
export * from "./ContentData";
|
||||
export * from "./ContentLinkRenderCallback";
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/epub2/.gitignore
vendored
11
packages/epub2/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -60,7 +60,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -171,26 +171,26 @@ export class EpubFormatter implements Formatter
|
|||
|
||||
switch (element)
|
||||
{
|
||||
case "cover":
|
||||
this.opf.guides.cover
|
||||
case "cover":
|
||||
this.opf.guides.cover
|
||||
= new opf.OpfGuide(content.metadata.title, filename);
|
||||
break;
|
||||
case "dedication":
|
||||
this.opf.guides.dedication
|
||||
break;
|
||||
case "dedication":
|
||||
this.opf.guides.dedication
|
||||
= new opf.OpfGuide(content.metadata.title, filename);
|
||||
break;
|
||||
case "colophon":
|
||||
this.opf.guides.colophon
|
||||
break;
|
||||
case "colophon":
|
||||
this.opf.guides.colophon
|
||||
= new opf.OpfGuide(content.metadata.title, filename);
|
||||
break;
|
||||
case "toc":
|
||||
this.opf.guides.toc
|
||||
break;
|
||||
case "toc":
|
||||
this.opf.guides.toc
|
||||
= new opf.OpfGuide(content.metadata.title, filename);
|
||||
break;
|
||||
case "acknowledgement":
|
||||
this.opf.guides.acknowledgements
|
||||
break;
|
||||
case "acknowledgement":
|
||||
this.opf.guides.acknowledgements
|
||||
= new opf.OpfGuide(content.metadata.title, filename);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
// Add the navigation point, which may be recursive.
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- off
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/format/.gitignore
vendored
11
packages/format/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -32,7 +32,7 @@
|
|||
"scripts": {
|
||||
"prepack": "npm run build",
|
||||
"barrels": "barrelsby --delete --location all --directory src --exclude '(cli|tests)'",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint @typescript-eslint/no-var-requires: 0 */
|
||||
|
||||
import * as readPackage from "read-pkg-up";
|
||||
import * as tracer from "tracer";
|
||||
import * as yargs from "yargs";
|
||||
|
@ -44,7 +46,7 @@ logger.debug(`Running command: ${command}`);
|
|||
|
||||
switch (command)
|
||||
{
|
||||
case "build":
|
||||
runBuild(argv, json, logger);
|
||||
break;
|
||||
case "build":
|
||||
runBuild(argv, json, logger);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ export function loadConfig<T>(logger: any, filename: string): T | undefined
|
|||
|
||||
switch (extension)
|
||||
{
|
||||
case ".yaml":
|
||||
case ".yml":
|
||||
return loadYaml(filename) as T;
|
||||
case ".json":
|
||||
return loadJson(filename) as T;
|
||||
case ".yaml":
|
||||
case ".yml":
|
||||
return loadYaml(filename) as T;
|
||||
case ".json":
|
||||
return loadJson(filename) as T;
|
||||
}
|
||||
|
||||
// If we fell through to this point, we don't know how to parse that file
|
||||
|
|
|
@ -279,13 +279,13 @@ function loadContentGeneration(content: ContentArgs): Promise<ContentArgs>
|
|||
{
|
||||
switch (content.element)
|
||||
{
|
||||
case "toc":
|
||||
var params: any = content.contentData;
|
||||
var title = params.title ? params.title : "Table of Contents";
|
||||
content.metadata.title = title;
|
||||
break;
|
||||
default:
|
||||
throw Error(`Cannot generate content for element type ${content.element}.`);
|
||||
case "toc":
|
||||
var params: any = content.contentData;
|
||||
var title = params.title ? params.title : "Table of Contents";
|
||||
content.metadata.title = title;
|
||||
break;
|
||||
default:
|
||||
throw Error(`Cannot generate content for element type ${content.element}.`);
|
||||
}
|
||||
resolve(content);
|
||||
});
|
||||
|
@ -575,10 +575,10 @@ function renderContentGeneration(content: ContentArgs): Promise<ContentArgs>
|
|||
// Figure out the type.
|
||||
switch (content.element)
|
||||
{
|
||||
case "toc":
|
||||
return content.theme.renderTableOfContents(content);
|
||||
default:
|
||||
throw Error(`Cannot generate content for element type ${content.element}.`);
|
||||
case "toc":
|
||||
return content.theme.renderTableOfContents(content);
|
||||
default:
|
||||
throw Error(`Cannot generate content for element type ${content.element}.`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -619,12 +619,12 @@ function parseAttributes(text: string, quote: string = "\""): ParseAttributesRes
|
|||
{
|
||||
switch (m[1])
|
||||
{
|
||||
case ".":
|
||||
classes.push(m[2]);
|
||||
break;
|
||||
case "#":
|
||||
id = m[2];
|
||||
break;
|
||||
case ".":
|
||||
classes.push(m[2]);
|
||||
break;
|
||||
case "#":
|
||||
id = m[2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,9 +67,9 @@ function getFormatImageRequest(content: ContentArgs, href: string, imagePath: st
|
|||
|
||||
switch (extension)
|
||||
{
|
||||
case ".png":
|
||||
mime = jimp.MIME_PNG;
|
||||
break;
|
||||
case ".png":
|
||||
mime = jimp.MIME_PNG;
|
||||
break;
|
||||
}
|
||||
|
||||
// Figure out alterations or changes that need to be made. We first build up
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* eslint @typescript-eslint/no-var-requires: 0 */
|
||||
|
||||
import { EditionArgs } from "@mfgames-writing/contracts";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
|
||||
var loaded: { [index: string]: any } = {};
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
13
packages/greekil-theme/.gitignore
vendored
13
packages/greekil-theme/.gitignore
vendored
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
||||
assets/
|
||||
.sass-cache/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,10 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
|
||||
lib/spec/
|
||||
typings/
|
||||
tsd.json
|
|
@ -17,7 +17,7 @@
|
|||
"assets": "mkdir -p assets && cp node_modules/@typopro/dtp-gentium/TypoPRO-GentiumBookBasic*.ttf assets",
|
||||
"prepack": "npm run build && npm run assets",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -21,15 +21,15 @@ export class GreekilTheme extends liquid.LiquidTheme
|
|||
// Figure out the defaults for types.
|
||||
switch (content.element)
|
||||
{
|
||||
case "cover":
|
||||
case "legal":
|
||||
case "title":
|
||||
case "bastard":
|
||||
case "dedication":
|
||||
case "toc":
|
||||
case "preface":
|
||||
results.styleName = "blank";
|
||||
break;
|
||||
case "cover":
|
||||
case "legal":
|
||||
case "title":
|
||||
case "bastard":
|
||||
case "dedication":
|
||||
case "toc":
|
||||
case "preface":
|
||||
results.styleName = "blank";
|
||||
break;
|
||||
}
|
||||
|
||||
// Return the results.
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/guillemet-pipeline/.gitignore
vendored
11
packages/guillemet-pipeline/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,15 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
||||
|
||||
tests
|
|
@ -18,7 +18,7 @@
|
|||
"pretest": "npm run build",
|
||||
"build": "tsc --build",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/html/.gitignore
vendored
11
packages/html/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -12,7 +12,7 @@
|
|||
"build": "tsc --build",
|
||||
"prepack": "npm run build",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- off
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/hyphen/.gitignore
vendored
11
packages/hyphen/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,15 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
||||
|
||||
tests
|
|
@ -15,7 +15,7 @@
|
|||
"types": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
let expect = require("expect");
|
||||
import { HyphenPlugin, loadHyphenPlugin } from "../hyphen";
|
||||
import { ContentArgs, EditionArgs, ContentData, EditionData, PublicationArgs } from "@mfgames-writing/contracts";
|
||||
import { ContentArgs, ContentData, EditionArgs, EditionData, PublicationArgs } from "@mfgames-writing/contracts";
|
||||
import * as expect from "expect";
|
||||
import "mocha";
|
||||
import { loadHyphenPlugin } from "../hyphen";
|
||||
|
||||
describe("parsing", function() {
|
||||
let plugin = loadHyphenPlugin({
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
11
packages/liquid/.gitignore
vendored
11
packages/liquid/.gitignore
vendored
|
@ -1,11 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -16,7 +16,7 @@
|
|||
"scripts": {
|
||||
"prepack": "npm run build",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -77,10 +77,10 @@ export class LiquidTheme implements Theme
|
|||
{
|
||||
switch (args.element)
|
||||
{
|
||||
case "chapter":
|
||||
return `Chapter ${args.metadata.number}: ${args.metadata.title}`;
|
||||
case "appendix":
|
||||
return `Appendix ${args.metadata.number}: ${args.metadata.title}`;
|
||||
case "chapter":
|
||||
return `Chapter ${args.metadata.number}: ${args.metadata.title}`;
|
||||
case "appendix":
|
||||
return `Appendix ${args.metadata.number}: ${args.metadata.title}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ export class LiquidTheme implements Theme
|
|||
// Figure out what the root template is.
|
||||
let templateName: string | undefined = `toc-entry-${content.element}`;
|
||||
|
||||
if (!this.templates.hasOwnProperty(templateName))
|
||||
if (!Object.prototype.hasOwnProperty.call(this.templates, templateName))
|
||||
{
|
||||
templateName = "toc-entry";
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ export class LiquidTheme implements Theme
|
|||
// Move to the parent item.
|
||||
const template: any = this.templates[templateName];
|
||||
|
||||
if (template.hasOwnProperty("extends"))
|
||||
if (Object.prototype.hasOwnProperty.call(template, "extends"))
|
||||
{
|
||||
templateName = template.extends;
|
||||
} else
|
||||
|
@ -281,7 +281,8 @@ export class LiquidTheme implements Theme
|
|||
// Figure out what the root template is.
|
||||
let templateName: string | undefined = contentTemplate;
|
||||
|
||||
if (!templateName || !this.templates.hasOwnProperty(templateName))
|
||||
if (!templateName ||
|
||||
!Object.prototype.hasOwnProperty.call(this.templates, templateName))
|
||||
{
|
||||
templateName = defaultTemplate;
|
||||
}
|
||||
|
@ -303,7 +304,7 @@ export class LiquidTheme implements Theme
|
|||
// Move to the parent item.
|
||||
const template: any = this.templates[templateName];
|
||||
|
||||
if (template.hasOwnProperty("extends"))
|
||||
if (Object.prototype.hasOwnProperty.call(template, "extends"))
|
||||
{
|
||||
templateName = template.extends;
|
||||
} else
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_brace_style = K&R
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
curly_bracket_next_line = false
|
||||
|
||||
[*.{js,ts}]
|
||||
quote_type = double
|
||||
|
||||
[*.yaml]
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
indent_style = space
|
||||
|
||||
[package.json]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
|
@ -1,46 +0,0 @@
|
|||
env:
|
||||
es6: true
|
||||
node: true
|
||||
extends: 'eslint:recommended'
|
||||
parser: typescript-eslint-parser
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 2018
|
||||
sourceType: module
|
||||
plugins:
|
||||
#- react
|
||||
- typescript
|
||||
rules:
|
||||
typescript/class-name-casing:
|
||||
- error
|
||||
typescript/member-naming:
|
||||
- error
|
||||
typescript/member-ordering:
|
||||
- error
|
||||
typescript/no-unused-vars:
|
||||
- off
|
||||
typescript/no-var-requires:
|
||||
- error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
|
||||
# Eventually
|
||||
no-console:
|
||||
- warn
|
||||
|
||||
# We are having trouble with these two, so we turn them off.
|
||||
no-undef:
|
||||
- off
|
||||
no-unused-vars:
|
||||
- off
|
12
packages/weasyprint/.gitignore
vendored
12
packages/weasyprint/.gitignore
vendored
|
@ -1,12 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
*.swp
|
||||
*.tsbuildinfo
|
||||
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
lib/
|
|
@ -1,22 +0,0 @@
|
|||
image: node:latest
|
||||
|
||||
stages:
|
||||
- publish
|
||||
|
||||
publish:
|
||||
stage: publish
|
||||
script:
|
||||
# Remove the references so it builds cleanly.
|
||||
- apt-get update
|
||||
- apt-get install jq -y
|
||||
- "cat tsconfig.json | jq 'del(.references)' > a && mv a tsconfig.json"
|
||||
|
||||
# Make sure the commits are clean
|
||||
- npm ci
|
||||
- npx commitlint --from=master to=CI_BUILD_REF_NAME
|
||||
|
||||
# Build the project
|
||||
- npm run build
|
||||
|
||||
# Perform the automatic release process
|
||||
- npx semantic-release
|
|
@ -1,13 +0,0 @@
|
|||
*~
|
||||
*.tgz
|
||||
TODO.markdown
|
||||
|
||||
.editorconfig
|
||||
.jsbeautifyrc
|
||||
.eslintrc.yml
|
||||
.gitlab-ci.yml
|
||||
tsconfig.json
|
||||
tsfmt.json
|
||||
tsd.json
|
||||
|
||||
typings
|
|
@ -11,7 +11,7 @@
|
|||
"scripts": {
|
||||
"prepack": "npm run build",
|
||||
"barrels": "barrelsby --delete --location all --directory src",
|
||||
"lint": "eslint -c .eslintrc.yml src/**/*.ts --fix",
|
||||
"lint": "eslint -c ../../.eslintrc.yml src/**/*.ts --fix",
|
||||
"format": "tsfmt -r",
|
||||
"clean": "rimraf lib",
|
||||
"prebuild": "npm run barrels && npm run lint && npm run format && npm run clean",
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"indentSize": 4,
|
||||
"tabSize": 4,
|
||||
"indentStyle": 2,
|
||||
"newLineCharacter": "\n",
|
||||
"convertTabsToSpaces": true,
|
||||
"placeOpenBraceOnNewLineForFunctions": true,
|
||||
"placeOpenBraceOnNewLineForControlBlocks": true
|
||||
}
|
Loading…
Add table
Reference in a new issue