Skip to content

Instantly share code, notes, and snippets.

@danfarino
Created June 24, 2019 19:06
Show Gist options
  • Select an option

  • Save danfarino/7dcde6ca3bec51c0f67ad4c3cce19c0e to your computer and use it in GitHub Desktop.

Select an option

Save danfarino/7dcde6ca3bec51c0f67ad4c3cce19c0e to your computer and use it in GitHub Desktop.
Hacking webpack.config
# This file is a hack that enables .eslintrc in a create-react-app in dev mode on Windows 10.
# Written and tested against react-scripts@2.0.5
#
# Make sure you replace the default "start" script in package.json with:
# "start": "PowerShell.exe \"%CD%\\enable-eslintrc.ps1\" && react-scripts start",
$file = "node_modules\react-scripts\config\webpack.config.dev.js"
(Get-Content $file) -replace "useEslintrc: false", "useEslintrc: true" | Set-Content $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment