diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2021-12-21 15:28:25 +0000 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2021-12-21 15:28:25 +0000 |
| commit | a8d3f95cf8038f24a760551ed8a3342251f81052 (patch) | |
| tree | 85bdedb2d1b6b17cdadd20e85a9774576f6fb63f | |
| parent | e70fd3594cfa8e0e29c3e9fb25991a9bad048469 (diff) | |
Configure ESLint for TypeScript
| -rw-r--r-- | .eslintrc.json | 15 | ||||
| -rw-r--r-- | .eslintrc.yml | 20 | ||||
| -rw-r--r-- | app/directory.ts | 2 |
3 files changed, 16 insertions, 21 deletions
diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..eba937e --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,15 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2021 + }, + "plugins": [ + "@typescript-eslint" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ] +} diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 495c107..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,20 +0,0 @@ -env: - es2021: true - node: true -extends: eslint:recommended -parserOptions: - ecmaVersion: 13 - sourceType: module -rules: - indent: - - error - - 4 - linebreak-style: - - error - - unix - quotes: - - error - - single - semi: - - error - - always diff --git a/app/directory.ts b/app/directory.ts index 6449e8e..6cf1125 100644 --- a/app/directory.ts +++ b/app/directory.ts @@ -151,7 +151,7 @@ export class PageDirectory { return undefined; } let result = parse(data); - let title = result.metadata.displayTitle ?? name; + let title = result.metadata.displayTitle ?? name let content = `${result.metadata.notitle ? '' : `<h1>${title}</h1>`}${result.html}`; let page: Page = { |
