Add tsconfig for tests and update eslint.

This commit is contained in:
Carter Bertolini 2023-10-06 17:27:07 -04:00
parent a9b48a420f
commit 438ea90a46
3 changed files with 11 additions and 2 deletions

View File

@ -3,7 +3,7 @@ module.exports = {
parserOptions: {
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
project: "./tsconfig.json"
project: ["./tsconfig.json", "./tsconfig.test.json"]
},
extends: ["plugin:@typescript-eslint/recommended"], // Uses the linting rules from @typescript-eslint/eslint-plugin
env: {

View File

@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"start": "node dist/index.js",
"lint": "eslint . --fix",
"lint": "eslint src/ --fix",
"lint-test": "eslint test/ --fix",
"test": "jest test/ --config jest.config.ts"
},
"author": "",

8
tsconfig.test.json Normal file
View File

@ -0,0 +1,8 @@
{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
"outDir": "dist"
},
"include": ["test"],
"exclude": ["node_modules"]
}