├── .markdownlint.json ├── .vscode └── settings.json ├── __helpers__ └── utils.ts ├── .gitattributes ├── .github ├── workflows │ ├── fixup-commits.yml │ ├── dependabot-auto-merge.yml │ ├── codeql-analysis.yml │ └── ci.yml └── dependabot.yml ├── .editorconfig ├── src ├── problem-matcher.json └── main.ts ├── action.yml ├── CHANGELOG.md ├── jest.config.js ├── LICENSE ├── README.md ├── package.json ├── .gitignore ├── __tests__ └── problemMatcher.test.ts └── tsconfig.json /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "line-length": false 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "dependabot", 4 | "promisify" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /__helpers__/utils.ts: -------------------------------------------------------------------------------- 1 | export function matchResults(report: string[], regexp: RegExp): RegExpExecArray[] { 2 | return report.map(line => regexp.exec(line)) 3 | .filter(match => match); 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.js text eol=lf 5 | *.ts text eol=lf 6 | 7 | package.json text eol=lf 8 | package-lock.json text eol=lf 9 | -------------------------------------------------------------------------------- /.github/workflows/fixup-commits.yml: -------------------------------------------------------------------------------- 1 | name: Block on fixup commits 2 | 3 | on: pull_request_target 4 | 5 | permissions: 6 | pull-requests: read 7 | 8 | jobs: 9 | message: 10 | uses: xt0rted/.github/.github/workflows/fixup-commits.yml@main 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | insert_final_newline = true 6 | indent_size = 4 7 | indent_style = space 8 | trim_trailing_whitespace = true 9 | 10 | [*.{js,ts}] 11 | end_of_line = lf 12 | indent_size = 2 13 | 14 | [*.json] 15 | indent_size = 2 16 | 17 | [*.yml] 18 | indent_size = 2 19 | 20 | [{package.json,package-lock.json}] 21 | end_of_line = lf 22 | -------------------------------------------------------------------------------- /src/problem-matcher.json: -------------------------------------------------------------------------------- 1 | { 2 | "problemMatcher": [ 3 | { 4 | "owner": "markdownlint", 5 | "pattern": [ 6 | { 7 | "regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$", 8 | "file": 1, 9 | "line": 2, 10 | "column": 3, 11 | "code": 4, 12 | "message": 5 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/dependabot-auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: Dependabot auto-merge 2 | 3 | on: pull_request_target 4 | 5 | permissions: 6 | contents: read 7 | pull-requests: read 8 | 9 | jobs: 10 | dependabot: 11 | uses: xt0rted/.github/.github/workflows/dependabot-auto-merge.yml@main 12 | secrets: 13 | GITHUB_APP_ID: ${{ secrets.DEPENDAMERGE_APP_ID }} 14 | GITHUB_APP_PRIVATE_KEY: ${{ secrets.DEPENDAMERGE_PRIVATE_KEY }} 15 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Problem Matcher for markdownlint-cli" 2 | 3 | description: "Sets up a problem matcher for markdownlint-cli that's used to create annotations for violations" 4 | 5 | author: "xt0rted" 6 | 7 | branding: 8 | icon: "command" 9 | color: "green" 10 | 11 | inputs: 12 | action: 13 | description: "The action to take on the problem matcher (add or remove)" 14 | required: false 15 | default: add 16 | 17 | runs: 18 | using: "node20" 19 | main: "dist/index.js" 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Unreleased 4 | 5 | - Bumped `@actions/core` from 1.10.1 to 1.11.1 6 | 7 | ## 3.0.0 - 2024-02-24 8 | 9 | - Updated node runtime from 16 to 20 10 | - Bumped `@actions/core` from 1.10.0 to 1.10.1 11 | 12 | ## 2.0.0 - 2022-10-22 13 | 14 | - Bumped `@actions/core` from 1.2.6 to 1.10.0 15 | - Updated node runtime from 12 to 16 16 | 17 | ## 1.1.0 - 2020-11-16 18 | 19 | - Bumped `@actions/core` from 1.2.2 to 1.2.6 20 | 21 | ## 1.0.0 - 2020-02-18 22 | 23 | - Initial release 24 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | groups: 9 | github-actions: 10 | patterns: 11 | - "actions/*" 12 | - "github/*" 13 | 14 | - package-ecosystem: "npm" 15 | directory: "/" 16 | schedule: 17 | interval: "weekly" 18 | versioning-strategy: "increase" 19 | groups: 20 | actions: 21 | patterns: 22 | - "@actions/*" 23 | jest: 24 | patterns: 25 | - "@types/jest" 26 | - "jest" 27 | - "jest-*" 28 | - "ts-jest" 29 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import("ts-jest").JestConfigWithTsJest} */ 2 | export default { 3 | clearMocks: true, 4 | collectCoverage: true, 5 | collectCoverageFrom: [ 6 | "**/*.ts", 7 | "!dist/**", 8 | "!lib/**", 9 | "!**/node_modules/**", 10 | ], 11 | coverageDirectory: "./coverage/", 12 | moduleFileExtensions: ["js", "ts"], 13 | reporters: ["default", "github-actions"], 14 | testEnvironment: "node", 15 | testMatch: ["**/*.test.ts"], 16 | testRunner: "jest-circus/runner", 17 | transform: { 18 | "^.+\\.ts$": ["ts-jest", { diagnostics: false }], 19 | }, 20 | verbose: true, 21 | }; 22 | 23 | // This will strip :: commands from the log output during test runs 24 | 25 | const processStdoutWrite = process.stdout.write.bind(process.stdout); 26 | 27 | process.stdout.write = (str, encoding, cb) => { 28 | if (!str.match(/^::/)) { 29 | return processStdoutWrite(str, encoding, cb); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | schedule: 9 | - cron: '22 10 * * 1' 10 | 11 | concurrency: 12 | group: ${{ github.workflow }}-${{ github.ref }} 13 | cancel-in-progress: true 14 | 15 | env: 16 | FORCE_COLOR: 3 17 | 18 | jobs: 19 | analyze: 20 | name: Analyze 21 | 22 | runs-on: ubuntu-latest 23 | 24 | permissions: 25 | actions: read 26 | contents: read 27 | security-events: write 28 | 29 | strategy: 30 | fail-fast: false 31 | matrix: 32 | language: [ 'javascript' ] 33 | 34 | steps: 35 | - name: Checkout repository 36 | uses: actions/checkout@v5.0.0 37 | 38 | - name: Initialize CodeQL 39 | uses: github/codeql-action/init@v3 40 | with: 41 | languages: ${{ matrix.language }} 42 | 43 | - name: Autobuild 44 | uses: github/codeql-action/autobuild@v3 45 | 46 | - name: Perform CodeQL Analysis 47 | uses: github/codeql-action/analyze@v3 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Brian Surowiec 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Problem Matcher for markdownlint-cli 2 | 3 | [![CI](https://github.com/xt0rted/markdownlint-problem-matcher/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/xt0rted/markdownlint-problem-matcher/actions/workflows/ci.yml) 4 | [![CodeQL](https://github.com/xt0rted/markdownlint-problem-matcher/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/xt0rted/markdownlint-problem-matcher/actions/workflows/codeql-analysis.yml) 5 | 6 | Adds a problem matcher that will detect errors from [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) and create annotations for them. 7 | 8 | ## Usage 9 | 10 | ```yml 11 | on: push 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: xt0rted/markdownlint-problem-matcher@v3 18 | - run: markdownlint **/*.md --ignore node_modules 19 | ``` 20 | 21 | ## Options 22 | 23 | Name | Allowed values | Description 24 | -- | -- | -- 25 | `action` | `add` (default), `remove` | If the problem matcher should be registered or removed 26 | 27 | ## License 28 | 29 | The scripts and documentation in this project are released under the [MIT License](LICENSE) 30 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - main 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | cancel-in-progress: true 12 | 13 | env: 14 | FORCE_COLOR: 3 15 | 16 | jobs: 17 | lint: 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - name: Checkout Repo 22 | uses: actions/checkout@v5.0.0 23 | 24 | - name: Install Node 25 | uses: actions/setup-node@v5.0.0 26 | with: 27 | node-version: 16 28 | 29 | - run: npm ci 30 | 31 | - run: npm run package 32 | 33 | - uses: ./ 34 | 35 | - run: npm run markdownlint 36 | 37 | - uses: ./ 38 | if: success() || failure() 39 | with: 40 | action: remove 41 | 42 | build: 43 | runs-on: ubuntu-latest 44 | 45 | strategy: 46 | fail-fast: false 47 | matrix: 48 | node: 49 | - 20 50 | - 21 51 | 52 | steps: 53 | - name: Checkout Repo 54 | uses: actions/checkout@v5.0.0 55 | 56 | - name: Install Node 57 | uses: actions/setup-node@v5.0.0 58 | with: 59 | node-version: ${{ matrix.node }} 60 | 61 | - run: npm ci 62 | 63 | - run: npm run lint 64 | 65 | - run: npm run build 66 | 67 | - run: npm test 68 | 69 | - run: npm run package 70 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdownlint-problem-matcher", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "Sets up a problem matcher for markdownlint-cli to create annotations for violations", 6 | "main": "dist/index.js", 7 | "type": "module", 8 | "scripts": { 9 | "clean": "rimraf coverage dist lib", 10 | "build": "tsc", 11 | "lint": "tsc --noEmit", 12 | "markdownlint": "markdownlint **/*.md --ignore node_modules", 13 | "package": "ncc build src/main.ts --source-map --license license.txt", 14 | "release": "npm run package && git add -f dist/", 15 | "test": "jest" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/xt0rted/markdownlint-problem-matcher.git" 20 | }, 21 | "keywords": [ 22 | "actions", 23 | "github", 24 | "problem-matcher", 25 | "annotations" 26 | ], 27 | "author": "xt0rted", 28 | "license": "MIT", 29 | "dependencies": { 30 | "@actions/core": "^1.11.1" 31 | }, 32 | "devDependencies": { 33 | "@types/jest": "^30.0.0", 34 | "@types/node": "^24.10.1", 35 | "@vercel/ncc": "^0.38.4", 36 | "github-actions-problem-matcher-typings": "^1.1.0", 37 | "jest": "^30.2.0", 38 | "jest-circus": "^30.1.3", 39 | "markdownlint-cli": "^0.45.0", 40 | "rimraf": "^6.1.2", 41 | "ts-jest": "^29.4.6", 42 | "typescript": "^5.9.3" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { readFile } from "node:fs/promises"; 2 | 3 | import { getInput, setFailed } from "@actions/core"; 4 | import { issueCommand } from "@actions/core/lib/command.js" 5 | 6 | import type { ProblemMatcherDocument } from "github-actions-problem-matcher-typings"; 7 | 8 | export async function run(): Promise { 9 | try { 10 | const action = getInput("action"); 11 | 12 | const matcherFile = new URL("problem-matcher.json", import.meta.url); 13 | 14 | switch (action) { 15 | case "add": 16 | issueCommand( 17 | "add-matcher", 18 | {}, 19 | matcherFile, 20 | ); 21 | break; 22 | 23 | case "remove": 24 | const fileContents = await readFile(matcherFile, { encoding: "utf8" }); 25 | const problemMatcherDocument: ProblemMatcherDocument = JSON.parse(fileContents); 26 | const problemMatcher = problemMatcherDocument.problemMatcher[0]; 27 | 28 | issueCommand( 29 | "remove-matcher", 30 | { 31 | owner: problemMatcher.owner, 32 | }, 33 | "", 34 | ); 35 | break; 36 | 37 | default: 38 | throw Error(`Unsupported action "${action}"`); 39 | } 40 | } catch (error) { 41 | if (error instanceof Error) { 42 | setFailed(error.message); 43 | } else { 44 | throw error; 45 | } 46 | } 47 | } 48 | 49 | run(); 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __tests__/runner/* 2 | 3 | dist/ 4 | 5 | node_modules/ 6 | lib/ 7 | 8 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 9 | # Logs 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | lerna-debug.log* 16 | 17 | # Diagnostic reports (https://nodejs.org/api/report.html) 18 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | *.pid.lock 25 | 26 | # Directory for instrumented libs generated by jscoverage/JSCover 27 | lib-cov 28 | 29 | # Coverage directory used by tools like istanbul 30 | coverage 31 | *.lcov 32 | 33 | # nyc test coverage 34 | .nyc_output 35 | 36 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 37 | .grunt 38 | 39 | # Bower dependency directory (https://bower.io/) 40 | bower_components 41 | 42 | # node-waf configuration 43 | .lock-wscript 44 | 45 | # Compiled binary addons (https://nodejs.org/api/addons.html) 46 | build/Release 47 | 48 | # Dependency directories 49 | jspm_packages/ 50 | 51 | # TypeScript v1 declaration files 52 | typings/ 53 | 54 | # TypeScript cache 55 | *.tsbuildinfo 56 | 57 | # Optional npm cache directory 58 | .npm 59 | 60 | # Optional eslint cache 61 | .eslintcache 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | 76 | # parcel-bundler cache (https://parceljs.org/) 77 | .cache 78 | 79 | # next.js build output 80 | .next 81 | 82 | # nuxt.js build output 83 | .nuxt 84 | 85 | # vuepress build output 86 | .vuepress/dist 87 | 88 | # Serverless directories 89 | .serverless/ 90 | 91 | # FuseBox cache 92 | .fusebox/ 93 | 94 | # DynamoDB Local files 95 | .dynamodb/ 96 | -------------------------------------------------------------------------------- /__tests__/problemMatcher.test.ts: -------------------------------------------------------------------------------- 1 | import { matchResults } from "../__helpers__/utils"; 2 | import { problemMatcher as problemMatcherJson } from "../src/problem-matcher.json"; 3 | 4 | import type { ProblemMatcher, ProblemPattern } from "github-actions-problem-matcher-typings"; 5 | 6 | const problemMatcher: ProblemMatcher = problemMatcherJson[0]; 7 | 8 | describe("problemMatcher", () => { 9 | it("has the correct owner", () => { 10 | expect(problemMatcher.owner).toEqual("markdownlint"); 11 | }); 12 | 13 | it("has one pattern", () => { 14 | expect(problemMatcher.pattern.length).toEqual(1); 15 | }); 16 | 17 | describe("pattern", () => { 18 | const reportOutput = [ 19 | "README.md:12:81 MD013/line-length Line length [Expected: 80; Actual: 149]", 20 | "docs/README.md:21:81 MD013/line-length Line length [Expected: 80; Actual: 119]", 21 | "docs/README.md:14 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]", 22 | ]; 23 | 24 | let pattern: ProblemPattern; 25 | let results: RegExpExecArray[]; 26 | 27 | beforeEach(() => { 28 | pattern = problemMatcher.pattern[0]; 29 | 30 | const regexp = new RegExp(pattern.regexp); 31 | 32 | results = matchResults(reportOutput, regexp); 33 | }); 34 | 35 | it("matches violations", () => { 36 | expect(results.length).toEqual(3); 37 | }); 38 | 39 | it("matches violation details", () => { 40 | expect(results[0][pattern.file]).toEqual("README.md"); 41 | expect(results[0][pattern.line]).toEqual("12"); 42 | expect(results[0][pattern.column]).toEqual("81"); 43 | expect(results[0][pattern.code]).toEqual("MD013/line-length"); 44 | expect(results[0][pattern.message]).toEqual("Line length [Expected: 80; Actual: 149]"); 45 | }); 46 | 47 | it("matches violation details in sub folder", () => { 48 | expect(results[1][pattern.file]).toEqual("docs/README.md"); 49 | expect(results[1][pattern.line]).toEqual("21"); 50 | expect(results[1][pattern.column]).toEqual("81"); 51 | expect(results[1][pattern.code]).toEqual("MD013/line-length"); 52 | expect(results[1][pattern.message]).toEqual("Line length [Expected: 80; Actual: 119]"); 53 | }); 54 | 55 | it("matches violation details without column", () => { 56 | expect(results[2][pattern.file]).toEqual("docs/README.md"); 57 | expect(results[2][pattern.line]).toEqual("14"); 58 | expect(results[2][pattern.column]).toBeUndefined(); 59 | expect(results[2][pattern.code]).toEqual("MD012/no-multiple-blanks"); 60 | expect(results[2][pattern.message]).toEqual("Multiple consecutive blank lines [Expected: 1; Actual: 2]"); 61 | }); 62 | }); 63 | }); 64 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 6 | "module": "Node16", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | // "allowJs": true, /* Allow javascript files to be compiled. */ 8 | // "checkJs": true, /* Report errors in .js files. */ 9 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 10 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 11 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 12 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 13 | // "outFile": "./", /* Concatenate and emit output to single file. */ 14 | "outDir": "./lib", /* Redirect output structure to the directory. */ 15 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 16 | // "composite": true, /* Enable project compilation */ 17 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 18 | // "removeComments": true, /* Do not emit comments to output. */ 19 | // "noEmit": true, /* Do not emit outputs. */ 20 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 21 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 22 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 23 | 24 | /* Strict Type-Checking Options */ 25 | "strict": true, /* Enable all strict type-checking options. */ 26 | "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ 27 | // "strictNullChecks": true, /* Enable strict null checks. */ 28 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 29 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 30 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 31 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 32 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 33 | 34 | /* Additional Checks */ 35 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 36 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 37 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 38 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 39 | 40 | /* Module Resolution Options */ 41 | "moduleResolution": "Node16", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 42 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 43 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 44 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 45 | // "typeRoots": [], /* List of folders to include type definitions from. */ 46 | // "types": [], /* Type declaration files to be included in compilation. */ 47 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 48 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 49 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 50 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 51 | "resolveJsonModule": true /* Allows for importing .json files as modules. */ 52 | 53 | /* Source Map Options */ 54 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 55 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 58 | 59 | /* Experimental Options */ 60 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 61 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 62 | }, 63 | "exclude": [ 64 | "node_modules", 65 | "__helpers__", 66 | "__tests__" 67 | ] 68 | } 69 | --------------------------------------------------------------------------------