From fb94b0e6df4da3026b9fb4714ee7ceab6bbfa9bc Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Mon, 25 Jul 2016 14:36:23 +0200 Subject: Respect `.eslintignore` If an `.eslintignore` is present, it's patterns are now respected. See http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories for more info. Due to the file format of `.eslintignore`, the gem `globby` has to be used for those patterns (which respects negations etc.). --- spec/pronto/eslint_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/pronto/eslint_spec.rb') diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb index 7af0aa2..1117e15 100644 --- a/spec/pronto/eslint_spec.rb +++ b/spec/pronto/eslint_spec.rb @@ -25,6 +25,15 @@ module Pronto its(:count) { should == 9 } its(:'first.msg') { should == "Expected { after 'if' condition." } end + + context 'repo with ignored and not ignored file, each with five warnings' do + include_context 'eslintignore repo' + + let(:patches) { repo.diff('master') } + + its(:count) { should == 5 } + its(:'first.msg') { should == "Use the function form of 'use strict'." } + end end end end -- cgit v1.2.3