webpack: remove superfluous linting step (#775)

Summary:
We lint separately, with `yarn lint`. There’s no need to duplicate this
effort.

Test Plan:
Introduce a lint error, for instance by adding `("unused expression");`
to `src/cli/main.js` and `src/app/App.js`. Note that `yarn lint` fails
but `yarn backend` and `yarn start` and `yarn build` succeed.

wchargin-branch: webpack-no-lint
This commit is contained in:
William Chargin 2018-09-05 11:25:59 -07:00 committed by GitHub
parent 8c0bbbc732
commit 3d0f295ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 35 deletions

View File

@ -1,7 +1,6 @@
// @no-flow // @no-flow
const webpack = require("webpack"); const webpack = require("webpack");
const eslintFormatter = require("react-dev-utils/eslintFormatter");
const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin"); const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin");
const RemoveBuildDirectoryPlugin = require("./RemoveBuildDirectoryPlugin"); const RemoveBuildDirectoryPlugin = require("./RemoveBuildDirectoryPlugin");
const paths = require("./paths"); const paths = require("./paths");
@ -42,22 +41,6 @@ module.exports = (outputPath) => ({
module: { module: {
strictExportPresence: true, strictExportPresence: true,
rules: [ rules: [
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: "pre",
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve("eslint"),
},
loader: require.resolve("eslint-loader"),
},
],
include: paths.appSrc,
},
{ {
// "oneOf" will traverse all following loaders until one will // "oneOf" will traverse all following loaders until one will
// match the requirements. If no loader matches, it will fail. // match the requirements. If no loader matches, it will fail.

View File

@ -13,7 +13,6 @@ const RemoveBuildDirectoryPlugin = require("./RemoveBuildDirectoryPlugin");
const CopyPlugin = require("copy-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin");
const ManifestPlugin = require("webpack-manifest-plugin"); const ManifestPlugin = require("webpack-manifest-plugin");
const StaticSiteGeneratorPlugin = require("static-site-generator-webpack-plugin"); const StaticSiteGeneratorPlugin = require("static-site-generator-webpack-plugin");
const eslintFormatter = require("react-dev-utils/eslintFormatter");
const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin"); const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin");
const paths = require("./paths"); const paths = require("./paths");
const getClientEnvironment = require("./env"); const getClientEnvironment = require("./env");
@ -123,23 +122,6 @@ function makeConfig(mode /*: "production" | "development" */) {
// TODO: Disable require.ensure as it's not a standard language feature. // TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176. // We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } }, // { parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: "pre",
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve("eslint"),
},
loader: require.resolve("eslint-loader"),
},
],
include: paths.appSrc,
},
{ {
// "oneOf" will traverse all following loaders until one will // "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall // match the requirements. When no loader matches it will fall