lib/eslint/plugin.rb
def run_lint(bin, file)
      command = "#{bin} -f json"
      command << " -c #{config_file}" if config_file
      command << " --ignore-path #{ignore_file}" if ignore_file
      result = `#{command} #{file}`
      JSON.parse(result)
    end
# Run eslint aginst a single file.
#
# @param   [String] bin
#          The binary path of eslint
#
# @param   [String] file
#          File to be linted
#
# return [Hash]
Run eslint aginst a single file.
Run eslint aginst a single file .
def run_lint(bin, file)
      command = "#{bin} -f json"
      command << " -c #{config_file}" if config_file
      command << " --ignore-path #{ignore_file}" if ignore_file
      result = `#{command} #{file}`
      JSON.parse(result)
    end
def run_lint ( bin , file ) command = "#{bin} -f json" command << " -c #{config_file}" if config_file command << " --ignore-path #{ignore_file}" if ignore_file result = ` #{ command } #{ file } ` JSON . parse ( result ) end
Run eslint aginst a single file.
Run eslint aginst a single file .
bin
file
file File to be linted return [Hash]
file File to be linted return [ Hash ]