Skip to content

Commit

Permalink
chore: align tsconfig with other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Feb 28, 2024
1 parent 7f9a59e commit 57ea798
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/utils/config.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFileSync } from "fs";

import { Configuration, getConfiguration } from "./config";
import { Configuration, getConfiguration } from "./config.js";

jest.mock("fs", () => ({
readFileSync: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from "path";
import * as path from "path";
import { readFileSync } from "fs";
import { CommandArgs } from "../cli.js";
import { getReportYear } from "./date.js";
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFormattedDate, getReportYear } from "./date";
import { getFormattedDate, getReportYear } from "./date.js";

describe("Function: getFormattedDate", () => {
it("returns the correctly formatted date", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { padLeftZero } from "./";
import { padLeftZero } from "./index.js";

describe("Function: padLeftZero", () => {
it("pads a single digit with a zero", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/money.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
convertStringCurrencyToNumber,
roundCurrency,
formatCurrency,
} from "./money";
} from "./money.js";

describe("Function: convertStringCurrencyToNumber", () => {
it("handles dollar signs", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/transaction.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AutoCategorization, Configuration, getConfiguration } from "./config";
import { TransactionImported, autoCategorize } from "./transaction";
import { AutoCategorization, Configuration, getConfiguration } from "./config.js";
import { TransactionImported, autoCategorize } from "./transaction.js";

describe("Function: autoCategorize", () => {
let mockTransaction: TransactionImported;
Expand Down
34 changes: 26 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,34 @@
"jest.config.ts"
],
"compilerOptions": {
"noImplicitReturns": true,
"noImplicitAny": true,
"removeComments": true,
"target": "es2022",
"module": "es2022",
"strict": true,
"outDir": "./dist",
"target": "es2022",
"module": "nodenext",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"moduleResolution": "node"
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"isolatedModules": true,
"newLine": "lf",
"useDefineForClassFields": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"forceConsistentCasingInFileNames": true,
},
"ts-node": {
"esm": true,
"transpileOnly": true,
"files": true,
"experimentalResolver": true
}
}

0 comments on commit 57ea798

Please sign in to comment.