pronto-jshint 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0252cbdff6c0c81c01e523609265c2c0b6f34260
4
- data.tar.gz: f60f66913a370e1a20f9ae04770ed306e4d8c31c
3
+ metadata.gz: aeaeb689da23d892798d8a78125048f8465d97d1
4
+ data.tar.gz: b467795c3a0993859dad73f7493c9af4ff850db0
5
5
  SHA512:
6
- metadata.gz: ed03384d8df4eb15591e787cac1f1bafa7c5b32dca9905c0313b49796d4ab7d43648d0fd5d15470575e377bb2cd2eb0df83077d635da1d8b38b090cfbb1fdfc4
7
- data.tar.gz: 67b5c17b4e57edf4312cc3215b3772a678ad99c14fe1fecb34fc0a53f17a051bff2cac88e514083696db34a8997efcd68b54deef942fad80fe80e9acbc1df54b
6
+ metadata.gz: 7510c58c8260755ddf0744bc89e7ff856e00f5ce3e2d62907cec376df52aba706efb2dcb27850e4edd5371ddd893ceb9fe6e5f1b253bdf3e90d84a6960f6d37f
7
+ data.tar.gz: 441880d35aa913707d9f73dd9af60d8847e873e777b3a0d5b10e49b0771898f4532f07a3da50c9df04c6d5e1c774b3a4bc022fec83fcf332bb8f0f7a2cb01125
data/lib/pronto/jshint.rb CHANGED
@@ -7,17 +7,21 @@ module Pronto
7
7
  return [] unless patches
8
8
 
9
9
  patches.select { |patch| patch.additions > 0 }
10
- .select { |patch| js_file?(patch.new_file_full_path) }
11
- .map { |patch| inspect(patch) }
12
- .flatten.compact
10
+ .select { |patch| js_file?(patch.new_file_full_path) }
11
+ .map { |patch| inspect(patch) }
12
+ .flatten.compact
13
13
  end
14
14
 
15
15
  def inspect(patch)
16
- offences = Jshintrb.lint(patch.new_file_full_path).compact
16
+ offences = if File.exist?('.jshintrc')
17
+ Jshintrb.lint(patch.new_file_full_path, :jshintrc)
18
+ else
19
+ Jshintrb.lint(patch.new_file_full_path)
20
+ end.compact
17
21
 
18
22
  offences.map do |offence|
19
23
  patch.added_lines.select { |line| line.new_lineno == offence['line'] }
20
- .map { |line| new_message(offence, line) }
24
+ .map { |line| new_message(offence, line) }
21
25
  end
22
26
  end
23
27
 
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module JSHintVersion
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-jshint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -110,9 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: 1.3.6
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.4.2
113
+ rubygems_version: 2.4.5
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Pronto runner for JSHint, JavaScript code quality tool
117
117
  test_files: []
118
- has_rdoc: