From bb6eba9be8dd9cfcda83095016052f0bcee4a33d Mon Sep 17 00:00:00 2001 From: Lars den Bakker Date: Fri, 10 Jan 2020 11:37:39 +0100 Subject: [PATCH] chore(commonjs): linting --- packages/commonjs/src/index.js | 8 ++++---- packages/commonjs/test/test.js | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/commonjs/src/index.js b/packages/commonjs/src/index.js index 2860c803a..77ba4baf6 100644 --- a/packages/commonjs/src/index.js +++ b/packages/commonjs/src/index.js @@ -1,7 +1,5 @@ -import { realpathSync, existsSync } from 'fs'; -import { extname, resolve, normalize } from 'path'; +import { extname } from 'path'; -import { sync as nodeResolveSync, isCore } from 'resolve'; import { createFilter } from '@rollup/pluginutils'; import { peerDependencies } from '../package.json'; @@ -77,7 +75,9 @@ export default function commonjs(options = {}) { buildStart() { if (options.namedExports != null) { - this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'); + this.warn( + 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.' + ); } const [major, minor] = this.meta.rollupVersion.split('.').map(Number); diff --git a/packages/commonjs/test/test.js b/packages/commonjs/test/test.js index de0c16d60..5b07727ed 100644 --- a/packages/commonjs/test/test.js +++ b/packages/commonjs/test/test.js @@ -199,7 +199,7 @@ test.serial('handles symlinked node_modules with preserveSymlinks: false', (t) = resolve({ preserveSymlinks: false, preferBuiltins: false - }), + }) ] }) .then((v) => { @@ -638,5 +638,8 @@ test('logs a warning when the deprecated namedExports option is used', async (t) }); await getCodeFromBundle(bundle); - t.is(message, 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'); + t.is( + message, + 'The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.' + ); });