Skip to content

Commit

Permalink
chore(typescript): misc linting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Dec 4, 2019
1 parent 971defe commit 4de10f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ import jsx from 'acorn-jsx';
import typescript from 'rollup-plugin-typescript';

export default {
// … other options …
acornInjectPlugins: [ jsx() ],
plugins: [ typescript({jsx: 'preserve'}) ]
// … other options …
acornInjectPlugins: [jsx()],
plugins: [typescript({ jsx: 'preserve' })]
};
```

Expand Down
9 changes: 2 additions & 7 deletions packages/typescript/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export default function typescript(options = {}) {

// Load options from `tsconfig.json` unless explicitly asked not to.
const tsConfig =
opts.tsconfig === false
? { compilerOptions: {} }
: readTsConfig(tsRuntime, opts.tsconfig);
opts.tsconfig === false ? { compilerOptions: {} } : readTsConfig(tsRuntime, opts.tsconfig);

delete opts.tsconfig;

Expand Down Expand Up @@ -138,10 +136,7 @@ export default function typescript(options = {}) {
let fatalError = false;

diagnostics.forEach((diagnostic) => {
const message = tsRuntime.flattenDiagnosticMessageText(
diagnostic.messageText,
'\n'
);
const message = tsRuntime.flattenDiagnosticMessageText(diagnostic.messageText, '\n');

if (diagnostic.file) {
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(
Expand Down

0 comments on commit 4de10f0

Please sign in to comment.