Skip to content

Commit b53317c

Browse files
committed
ts configs update
1 parent 99db70b commit b53317c

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
verbose: true, // Uncomment for detailed test output
2+
//verbose: true, // Uncomment for detailed test output
33
collectCoverage: true,
44
coverageDirectory: 'coverage',
55
testEnvironment: 'jsdom',

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dist"
1010
],
1111
"scripts": {
12-
"build": "npm run clean && npm run build-version && npm run build-lib && npm run build-types && npm run build-dev && npm run build-dist && npm run build-storybook",
12+
"build": "npm run clean && npm run build-lib && npm run build-types && npm run build-version && npm run build-dev && npm run build-dist && npm run build-storybook",
1313
"build-lib": "babel src -d lib --source-maps --extensions \".ts,.js\"",
1414
"build-types": "tsc --emitDeclarationOnly",
1515
"build-version": "sh ./timestamp.sh > src/versionInfo.ts && eslint \"src/versionInfo.ts\" --fix",
@@ -20,7 +20,8 @@
2020
"clean": "rm -rf lib dist ./Documentation/form-examples/main.js",
2121
"coverage": "jest --coverage --collectCoverageFrom=src/**/*.[jt]s",
2222
"lint": "eslint",
23-
"lint-fix": "eslint --fix",
23+
"typecheck": "tsc --noEmit",
24+
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
2425
"jest": "jest --no-coverage",
2526
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --watch",
2627
"test": "npm run build-version && npm run lint && npm run jest",

tsconfig.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"compilerOptions": {
33
/* Basic Options */
4-
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
5-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
4+
"target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
5+
"module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
6+
"moduleResolution": "node", /* Use Node.js-style module resolution for Webpack compatibility. */
67
/* Crucial for library compatibility: */
7-
"skipLibCheck": true,
8+
// "skipLibCheck": true, // if true, Type errors in library .d.ts files will be ignored, so you might miss some issues.
89
"allowSyntheticDefaultImports": true, // Often helps with ESM interop
910
/* Crucial for library compatibility END */
1011
"lib": [
@@ -20,7 +21,7 @@
2021
"sourceMap": true /* Generates corresponding '.map' file. */,
2122
// "outFile": "./", /* Concatenate and emit output to single file. */
2223

23-
"outDir": "lib" /* Redirect output structure to the directory. */,
24+
"outDir": "dist" /* Redirect output structure to the directory. */,
2425
"rootDir": "src/",
2526

2627
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
@@ -75,5 +76,6 @@
7576
},
7677
"include": [
7778
"src/**/*"
78-
]
79+
],
80+
"exclude": ["node_modules", "dist"]
7981
}

tsconfig.test.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["test/**/*"],
4+
"compilerOptions": {
5+
"rootDir": ".",
6+
"noEmit": true
7+
}
8+
}

0 commit comments

Comments
 (0)