From 4de10f079b090919ed1ab41502bfdb9ea87b8021 Mon Sep 17 00:00:00 2001 From: shellscape Date: Wed, 4 Dec 2019 16:05:06 -0500 Subject: [PATCH] chore(typescript): misc linting updates --- packages/typescript/README.md | 6 +++--- packages/typescript/src/index.js | 9 ++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/typescript/README.md b/packages/typescript/README.md index ba6c2597f..0e5c31ed6 100644 --- a/packages/typescript/README.md +++ b/packages/typescript/README.md @@ -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' })] }; ``` diff --git a/packages/typescript/src/index.js b/packages/typescript/src/index.js index 420441f33..37dbe1ebc 100644 --- a/packages/typescript/src/index.js +++ b/packages/typescript/src/index.js @@ -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; @@ -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(