Sha256: 1391fa895fef86206ba27e07dfc305f5cd951060c2496319c22daea461d809be
Contents?: true
Size: 354 Bytes
Versions: 5
Compression:
Stored size: 354 Bytes
Contents
module PreCommit class ConsoleLogCheck def self.call(staged_files) staged_files.reject! { |f| File.extname(f) != ".js" } return if staged_files.empty? errors = `#{Utils.grep} -e "console\\.log" #{staged_files.join(" ")} | grep -v \/\/`.strip return unless $?.success? "console.log found:\n#{errors}" end end end
Version data entries
5 entries across 5 versions & 1 rubygems