lib/eslint/plugin.rb
def lint_results
      bin = eslint_path
      raise 'eslint is not installed' unless bin
      return run_lint(bin, '.') unless filtering
      ((git.modified_files - git.deleted_files - git.renamed_files.map { |r| r[:before] }) + git.added_files + git.renamed_files.map { |r| r[:after] })
        .select { |f| target_extensions.include?(File.extname(f)) }
        .map { |f| f.gsub("#{Dir.pwd}/", '') }
        .map { |f| run_lint(bin, f).first }
    end
# Get lint result regards the filtering option
#
# return [Hash]
Get lint result regards the filtering option
return [Hash]
Get lint result regards the filtering option return [ Hash ]
def lint_results
      bin = eslint_path
      raise 'eslint is not installed' unless bin
      return run_lint(bin, '.') unless filtering
      ((git.modified_files - git.deleted_files - git.renamed_files.map { |r| r[:before] }) + git.added_files + git.renamed_files.map { |r| r[:after] })
        .select { |f| target_extensions.include?(File.extname(f)) }
        .map { |f| f.gsub("#{Dir.pwd}/", '') }
        .map { |f| run_lint(bin, f).first }
    end
def lint_results bin = eslint_path raise 'eslint is not installed' unless bin return run_lint ( bin , '.' ) unless filtering ( ( git . modified_files - git . deleted_files - git . renamed_files . map { | r | r [ :before ] } ) + git . added_files + git . renamed_files . map { | r | r [ :after ] } ) . select { | f | target_extensions . include? ( File . extname ( f ) ) } . map { | f | f . gsub ( "#{Dir.pwd}/" , '' ) } . map { | f | run_lint ( bin , f ) . first } end
Get lint result regards the filtering option
return [Hash]
Get lint result regards the filtering option return [ Hash ]