diff --git a/.gitignore b/.gitignore index 4c6d8505..a665286c 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,4 @@ typings/ # End of https://www.gitignore.io/api/node dist +tsconfig.tsbuildinfo diff --git a/.lintstagedrc b/.lintstagedrc index db077db5..3adbe9d6 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,4 +1,4 @@ { "**/*.{js,ts,md,yml,json,html}": "prettier --write", - "**/*.{js,ts}": "eslint --fix", + "**/*.{js,ts}": "eslint --cache --fix" } diff --git a/package.json b/package.json index 4d8a0f95..98fafab9 100644 --- a/package.json +++ b/package.json @@ -8,19 +8,18 @@ "dist" ], "scripts": { - "clean": "rm -rf dist coverage", + "clean": "rm -rf dist coverage tsconfig.tsbuildinfo .eslintcache", "lint": "yarn prettier && yarn eslint", "lint:fix": "yarn prettier:fix && yarn eslint:fix", - "eslint": "eslint '{src,test}/**/*.ts'", + "eslint": "eslint '{src,test}/**/*.ts' --cache", "eslint:fix": "yarn eslint --fix", "prettier": "prettier --list-different \"**/*.{js,ts,md,yml,json,html}\"", "prettier:fix": "prettier --write \"**/*.{js,ts,md,yml,json,html}\"", - "prebuild": "yarn clean", - "build": "tsc", + "build": "tsc --build", "test": "jest", "coverage": "jest --coverage --coverageReporters=lcov", "prepare": "husky install", - "prepack": "yarn build && rm dist/tsconfig.tsbuildinfo", + "prepack": "yarn clean && yarn test && yarn build", "spellcheck": "npx --yes cspell --show-context --show-suggestions '**/*.*'" }, "repository": { diff --git a/tsconfig.json b/tsconfig.json index 3eda4a1c..4073e3a4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "rootDir": "./src", "outDir": "./dist", "lib": ["es2019", "es2020.bigint", "es2020.string", "es2020.symbol.wellknown"], "module": "commonjs",