Add tsconfig for tests and update eslint.
This commit is contained in:
parent
a9b48a420f
commit
438ea90a46
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
||||||
sourceType: "module", // Allows for the use of imports
|
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
|
extends: ["plugin:@typescript-eslint/recommended"], // Uses the linting rules from @typescript-eslint/eslint-plugin
|
||||||
env: {
|
env: {
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"lint": "eslint . --fix",
|
"lint": "eslint src/ --fix",
|
||||||
|
"lint-test": "eslint test/ --fix",
|
||||||
"test": "jest test/ --config jest.config.ts"
|
"test": "jest test/ --config jest.config.ts"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
8
tsconfig.test.json
Normal file
8
tsconfig.test.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "@tsconfig/node-lts/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "dist"
|
||||||
|
},
|
||||||
|
"include": ["test"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user