Skip to content

Commit

Permalink
fix(typescript)!: Change noEmitOnError default to false (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotWoods authored and shellscape committed Sep 9, 2020
1 parent 0e747cd commit 40bc128
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
18 changes: 9 additions & 9 deletions packages/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Requirements

This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. Due to the use of `tslib` to inject helpers, this plugin requires at least [TypeScript 2.1](https://github.com/Microsoft/TypeScript/wiki/Roadmap#21-december-2016). See also [here](https://blog.mariusschulz.com/2016/12/16/typescript-2-1-external-helpers-library#the-importhelpers-flag-and-tslib).
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. This plugin also requires at least [TypeScript 3.4](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html).

## Install

Expand Down Expand Up @@ -41,9 +41,9 @@ export default {
input: 'src/index.ts',
output: {
dir: 'output',
format: 'cjs'
format: 'cjs',
},
plugins: [typescript()]
plugins: [typescript()],
};
```

Expand Down Expand Up @@ -95,7 +95,7 @@ Overrides the TypeScript module used for transpilation.

```js
typescript({
typescript: require('some-fork-of-typescript')
typescript: require('some-fork-of-typescript'),
});
```

Expand All @@ -108,7 +108,7 @@ Overrides the injected TypeScript helpers with a custom version.

```js
typescript({
tslib: require.resolve('some-fork-of-tslib')
tslib: require.resolve('some-fork-of-tslib'),
});
```

Expand All @@ -119,7 +119,7 @@ Some of Typescript's [CompilerOptions](https://www.typescriptlang.org/docs/handb
#### `noEmitOnError`

Type: `Boolean`<br>
Default: `true`
Default: `false`

If a type error is detected, the Rollup build is aborted when this option is set to true.

Expand Down Expand Up @@ -151,8 +151,8 @@ export default {
input: './main.ts',
plugins: [
typescript({ module: 'CommonJS' }),
commonjs({ extensions: ['.js', '.ts'] }) // the ".ts" extension is required
]
commonjs({ extensions: ['.js', '.ts'] }), // the ".ts" extension is required
],
};
```

Expand Down Expand Up @@ -180,7 +180,7 @@ import typescript from '@rollup/plugin-typescript';
export default {
// … other options …
acornInjectPlugins: [jsx()],
plugins: [typescript({ jsx: 'preserve' })]
plugins: [typescript({ jsx: 'preserve' })],
};
```

Expand Down
1 change: 0 additions & 1 deletion packages/typescript/src/options/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export type CompilerOptions = import('typescript').CompilerOptions;

export const DEFAULT_COMPILER_OPTIONS: PartialCompilerOptions = {
module: 'esnext',
noEmitOnError: true,
skipLibCheck: true
};

Expand Down
6 changes: 5 additions & 1 deletion packages/typescript/test/fixtures/syntax-error/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"compilerOptions": {
"noEmitOnError": true
}
}

0 comments on commit 40bc128

Please sign in to comment.