code: def jshint():
      
      with fab_settings(warn_only=True):
          needs_to_abort = False
          # because jshint fails with exit code 2, we need to allow this as
          # a successful exit code in our env
          if 2 not in env.ok_ret_codes:
              env.ok_ret_codes.append(2)
          output = local(
              'find -name "{}" -print'.format('*.js'),
              capture=True,
          )
          files = output.split()
          jshint_installed = local('command -v jshint', capture=True)
          if not jshint_installed.succeeded:
              warn(red(
                  "To enable an extended check of your js files, please"
                  " install jshint by entering:\n\n    npm install -g jshint"
              ))
          else:
              for file in files:
                  if hasattr(settings, 'JSHINT_CHECK_EXCLUDES'):
                      excludes = settings.JSHINT_CHECK_EXCLUDES
                  else:
                      excludes = settings.SYNTAX_CHECK_EXCLUDES
                  if any(s in file for s in excludes):
                      continue
                  jshint_result = local(
                      'jshint {0}'.format(file),
                      capture=True
                  )
                  if jshint_result:
                      warn(red('JS errors detected in file {0}'.format(
                          file
                      )))
                      puts(jshint_result)
                      needs_to_abort = True
          if needs_to_abort:
              abort(red('There have been errors. Please fix them and run'
                        ' the check again.'))
          else:
              puts(green('jshint found no errors. Very good!'))
docs: Runs jshint checks.