{
- "include": ["./**/*.ts"],
+ "include": ["./**/*.ts", "./**/*.js"],
+ "exclude": ["./helper.js"],
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
- "allowJs": true
+ "noEmit": true,
+ "checkJs": true,
+ "allowJs": true,
+ "esModuleInterop": true
}
}
module.exports = {
preset: 'ts-jest',
collectCoverageFrom: ['src/**/*.ts'],
- coveragePathIgnorePatterns: ['/node_modules/', 'src/index.ts'],
+ coveragePathIgnorePatterns: [
+ '/node_modules/',
+ 'src/index.ts',
+ 'src/entries',
+ 'src/consola.ts',
+ ],
testMatch: [
'**/__tests__/**/*.spec.[j]s?(x)',
// '**/__tests__/**/*.spec.[jt]s?(x)',
"types": "dist/index.d.ts",
"license": "MIT",
"scripts": {
- "test:types": "tsc --build tsconfig.json",
+ "test:types:src": "tsc --build tsconfig.check-types.json",
+ "test:types:test": "tsc --build __tests__/tsconfig.json",
+ "test:types": "yarn test:types:src && yarn test:types:test",
"test:unit": "jest --coverage",
"test:mocha": "NODE_ENV=test mocha -r ts-node/register __tests__/**/*.spec.js __tests__/*.spec.js",
"test:mocha:dev": "yarn run test:mocha -w --extension ts --reporter min",
- "test": "yarn run test:types && yarn run test:unit",
+ "test": "yarn run test:types && yarn run test:unit && yarn build",
"build": "yarn rollup -c rollup.config.js",
"dev": "webpack-dev-server --mode=development"
},
--- /dev/null
+{
+ "include": ["src/**/*.ts"],
+ "compilerOptions": {
+ "target": "esnext",
+ "module": "commonjs",
+ // "lib": ["es2017.object"] ,
+ "allowJs": true,
+ "checkJs": true,
+ // "declaration": true ,
+ // "sourceMap": true ,
+ // "outFile": "./", /* Concatenate and emit output to single file. */
+ // "outDir": "./dist" ,
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+ // "composite": true, /* Enable project compilation */
+ "noEmit": true,
+
+ "strict": true,
+ "noUnusedLocals": true,
+ // "noUnusedParameters": true,
+ "noImplicitReturns": true,
+
+ "moduleResolution": "node",
+ "esModuleInterop": true
+ }
+}