Autofix and Linting

If you haven’t tried the autofix options for jscs and rubocop, you’re seriously missing out!

  1. Be SURE you have a clean git status, as you’ll want to review what the autofix does to your code!
  2. Rubocop: Be sure to be in the right directory where you have Ruby files, probably the top level of your Rails project.
rubocop -a
  1. JSCS:: Be sure to be in the right directory where you have JS files.
jscs -x .

Autofixing is a HUGE timesaver!