From 1db677ed74e97ac35cadc58397a35b08ac9380d7 Mon Sep 17 00:00:00 2001 From: ev1stensberg Date: Mon, 14 May 2018 18:42:15 +0200 Subject: [PATCH] chore(linting): resolve linter errors --- cli.js => bin/cli.js | 8 ++++---- {utils => bin}/config-yargs.js | 0 {utils => bin}/convert-argv.js | 0 {utils => bin}/errorHelpers.js | 0 {utils => bin}/prepareOptions.js | 0 {utils => bin}/process-options.js | 0 {utils => bin}/prompt-command.js | 0 {utils => bin}/webpackConfigurationSchema.json | 0 package.json | 8 ++++---- 9 files changed, 8 insertions(+), 8 deletions(-) rename cli.js => bin/cli.js (98%) rename {utils => bin}/config-yargs.js (100%) rename {utils => bin}/convert-argv.js (100%) rename {utils => bin}/errorHelpers.js (100%) rename {utils => bin}/prepareOptions.js (100%) rename {utils => bin}/process-options.js (100%) rename {utils => bin}/prompt-command.js (100%) rename {utils => bin}/webpackConfigurationSchema.json (100%) diff --git a/cli.js b/bin/cli.js similarity index 98% rename from cli.js rename to bin/cli.js index bfaf192bbcb..9cd980cd511 100755 --- a/cli.js +++ b/bin/cli.js @@ -15,7 +15,7 @@ } require("v8-compile-cache"); - const ErrorHelpers = require("./utils/errorHelpers"); + const ErrorHelpers = require("./errorHelpers"); const NON_COMPILATION_ARGS = [ "init", @@ -47,7 +47,7 @@ } const yargs = require("yargs").usage(`webpack-cli ${ - require("./package.json").version + require("../package.json").version } Usage: webpack-cli [options] @@ -57,7 +57,7 @@ Usage: webpack-cli [options] For more information, see https://webpack.js.org/api/cli/.`); - require("./utils/config-yargs")(yargs); + require("./config-yargs")(yargs); const DISPLAY_GROUP = "Stats options:"; const BASIC_GROUP = "Basic options:"; @@ -237,7 +237,7 @@ For more information, see https://webpack.js.org/api/cli/.`); let options; try { - options = require("./utils/convert-argv")(argv); + options = require("./convert-argv")(argv); } catch (err) { if (err.name !== "ValidationError") { throw err; diff --git a/utils/config-yargs.js b/bin/config-yargs.js similarity index 100% rename from utils/config-yargs.js rename to bin/config-yargs.js diff --git a/utils/convert-argv.js b/bin/convert-argv.js similarity index 100% rename from utils/convert-argv.js rename to bin/convert-argv.js diff --git a/utils/errorHelpers.js b/bin/errorHelpers.js similarity index 100% rename from utils/errorHelpers.js rename to bin/errorHelpers.js diff --git a/utils/prepareOptions.js b/bin/prepareOptions.js similarity index 100% rename from utils/prepareOptions.js rename to bin/prepareOptions.js diff --git a/utils/process-options.js b/bin/process-options.js similarity index 100% rename from utils/process-options.js rename to bin/process-options.js diff --git a/utils/prompt-command.js b/bin/prompt-command.js similarity index 100% rename from utils/prompt-command.js rename to bin/prompt-command.js diff --git a/utils/webpackConfigurationSchema.json b/bin/webpackConfigurationSchema.json similarity index 100% rename from utils/webpackConfigurationSchema.json rename to bin/webpackConfigurationSchema.json diff --git a/package.json b/package.json index 1cd5f825b0c..2eea3ffa834 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "url": "https://github.com/webpack/webpack-cli.git" }, "bin": { - "webpack-cli": "./cli.js" + "webpack-cli": "./bin/cli.js" }, - "main": "./cli.js", + "main": "./bin/cli.js", "engines": { "node": ">=6.11.5" }, @@ -25,9 +25,9 @@ "packages/*" ], "scripts": { - "lint": "eslint ./utils/*.js ./cli.js ./packages/**/*.js ./test/**/*.js", + "lint": "eslint ./bin/*.js ./packages/**/*.js ./test/**/*.js", "format": "prettier-eslint ./utils/**/*.js ./cli.js ./test/**/*.js ./packages/**/*.js --write", - "lint:codeOnly": "eslint \"cli.js\" \"{utils}/**/!(__testfixtures__)/*.js\" \"{utils}/**.js\"", + "lint:codeOnly": "eslint \"{utils}/**/!(__testfixtures__)/*.js\" \"{utils}/**.js\"", "precommit": "lint-staged", "pretest": "npm run lint", "test": "lerna run test",