Skip to content

Commit

Permalink
refactor: fix lint (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 2, 2020
1 parent 0e9ef0a commit a94aa35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions test/helpers/CopyPluginWithAssetInfo.js
@@ -1,8 +1,7 @@
import { RawSource } from "webpack-sources";

export default class CopyPluginWithAssetInfo {
apply(compiler) {
const plugin = { name: this.constructor.name };
const { RawSource } = compiler.webpack.sources;

compiler.hooks.thisCompilation.tap(plugin, (compilation) => {
compilation.hooks.additionalAssets.tap(plugin, () => {
Expand Down
8 changes: 1 addition & 7 deletions test/helpers/ModifyExistingAsset.js
@@ -1,17 +1,11 @@
import webpack from "webpack";

// webpack 5 exposes the sources property to ensure the right version of webpack-sources is used
const { ConcatSource } =
// eslint-disable-next-line global-require
webpack.sources || require("webpack-sources");

export default class ExistingCommentsFile {
constructor(options = {}) {
this.options = options;
}

apply(compiler) {
const plugin = { name: this.constructor.name };
const { ConcatSource } = compiler.webpack.sources;

compiler.hooks.thisCompilation.tap(plugin, (compilation) => {
compilation.hooks.additionalAssets.tap(plugin, () => {
Expand Down

0 comments on commit a94aa35

Please sign in to comment.