Skip to content

Commit

Permalink
Merge pull request #11 from postmechanical/master
Browse files Browse the repository at this point in the history
Add support for renamed files
  • Loading branch information
leonhartX authored Mar 24, 2021
2 parents 7651a0a + be2cb96 commit caf11c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/eslint/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ 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.added_files)
((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 }
Expand Down

0 comments on commit caf11c6

Please sign in to comment.