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 +4 -4
- data/lib/pronto/jshint.rb +9 -5
- data/lib/pronto/jshint/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeaeb689da23d892798d8a78125048f8465d97d1
|
4
|
+
data.tar.gz: b467795c3a0993859dad73f7493c9af4ff850db0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
11
|
-
|
12
|
-
|
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 =
|
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
|
-
|
24
|
+
.map { |line| new_message(offence, line) }
|
21
25
|
end
|
22
26
|
end
|
23
27
|
|
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.
|
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-
|
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.
|
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:
|