Wallaby also sets few default compiler settings that are not replaced by tsconfig.json compiler settings (to perform TypeScript compilation faster).

noLib:true,noResolve:true,declaration:false,noEmitOnError:false

If you want wallaby to stop overriding them, then you may to do it in your wallaby.js config by adding the useStandardDefaults: true setting. For example, if you have noEmitOnError set to true in your tsconfig.json and would like wallaby apply that value, you may do this:

It may be useful if you want to stop running tests when TypeScript compilation fails (for any reason).

TypeScript compiler version

By default, wallaby.js is using your project local TypeScript compiler version (from the project node_modules/typescript), if there’s no local version, then wallaby falls back to the embedded TypeScript compiler version which is v2.0.7.

If you want to use a different version, you may pass TypeScript compiler via typescript options property. For example, the following config will make wallaby.js use TypeScript compiler from your installed node modules (which is the default option when you don’t specify the setting at all):

Isolated modules

If you are using Jest with ts-jest, or any other node based testing framework that compiles TypeScript files independently using ts.transpileModule, you may use the isolatedModules setting to make Wallaby do the same. Using the setting may improve your project’s initial compilation time.

You may find the working sample of wallaby.js configuration for TypeScript with AMD and require.js in this repository.

Ordering source files with reference comments

If you are using reference comments in your source files (and not using an enforced module dependency mechanism, such as CommonJs with node.js/webpack/browserify), wallaby.js may still automatically sort your source files so you don’t need to list them in a correct order in your files list, but use broader patterns instead.

To make wallaby sort the files based on reference comments, you need to pass orderFilesByReferenceComments option to your TypeScript compiler settings:

You may find the working sample of wallaby.js configuration for TypeScript and node.js in this repository (wallaby-node.js configuration file).

TypeScript compilerOptions.paths setting

TypeScript compilerOptions.paths setting doesn’t affect compiled JavaScript, so if you are using the setting to shorten your import paths, then you’ll need to configure your environment to respect the setting.

For example, let’s say you have the src/app folder, and would like to import src/app/myModule.ts module as

If you are using aliases, such as @ prefix, you may use then you may use resolve.alias setting. For example, to be able to import @domain/* from src.app/domain, you may have the the following configuration: