From b78463a2e6148ae14dc6bc19e051c8e3ba2781b9 Mon Sep 17 00:00:00 2001 From: Alexander Krasnoyarov Date: Sat, 10 Oct 2020 20:56:03 +0300 Subject: [PATCH] chore: update release script (#1913) --- .eslintrc.js | 6 ++++++ bin/utils/validate-options.js | 21 ------------------- package.json | 3 +-- .../generators/__tests__/utils/entry.test.ts | 1 + .../__tests__/utils/languageSupport.test.ts | 2 ++ .../__tests__/utils/plugins.test.ts | 1 + .../__tests__/utils/styleSupport.test.ts | 2 ++ .../templates/addon-package.json.js | 1 - packages/generators/templates/package.json.js | 1 - .../commonsChunkPlugin/commonsChunkPlugin.ts | 1 - packages/utils/__tests__/defineTest.ts | 5 ++--- .../__tests__/global-packages-path.test.ts | 5 +++-- packages/utils/src/npm-packages-exists.ts | 1 - packages/webpack-cli/__tests__/init.test.js | 1 - .../__tests__/serve/webpack.config.js | 1 - packages/webpack-cli/lib/bootstrap.js | 2 +- packages/webpack-cli/lib/utils/Compiler.js | 2 +- .../lib/utils/prompt-installation.js | 3 +-- packages/webpack-scaffold/src/index.ts | 1 - smoketests/watch/watch.array.smoketest.js | 3 --- smoketests/watch/watch.single.smoketest.js | 3 --- .../errors/v5-schema-validation/options.js | 3 --- .../v5-schema-validation/validation.test.js | 17 --------------- .../typescript/typescript.test.js | 1 - test/config/multiple/multiple-config.test.js | 1 - test/entry/scss/scss.test.js | 1 - test/info/info-output.test.js | 1 - test/init/auto/init-auto.test.js | 1 - test/init/force/init-force.test.js | 1 - test/init/generator/init-inquirer.test.js | 1 - .../language/css/init-language-css.test.js | 1 - .../init/language/js/init-language-js.test.js | 1 - .../init-multipleEntries.test.js | 2 +- test/loader/loader.test.js | 1 - test/migrate/config/bad-webpack.config.js | 2 -- test/mode/mode-single-arg/webpack.config.js | 1 - .../with-config/no-stats-with-config.test.js | 3 +-- test/no-stats/with-config/webpack.config.js | 1 - test/no-stats/with-flags/no-stats.test.js | 3 +-- test/no-stats/with-flags/webpack.config.js | 1 - test/progress/progress-flag.test.js | 1 - test/serve/basic/webpack.config.js | 1 - test/serve/with-custom-port/webpack.config.js | 1 - test/stats/cli-flags/stats.test.js | 1 - 44 files changed, 24 insertions(+), 89 deletions(-) delete mode 100644 bin/utils/validate-options.js delete mode 100644 test/binCases/errors/v5-schema-validation/options.js delete mode 100644 test/binCases/errors/v5-schema-validation/validation.test.js diff --git a/.eslintrc.js b/.eslintrc.js index 4202b6ccc01..e07032771a8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,8 +1,14 @@ module.exports = { root: true, + reportUnusedDisableDirectives: true, extends: ['eslint:recommended', 'plugin:node/recommended', 'plugin:prettier/recommended', 'prettier'], parserOptions: { ecmaVersion: 2018, sourceType: 'script' }, plugins: ['node'], + settings: { + node: { + allowModules: ['@webpack-cli/generators', '@webpack-cli/webpack-scaffold', '@webpack-cli/utils'], + }, + }, env: { node: true, es6: true, diff --git a/bin/utils/validate-options.js b/bin/utils/validate-options.js deleted file mode 100644 index 4452e54650e..00000000000 --- a/bin/utils/validate-options.js +++ /dev/null @@ -1,21 +0,0 @@ -const webpackConfigurationSchema = require("../config/webpackConfigurationSchema.json"); -const validateSchema = require("webpack").validateSchema; - -module.exports = function validateOptions(options) { - let error; - try { - const errors = validateSchema(webpackConfigurationSchema, options); - if (errors && errors.length > 0) { - const { WebpackOptionsValidationError } = require("webpack"); - error = new WebpackOptionsValidationError(errors); - } - } catch (err) { - error = err; - } - - if (error) { - console.error(error.message); - // eslint-disable-next-line no-process-exit - process.exit(-1); - } -}; diff --git a/package.json b/package.json index 7bfc01215b6..89dd8b10658 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "webpack-cli-monorepo", - "version": "4.0.0-beta.9", "description": "CLI for webpack & friends", "license": "MIT", "private": true, @@ -41,7 +40,7 @@ "test:ci": "yarn test:cli && yarn test:packages", "test:watch": "jest test/ packages/ --watch", "test:smoke": "smoketests/smoketests.sh", - "publish:monorepo": "yarn build && lerna version prerelease --preid rc && lerna publish from-git --canary --preid rc --dist-tag next" + "publish:monorepo": "yarn build && lerna version && lerna publish from-git" }, "config": { "commitizen": { diff --git a/packages/generators/__tests__/utils/entry.test.ts b/packages/generators/__tests__/utils/entry.test.ts index 688382d4781..78ba29200f2 100644 --- a/packages/generators/__tests__/utils/entry.test.ts +++ b/packages/generators/__tests__/utils/entry.test.ts @@ -4,6 +4,7 @@ jest.setMock('@webpack-cli/webpack-scaffold', { }); import { Input, InputValidate } from '@webpack-cli/webpack-scaffold'; +// eslint-disable-next-line node/no-missing-import import entry from '../../lib/utils/entry'; describe('entry', () => { diff --git a/packages/generators/__tests__/utils/languageSupport.test.ts b/packages/generators/__tests__/utils/languageSupport.test.ts index 858eef018cf..9d9161cc224 100644 --- a/packages/generators/__tests__/utils/languageSupport.test.ts +++ b/packages/generators/__tests__/utils/languageSupport.test.ts @@ -1,4 +1,6 @@ +// eslint-disable-next-line node/no-missing-import import language, { LangType, getBabelLoader, getTypescriptLoader } from '../../lib/utils/languageSupport'; +// eslint-disable-next-line node/no-missing-import import { CustomGenerator } from '../../lib/types'; // TODO: enable after jest release diff --git a/packages/generators/__tests__/utils/plugins.test.ts b/packages/generators/__tests__/utils/plugins.test.ts index 35c7fe8ecc2..8c87df4530e 100644 --- a/packages/generators/__tests__/utils/plugins.test.ts +++ b/packages/generators/__tests__/utils/plugins.test.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line node/no-missing-import import { replaceAt, generatePluginName } from '../../lib/utils/plugins'; describe('generate plugin name', () => { diff --git a/packages/generators/__tests__/utils/styleSupport.test.ts b/packages/generators/__tests__/utils/styleSupport.test.ts index 550b95a9ebb..3eb4a0ce4a9 100644 --- a/packages/generators/__tests__/utils/styleSupport.test.ts +++ b/packages/generators/__tests__/utils/styleSupport.test.ts @@ -1,4 +1,6 @@ +// eslint-disable-next-line node/no-missing-import import style, { StylingType } from '../../lib/utils/styleSupport'; +// eslint-disable-next-line node/no-missing-import import { CustomGenerator } from '../../lib/types'; // TODO: enable after jest release diff --git a/packages/generators/templates/addon-package.json.js b/packages/generators/templates/addon-package.json.js index a92115062e3..28ce806a7a7 100644 --- a/packages/generators/templates/addon-package.json.js +++ b/packages/generators/templates/addon-package.json.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type module.exports = (name) => { return { version: '1.0.0', diff --git a/packages/generators/templates/package.json.js b/packages/generators/templates/package.json.js index 281e4cdd2b2..effe0ca439d 100644 --- a/packages/generators/templates/package.json.js +++ b/packages/generators/templates/package.json.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type module.exports = (usingDefaults) => { const scripts = { build: 'webpack', diff --git a/packages/migrate/src/commonsChunkPlugin/commonsChunkPlugin.ts b/packages/migrate/src/commonsChunkPlugin/commonsChunkPlugin.ts index 2739fba8db4..4bc15bbda2f 100644 --- a/packages/migrate/src/commonsChunkPlugin/commonsChunkPlugin.ts +++ b/packages/migrate/src/commonsChunkPlugin/commonsChunkPlugin.ts @@ -170,7 +170,6 @@ export default function (j: JSCodeshift, ast: Node): Node { cacheGroup[chunkKey] = []; } - // eslint-disable-next-line cacheGroup[chunkKey] = cacheGroup[chunkKey].map((prop): string | void => prop.key.name === 'test' ? mergeTestPropArrowFunction(j, chunkKey, pathValue) : prop, ); diff --git a/packages/utils/__tests__/defineTest.ts b/packages/utils/__tests__/defineTest.ts index 20a7806a164..6f5a51bac9c 100644 --- a/packages/utils/__tests__/defineTest.ts +++ b/packages/utils/__tests__/defineTest.ts @@ -1,6 +1,5 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -import fs from 'fs'; -import path from 'path'; +import * as fs from 'fs'; +import * as path from 'path'; import { JSCodeshift, Node } from '../src/types/NodePath'; diff --git a/packages/utils/__tests__/global-packages-path.test.ts b/packages/utils/__tests__/global-packages-path.test.ts index 2e3350772e9..a36c469bfdb 100644 --- a/packages/utils/__tests__/global-packages-path.test.ts +++ b/packages/utils/__tests__/global-packages-path.test.ts @@ -2,6 +2,7 @@ jest.setMock('webpack-cli/lib/utils/get-package-manager', { getPackageManager: jest.fn(), }); +// eslint-disable-next-line node/no-missing-import import { getPathToGlobalPackages } from '../lib/global-packages-path'; import { getPackageManager } from 'webpack-cli/lib/utils/get-package-manager'; jest.mock('execa'); @@ -9,8 +10,8 @@ jest.mock('cross-spawn'); const globalModulesNpmValue = 'test-npm'; jest.setMock('global-modules', globalModulesNpmValue); -import path from 'path'; -import spawn from 'cross-spawn'; +import * as path from 'path'; +import * as spawn from 'cross-spawn'; describe('getPathToGlobalPackages', () => { it('uses global-modules if package manager is npm', () => { diff --git a/packages/utils/src/npm-packages-exists.ts b/packages/utils/src/npm-packages-exists.ts index 42897c33b2a..2098d3e0108 100644 --- a/packages/utils/src/npm-packages-exists.ts +++ b/packages/utils/src/npm-packages-exists.ts @@ -60,7 +60,6 @@ export function npmPackagesExists(pkg: string[]): void { }) .catch((err: Error): void => { console.error(err.stack || err); - // eslint-disable-next-line no-process-exit process.exit(2); }) .then(resolvePackagesIfReady); diff --git a/packages/webpack-cli/__tests__/init.test.js b/packages/webpack-cli/__tests__/init.test.js index 308cca17250..26db5236f37 100644 --- a/packages/webpack-cli/__tests__/init.test.js +++ b/packages/webpack-cli/__tests__/init.test.js @@ -43,7 +43,6 @@ describe('init', () => { // Test regressively files are scaffolded const files = ['./sw.js', './package.json', './src/index.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(path.resolve(genPath, file))).toBeTruthy(); }); diff --git a/packages/webpack-cli/__tests__/serve/webpack.config.js b/packages/webpack-cli/__tests__/serve/webpack.config.js index ef02e82b858..81f34fcc1ce 100644 --- a/packages/webpack-cli/__tests__/serve/webpack.config.js +++ b/packages/webpack-cli/__tests__/serve/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../../../test/utils/webpack-cli-test-plugin'); module.exports = { diff --git a/packages/webpack-cli/lib/bootstrap.js b/packages/webpack-cli/lib/bootstrap.js index 5428c5dd74b..c73b0f2ab29 100644 --- a/packages/webpack-cli/lib/bootstrap.js +++ b/packages/webpack-cli/lib/bootstrap.js @@ -96,7 +96,7 @@ const runCLI = async (cliArgs) => { }); // Filter out the value for the overridden key const newArgKeys = Object.keys(argsMap).filter((arg) => !keysToDelete.includes(argsMap[arg].pos)); - // eslint-disable-next-line require-atomic-updates + cliArgs = newArgKeys; args = argParser('', core, cliArgs); await cli.run(args.opts, core); diff --git a/packages/webpack-cli/lib/utils/Compiler.js b/packages/webpack-cli/lib/utils/Compiler.js index f9ef18d061f..6c46b47c7b4 100644 --- a/packages/webpack-cli/lib/utils/Compiler.js +++ b/packages/webpack-cli/lib/utils/Compiler.js @@ -72,7 +72,7 @@ class Compiler { if (err) { lastHash = null; logger.error(err.stack || err); - process.exit(1); // eslint-disable-line + process.exit(1); } if (!outputOptions.watch && stats.hasErrors()) { process.exitCode = 1; diff --git a/packages/webpack-cli/lib/utils/prompt-installation.js b/packages/webpack-cli/lib/utils/prompt-installation.js index 03259bdbf87..8b5b4c37800 100644 --- a/packages/webpack-cli/lib/utils/prompt-installation.js +++ b/packages/webpack-cli/lib/utils/prompt-installation.js @@ -9,7 +9,6 @@ const { packageExists } = require('./package-exists'); * @param packageName * @param preMessage Message to show before the question */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type async function promptInstallation(packageName, preMessage) { const packageManager = getPackageManager(); const options = [packageManager === 'yarn' ? 'add' : 'install', '-D', packageName]; @@ -31,7 +30,7 @@ async function promptInstallation(packageName, preMessage) { await runCommand(commandToBeRun); return packageExists(packageName); } - // eslint-disable-next-line require-atomic-updates + process.exitCode = 2; } diff --git a/packages/webpack-scaffold/src/index.ts b/packages/webpack-scaffold/src/index.ts index 73488052b51..6052b7582f4 100755 --- a/packages/webpack-scaffold/src/index.ts +++ b/packages/webpack-scaffold/src/index.ts @@ -136,7 +136,6 @@ export function Confirm(self: Generator, name: string, message: string, defaultC } // TODO: to understand this type -// eslint-disable-next-line export function AutoComplete(name: string, message: string, options: object = {}): any { return Object.assign( { diff --git a/smoketests/watch/watch.array.smoketest.js b/smoketests/watch/watch.array.smoketest.js index 9b2deada380..bf615dc606e 100644 --- a/smoketests/watch/watch.array.smoketest.js +++ b/smoketests/watch/watch.array.smoketest.js @@ -27,7 +27,6 @@ const testEntryFiles = [ */ async function setup() { await testEntryFiles.forEach(async (file) => { - // eslint-disable-next-line file.cpFP = await copyFileAsync(__dirname, file.name); }); } @@ -48,7 +47,6 @@ async function teardown() { }); } -// eslint-disable-next-line (async () => { try { await setup(); @@ -87,7 +85,6 @@ async function teardown() { }); // Buffer should have compiled equal amount of each compilation and have diff output directories - // eslint-disable-next-line webpackProc.stderr.on('close', async () => { assert.strictEqual(dataBuffer.length > 3, true, 'expected buffer for array configuration to be more than 3'); const nCompilationBufferOne = []; diff --git a/smoketests/watch/watch.single.smoketest.js b/smoketests/watch/watch.single.smoketest.js index b0aba1fd1aa..277bd0950f4 100644 --- a/smoketests/watch/watch.single.smoketest.js +++ b/smoketests/watch/watch.single.smoketest.js @@ -22,7 +22,6 @@ const testEntryFiles = [ */ async function setup() { await testEntryFiles.forEach(async (file) => { - // eslint-disable-next-line file.cpFP = await copyFileAsync(__dirname, file.name); }); } @@ -43,7 +42,6 @@ async function teardown() { }); } -// eslint-disable-next-line (async () => { try { await setup(); @@ -81,7 +79,6 @@ async function teardown() { }); // Buffer should have compiled equal amount of each compilation and have diff output directories - // eslint-disable-next-line webpackProc.stderr.on('close', async () => { assert.strictEqual(dataBuffer.length >= 1, true, 'expected single configuration to re-compile'); await teardown(); diff --git a/test/binCases/errors/v5-schema-validation/options.js b/test/binCases/errors/v5-schema-validation/options.js deleted file mode 100644 index 01afdf9a640..00000000000 --- a/test/binCases/errors/v5-schema-validation/options.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - entry: "hey" -}; diff --git a/test/binCases/errors/v5-schema-validation/validation.test.js b/test/binCases/errors/v5-schema-validation/validation.test.js deleted file mode 100644 index bd18d9020f4..00000000000 --- a/test/binCases/errors/v5-schema-validation/validation.test.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -const validation = require("../../../../bin/utils/validate-options"); -const { run } = require("../../../testUtils"); - -test("validation", () => { - const mockExit = jest.spyOn(process, "exit").mockImplementation(() => {}); - validation(null); - expect(mockExit).toHaveBeenCalledWith(-1); - mockExit.mockRestore(); -}); - -test("validation-success", () => { - const { stdout, code } = run(__dirname, ["--config", "./options.js"]); - expect(stdout).toContain("Can't resolve 'hey'"); - expect(code).toBe(2); -}); diff --git a/test/config-format/typescript/typescript.test.js b/test/config-format/typescript/typescript.test.js index e3633445871..8070f2c47a3 100644 --- a/test/config-format/typescript/typescript.test.js +++ b/test/config-format/typescript/typescript.test.js @@ -1,4 +1,3 @@ -/* eslint-disable node/no-missing-require */ /* eslint-disable node/no-unpublished-require */ const { run, runInstall } = require('../../utils/test-utils'); const { stat } = require('fs'); diff --git a/test/config/multiple/multiple-config.test.js b/test/config/multiple/multiple-config.test.js index dedf892b115..f29651bf8ef 100644 --- a/test/config/multiple/multiple-config.test.js +++ b/test/config/multiple/multiple-config.test.js @@ -1,6 +1,5 @@ const { existsSync } = require('fs'); const { resolve } = require('path'); -// eslint-disable-next-line node/no-missing-require const { run } = require('../../utils/test-utils'); describe('Multiple config flag: ', () => { diff --git a/test/entry/scss/scss.test.js b/test/entry/scss/scss.test.js index 661f63de2ef..565fb273c10 100644 --- a/test/entry/scss/scss.test.js +++ b/test/entry/scss/scss.test.js @@ -1,4 +1,3 @@ -/* eslint-disable node/no-missing-require */ /* eslint-disable node/no-unpublished-require */ const { run, runInstall } = require('../../utils/test-utils'); diff --git a/test/info/info-output.test.js b/test/info/info-output.test.js index 6274574f2c5..d85d3b8fedc 100644 --- a/test/info/info-output.test.js +++ b/test/info/info-output.test.js @@ -1,4 +1,3 @@ -/* eslint-disable space-before-function-paren */ 'use strict'; const { red } = require('colorette'); diff --git a/test/init/auto/init-auto.test.js b/test/init/auto/init-auto.test.js index 9656b5d2a90..11705a3d38c 100644 --- a/test/init/auto/init-auto.test.js +++ b/test/init/auto/init-auto.test.js @@ -35,7 +35,6 @@ describe('init auto flag', () => { // Test regressively files are scaffolded const files = ['./sw.js', './package.json', './src/index.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/init/force/init-force.test.js b/test/init/force/init-force.test.js index f99c940094e..90060387ea1 100644 --- a/test/init/force/init-force.test.js +++ b/test/init/force/init-force.test.js @@ -29,7 +29,6 @@ describe('init force flag', () => { // Test regressively files are scaffolded const files = ['./sw.js', './package.json', './src/index.js', './webpack.config.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/init/generator/init-inquirer.test.js b/test/init/generator/init-inquirer.test.js index de3eed1bc31..27af589ee4b 100644 --- a/test/init/generator/init-inquirer.test.js +++ b/test/init/generator/init-inquirer.test.js @@ -29,7 +29,6 @@ describe('init', () => { // Test regressively files are scaffolded const files = ['./sw.js', './package.json', './src/index.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/init/language/css/init-language-css.test.js b/test/init/language/css/init-language-css.test.js index ab8a1c2356b..7e28f3ff3bf 100644 --- a/test/init/language/css/init-language-css.test.js +++ b/test/init/language/css/init-language-css.test.js @@ -34,7 +34,6 @@ describe('init with SCSS', () => { // Test regressively files are scaffolded const files = ['./package.json', './.yo-rc.json', './src/index.js', 'webpack.config.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/init/language/js/init-language-js.test.js b/test/init/language/js/init-language-js.test.js index bbe25ffe275..1400f8861a5 100644 --- a/test/init/language/js/init-language-js.test.js +++ b/test/init/language/js/init-language-js.test.js @@ -30,7 +30,6 @@ describe('init with Typescript', () => { // Test regressively files are scaffolded const files = ['./package.json', './.yo-rc.json', './tsconfig.json', './src/index.ts', 'webpack.config.js']; - // eslint-disable-next-line prettier/prettier files.forEach((file) => { expect(fs.existsSync(resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/init/multipleEntries/init-multipleEntries.test.js b/test/init/multipleEntries/init-multipleEntries.test.js index 0c53dea3259..f7c1d9abc2b 100644 --- a/test/init/multipleEntries/init-multipleEntries.test.js +++ b/test/init/multipleEntries/init-multipleEntries.test.js @@ -32,7 +32,7 @@ describe('init with multiple entries', () => { // Test regressively files are scaffolded const files = ['./package.json', './src/a.js', './src/b.js', './.yo-rc.json']; - // eslint-disable-next-line prettier/prettier + files.forEach((file) => { expect(fs.existsSync(path.resolve(genPath, file))).toBeTruthy(); }); diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index a4c11842e39..239e69247d2 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -1,4 +1,3 @@ -/* eslint-disable node/no-unpublished-require */ 'use strict'; const { existsSync } = require('fs'); diff --git a/test/migrate/config/bad-webpack.config.js b/test/migrate/config/bad-webpack.config.js index 5bec4e124d8..ff6b82b575e 100644 --- a/test/migrate/config/bad-webpack.config.js +++ b/test/migrate/config/bad-webpack.config.js @@ -1,5 +1,3 @@ -/* eslint-disable */ - module.exports = { output: { badOption: true, diff --git a/test/mode/mode-single-arg/webpack.config.js b/test/mode/mode-single-arg/webpack.config.js index b1dcc533e36..6ff8055897a 100644 --- a/test/mode/mode-single-arg/webpack.config.js +++ b/test/mode/mode-single-arg/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/no-stats/with-config/no-stats-with-config.test.js b/test/no-stats/with-config/no-stats-with-config.test.js index 99dc73dd87d..5b7031253f1 100644 --- a/test/no-stats/with-config/no-stats-with-config.test.js +++ b/test/no-stats/with-config/no-stats-with-config.test.js @@ -1,7 +1,6 @@ 'use strict'; -// eslint-disable-next-line node/no-unpublished-require + const { run } = require('../../utils/test-utils'); -// eslint-disable-next-line node/no-extraneous-require const { version } = require('webpack'); describe('stats flag', () => { diff --git a/test/no-stats/with-config/webpack.config.js b/test/no-stats/with-config/webpack.config.js index 60033b6bffd..f05845583e4 100644 --- a/test/no-stats/with-config/webpack.config.js +++ b/test/no-stats/with-config/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/no-stats/with-flags/no-stats.test.js b/test/no-stats/with-flags/no-stats.test.js index 80f7c27dcaa..34ae453eb69 100644 --- a/test/no-stats/with-flags/no-stats.test.js +++ b/test/no-stats/with-flags/no-stats.test.js @@ -1,7 +1,6 @@ 'use strict'; -// eslint-disable-next-line node/no-unpublished-require + const { run } = require('../../utils/test-utils'); -// eslint-disable-next-line node/no-extraneous-require const { version } = require('webpack'); describe('stats flag', () => { diff --git a/test/no-stats/with-flags/webpack.config.js b/test/no-stats/with-flags/webpack.config.js index a922c06f2b2..95e2766b9ae 100644 --- a/test/no-stats/with-flags/webpack.config.js +++ b/test/no-stats/with-flags/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/progress/progress-flag.test.js b/test/progress/progress-flag.test.js index 4ada05f138f..b98aad11e83 100644 --- a/test/progress/progress-flag.test.js +++ b/test/progress/progress-flag.test.js @@ -1,6 +1,5 @@ 'use strict'; -// eslint-disable-next-line node/no-unpublished-require const { run } = require('../utils/test-utils'); describe('progress flag', () => { diff --git a/test/serve/basic/webpack.config.js b/test/serve/basic/webpack.config.js index 8fdd96a616b..39850bab850 100644 --- a/test/serve/basic/webpack.config.js +++ b/test/serve/basic/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/serve/with-custom-port/webpack.config.js b/test/serve/with-custom-port/webpack.config.js index 3121fcb10ad..0b86f19706c 100644 --- a/test/serve/with-custom-port/webpack.config.js +++ b/test/serve/with-custom-port/webpack.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line node/no-unpublished-require const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin'); module.exports = { diff --git a/test/stats/cli-flags/stats.test.js b/test/stats/cli-flags/stats.test.js index 7500411a79a..e8baa9b0f20 100644 --- a/test/stats/cli-flags/stats.test.js +++ b/test/stats/cli-flags/stats.test.js @@ -1,4 +1,3 @@ -/* eslint-disable node/no-extraneous-require */ /* eslint-disable node/no-unpublished-require */ 'use strict';