diff options
author | Markus Doits <markus.doits@stellenticket.de> | 2016-07-25 14:36:23 +0200 |
---|---|---|
committer | Markus Doits <markus.doits@stellenticket.de> | 2016-07-25 14:51:26 +0200 |
commit | fb94b0e6df4da3026b9fb4714ee7ceab6bbfa9bc (patch) | |
tree | 57d22b50d28eab271a8db6fe201a7f18bbe069f4 /spec/pronto/eslint_spec.rb | |
parent | 604e30d99fdbb7c822efe31d05a0238064220037 (diff) | |
download | pronto-hlint-fb94b0e6df4da3026b9fb4714ee7ceab6bbfa9bc.tar.gz pronto-hlint-fb94b0e6df4da3026b9fb4714ee7ceab6bbfa9bc.tar.zst pronto-hlint-fb94b0e6df4da3026b9fb4714ee7ceab6bbfa9bc.zip |
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.).
Diffstat (limited to 'spec/pronto/eslint_spec.rb')
-rw-r--r-- | spec/pronto/eslint_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
25 | its(:count) { should == 9 } | 25 | its(:count) { should == 9 } |
26 | its(:'first.msg') { should == "Expected { after 'if' condition." } | 26 | its(:'first.msg') { should == "Expected { after 'if' condition." } |
27 | end | 27 | end |
28 | |||
29 | context 'repo with ignored and not ignored file, each with five warnings' do | ||
30 | include_context 'eslintignore repo' | ||
31 | |||
32 | let(:patches) { repo.diff('master') } | ||
33 | |||
34 | its(:count) { should == 5 } | ||
35 | its(:'first.msg') { should == "Use the function form of 'use strict'." } | ||
36 | end | ||
28 | end | 37 | end |
29 | end | 38 | end |
30 | end | 39 | end |