jshint 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +1 -0
- data/jshint.gemspec +2 -2
- data/lib/jshint/configuration.rb +1 -1
- data/lib/jshint/reporters.rb +1 -0
- data/lib/jshint/reporters/junit.rb +286 -0
- data/lib/jshint/tasks/jshint.rake +21 -4
- data/lib/jshint/version.rb +1 -1
- metadata +30 -53
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8acd5bd2914337701ba05bb61443fe4953886259
|
4
|
+
data.tar.gz: 00377c800679e1a108beb2e2dd82c7e6a379bc79
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 89a1f013c7cc7258b0f3ab95daa2a34eaf41eb574c2a76358bc262e042a025d4731837fc1812e2fb3a75f2f7379bacbc8e0b9b793d3b5452f47805960093ac04
|
7
|
+
data.tar.gz: e9bd66f7e2c0a55eddf887374bab8167576bc6a7774f5195d3abf31f0fe318b73de9db32861d23e8d2800be31ce5486260999d818d4c8dbeb6981acd94b9da9f
|
data/README.md
CHANGED
data/jshint.gemspec
CHANGED
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "therubyracer", "~> 0.12.1"
|
22
22
|
spec.add_dependency "execjs", "~> 1.4.0"
|
23
|
-
spec.add_dependency "railties", ">= 3.2.0"
|
24
23
|
spec.add_dependency 'multi_json', '~> 1.0'
|
25
24
|
|
26
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
|
+
spec.add_development_dependency "railties", ">= 3.2.0"
|
27
27
|
spec.add_development_dependency "rake"
|
28
|
-
spec.add_development_dependency "rspec"
|
28
|
+
spec.add_development_dependency "rspec", "~> 2.14"
|
29
29
|
spec.add_development_dependency "yard"
|
30
30
|
end
|
data/lib/jshint/configuration.rb
CHANGED
data/lib/jshint/reporters.rb
CHANGED
@@ -0,0 +1,286 @@
|
|
1
|
+
require 'rexml/text'
|
2
|
+
|
3
|
+
module Jshint::Reporters
|
4
|
+
# Outputs a lint report in JUnit XML formt
|
5
|
+
class Junit
|
6
|
+
# @return [String] the report output
|
7
|
+
attr_reader :output
|
8
|
+
|
9
|
+
# Sets up the output string for the final report
|
10
|
+
#
|
11
|
+
# @param results [Hash] Key value pairs containing the filename and associated errors
|
12
|
+
def initialize(results = {})
|
13
|
+
@results = results
|
14
|
+
@output = ''
|
15
|
+
end
|
16
|
+
|
17
|
+
# Loops through all the errors and generates the report
|
18
|
+
#
|
19
|
+
# @example
|
20
|
+
# foo/bar/baz.js: line 4, col 46, Bad operand.
|
21
|
+
# foo/bar/baz.js: line 39, col 7, Missing semicolon.
|
22
|
+
#
|
23
|
+
# 2 errors
|
24
|
+
#
|
25
|
+
# @return [String] The default report
|
26
|
+
def report
|
27
|
+
@output = <<-TEMPLATE
|
28
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
29
|
+
<testsuites>
|
30
|
+
<testsuite name="#{File.basename(Dir.pwd)}" timestamp="#{DateTime.now}">
|
31
|
+
TEMPLATE
|
32
|
+
|
33
|
+
# Group according to the errors.
|
34
|
+
error_groups = {}
|
35
|
+
@results.each do |file, errors|
|
36
|
+
errors.each do |error|
|
37
|
+
next unless error && error['code']
|
38
|
+
|
39
|
+
error_groups[error['code']] ||= []
|
40
|
+
error_groups[error['code']] << {
|
41
|
+
file: file,
|
42
|
+
line: error['line'],
|
43
|
+
character: error['character'],
|
44
|
+
message: error['reason']
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Combine all the errors and the tests for which we have messages. Combine both together.
|
50
|
+
all_codes = error_groups.keys + TESTS.keys
|
51
|
+
|
52
|
+
all_codes.each do |code|
|
53
|
+
print_errors_for_code(code, error_groups.fetch(code, []))
|
54
|
+
end
|
55
|
+
|
56
|
+
@output <<= <<-TEMPLATE
|
57
|
+
</testsuite>
|
58
|
+
</testsuites>
|
59
|
+
TEMPLATE
|
60
|
+
|
61
|
+
output
|
62
|
+
end
|
63
|
+
|
64
|
+
# Appends new error elements to the Report output
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
# <testcase classname="JUnitXmlReporter.constructor" name="should default path to an empty string" time="0.006">
|
68
|
+
# <failure message="test failure">Assertion failed</failure>
|
69
|
+
# </testcase>
|
70
|
+
#
|
71
|
+
# @param code [String] The error code
|
72
|
+
# @param errors [Array] The errors for the code
|
73
|
+
# @return [void]
|
74
|
+
def print_errors_for_code(code, errors)
|
75
|
+
name = fetch_error_messages(code, errors)
|
76
|
+
output << " <testcase classname=\"jshint.#{code}\" name=\"#{escape(name)}\">\n"
|
77
|
+
errors.each do |error|
|
78
|
+
output << add_error_message(code, error)
|
79
|
+
end
|
80
|
+
output << " </testcase>\n"
|
81
|
+
output
|
82
|
+
end
|
83
|
+
|
84
|
+
# Escapes the text given for XML.
|
85
|
+
#
|
86
|
+
# @param text [String] The text to escape
|
87
|
+
# @return [String]
|
88
|
+
def escape(text)
|
89
|
+
REXML::Text.new(text, false, nil, false).to_s
|
90
|
+
end
|
91
|
+
|
92
|
+
private
|
93
|
+
|
94
|
+
def fetch_error_messages(code, errors)
|
95
|
+
return '' if errors.empty?
|
96
|
+
TESTS.fetch(code, errors.first[:message])
|
97
|
+
end
|
98
|
+
|
99
|
+
def add_error_message(code, error)
|
100
|
+
output << " <failure type=\"#{code}\" message=\"#{escape(error[:message])}\">"
|
101
|
+
output << "%s, line %s, col %s\n" % [
|
102
|
+
escape(error[:file]),
|
103
|
+
error[:line].to_s,
|
104
|
+
error[:character].to_s
|
105
|
+
]
|
106
|
+
output << "\n</failure>\n"
|
107
|
+
end
|
108
|
+
|
109
|
+
TESTS = {
|
110
|
+
E001: "Bad option: '{a}'.",
|
111
|
+
E002: "Bad option value.",
|
112
|
+
E003: "Expected a JSON value.",
|
113
|
+
E004: "Input is neither a string nor an array of strings.",
|
114
|
+
E005: "Input is empty.",
|
115
|
+
E006: "Unexpected early end of program.",
|
116
|
+
E007: "Missing \"use strict\" statement.",
|
117
|
+
E008: "Strict violation.",
|
118
|
+
E009: "Option 'validthis' can't be used in a global scope.",
|
119
|
+
E010: "'with' is not allowed in strict mode.",
|
120
|
+
E011: "const '{a}' has already been declared.",
|
121
|
+
E012: "const '{a}' is initialized to 'undefined'.",
|
122
|
+
E013: "Attempting to override '{a}' which is a constant.",
|
123
|
+
E014: "A regular expression literal can be confused with '/='.",
|
124
|
+
E015: "Unclosed regular expression.",
|
125
|
+
E016: "Invalid regular expression.",
|
126
|
+
E017: "Unclosed comment.",
|
127
|
+
E018: "Unbegun comment.",
|
128
|
+
E019: "Unmatched '{a}'.",
|
129
|
+
E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
|
130
|
+
E021: "Expected '{a}' and instead saw '{b}'.",
|
131
|
+
E022: "Line breaking error '{a}'.",
|
132
|
+
E023: "Missing '{a}'.",
|
133
|
+
E024: "Unexpected '{a}'.",
|
134
|
+
E025: "Missing ':' on a case clause.",
|
135
|
+
E026: "Missing '}' to match '{' from line {a}.",
|
136
|
+
E027: "Missing ']' to match '[' form line {a}.",
|
137
|
+
E028: "Illegal comma.",
|
138
|
+
E029: "Unclosed string.",
|
139
|
+
E030: "Expected an identifier and instead saw '{a}'.",
|
140
|
+
E031: "Bad assignment.",
|
141
|
+
E032: "Expected a small integer or 'false' and instead saw '{a}'.",
|
142
|
+
E033: "Expected an operator and instead saw '{a}'.",
|
143
|
+
E034: "get/set are ES5 features.",
|
144
|
+
E035: "Missing property name.",
|
145
|
+
E036: "Expected to see a statement and instead saw a block.",
|
146
|
+
E037: "Constant {a} was not declared correctly.",
|
147
|
+
E038: "Variable {a} was not declared correctly.",
|
148
|
+
E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
|
149
|
+
E040: "Each value should have its own case label.",
|
150
|
+
E041: "Unrecoverable syntax error.",
|
151
|
+
E042: "Stopping.",
|
152
|
+
E043: "Too many errors.",
|
153
|
+
E044: "'{a}' is already defined and can't be redefined.",
|
154
|
+
E045: "Invalid for each loop.",
|
155
|
+
E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
|
156
|
+
E047: "A generator function shall contain a yield statement.",
|
157
|
+
E048: "Let declaration not directly within block.",
|
158
|
+
E049: "A {a} cannot be named '{b}'.",
|
159
|
+
W001: "'hasOwnProperty' is a really bad name.",
|
160
|
+
W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
|
161
|
+
W003: "'{a}' was used before it was defined.",
|
162
|
+
W004: "'{a}' is already defined.",
|
163
|
+
W005: "A dot following a number can be confused with a decimal point.",
|
164
|
+
W006: "Confusing minuses.",
|
165
|
+
W007: "Confusing pluses.",
|
166
|
+
W008: "A leading decimal point can be confused with a dot: '{a}'.",
|
167
|
+
W009: "The array literal notation [] is preferrable.",
|
168
|
+
W010: "The object literal notation {} is preferrable.",
|
169
|
+
W011: "Unexpected space after '{a}'.",
|
170
|
+
W012: "Unexpected space before '{a}'.",
|
171
|
+
W013: "Missing space after '{a}'.",
|
172
|
+
W014: "Bad line breaking before '{a}'.",
|
173
|
+
W015: "Expected '{a}' to have an indentation at {b} instead at {c}.",
|
174
|
+
W016: "Unexpected use of '{a}'.",
|
175
|
+
W017: "Bad operand.",
|
176
|
+
W018: "Confusing use of '{a}'.",
|
177
|
+
W019: "Use the isNaN function to compare with NaN.",
|
178
|
+
W020: "Read only.",
|
179
|
+
W021: "'{a}' is a function.",
|
180
|
+
W022: "Do not assign to the exception parameter.",
|
181
|
+
W023: "Expected an identifier in an assignment and instead saw a function invocation.",
|
182
|
+
W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
|
183
|
+
W025: "Missing name in function declaration.",
|
184
|
+
W026: "Inner functions should be listed at the top of the outer function.",
|
185
|
+
W027: "Unreachable '{a}' after '{b}'.",
|
186
|
+
W028: "Label '{a}' on {b} statement.",
|
187
|
+
W030: "Expected an assignment or function call and instead saw an expression.",
|
188
|
+
W031: "Do not use 'new' for side effects.",
|
189
|
+
W032: "Unnecessary semicolon.",
|
190
|
+
W033: "Missing semicolon.",
|
191
|
+
W034: "Unnecessary directive \"{a}\".",
|
192
|
+
W035: "Empty block.",
|
193
|
+
W036: "Unexpected /*member '{a}'.",
|
194
|
+
W037: "'{a}' is a statement label.",
|
195
|
+
W038: "'{a}' used out of scope.",
|
196
|
+
W039: "'{a}' is not allowed.",
|
197
|
+
W040: "Possible strict violation.",
|
198
|
+
W041: "Use '{a}' to compare with '{b}'.",
|
199
|
+
W042: "Avoid EOL escaping.",
|
200
|
+
W043: "Bad escaping of EOL. Use option multistr if needed.",
|
201
|
+
W044: "Bad or unnecessary escaping.",
|
202
|
+
W045: "Bad number '{a}'.",
|
203
|
+
W046: "Don't use extra leading zeros '{a}'.",
|
204
|
+
W047: "A trailing decimal point can be confused with a dot: '{a}'.",
|
205
|
+
W048: "Unexpected control character in regular expression.",
|
206
|
+
W049: "Unexpected escaped character '{a}' in regular expression.",
|
207
|
+
W050: "JavaScript URL.",
|
208
|
+
W051: "Variables should not be deleted.",
|
209
|
+
W052: "Unexpected '{a}'.",
|
210
|
+
W053: "Do not use {a} as a constructor.",
|
211
|
+
W054: "The Function constructor is a form of eval.",
|
212
|
+
W055: "A constructor name should start with an uppercase letter.",
|
213
|
+
W056: "Bad constructor.",
|
214
|
+
W057: "Weird construction. Is 'new' unnecessary?",
|
215
|
+
W058: "Missing '()' invoking a constructor.",
|
216
|
+
W059: "Avoid arguments.{a}.",
|
217
|
+
W060: "document.write can be a form of eval.",
|
218
|
+
W061: "eval can be harmful.",
|
219
|
+
W062: "Wrap an immediate function invocation in parens " +
|
220
|
+
"to assist the reader in understanding that the expression " +
|
221
|
+
"is the result of a function, and not the function itself.",
|
222
|
+
W063: "Math is not a function.",
|
223
|
+
W064: "Missing 'new' prefix when invoking a constructor.",
|
224
|
+
W065: "Missing radix parameter.",
|
225
|
+
W066: "Implied eval. Consider passing a function instead of a string.",
|
226
|
+
W067: "Bad invocation.",
|
227
|
+
W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
|
228
|
+
W069: "['{a}'] is better written in dot notation.",
|
229
|
+
W070: "Extra comma. (it breaks older versions of IE)",
|
230
|
+
W071: "This function has too many statements. ({a})",
|
231
|
+
W072: "This function has too many parameters. ({a})",
|
232
|
+
W073: "Blocks are nested too deeply. ({a})",
|
233
|
+
W074: "This function's cyclomatic complexity is too high. ({a})",
|
234
|
+
W075: "Duplicate key '{a}'.",
|
235
|
+
W076: "Unexpected parameter '{a}' in get {b} function.",
|
236
|
+
W077: "Expected a single parameter in set {a} function.",
|
237
|
+
W078: "Setter is defined without getter.",
|
238
|
+
W079: "Redefinition of '{a}'.",
|
239
|
+
W080: "It's not necessary to initialize '{a}' to 'undefined'.",
|
240
|
+
W081: "Too many var statements.",
|
241
|
+
W082: "Function declarations should not be placed in blocks. " +
|
242
|
+
"Use a function expression or move the statement to the top of " +
|
243
|
+
"the outer function.",
|
244
|
+
W083: "Don't make functions within a loop.",
|
245
|
+
W084: "Expected a conditional expression and instead saw an assignment.",
|
246
|
+
W085: "Don't use 'with'.",
|
247
|
+
W086: "Expected a 'break' statement before '{a}'.",
|
248
|
+
W087: "Forgotten 'debugger' statement?",
|
249
|
+
W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
|
250
|
+
W089: "The body of a for in should be wrapped in an if statement to filter " +
|
251
|
+
"unwanted properties from the prototype.",
|
252
|
+
W090: "'{a}' is not a statement label.",
|
253
|
+
W091: "'{a}' is out of scope.",
|
254
|
+
W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.",
|
255
|
+
W093: "Did you mean to return a conditional instead of an assignment?",
|
256
|
+
W094: "Unexpected comma.",
|
257
|
+
W095: "Expected a string and instead saw {a}.",
|
258
|
+
W096: "The '{a}' key may produce unexpected results.",
|
259
|
+
W097: "Use the function form of \"use strict\".",
|
260
|
+
W098: "'{a}' is defined but never used.",
|
261
|
+
W099: "Mixed spaces and tabs.",
|
262
|
+
W100: "This character may get silently deleted by one or more browsers.",
|
263
|
+
W101: "Line is too long.",
|
264
|
+
W102: "Trailing whitespace.",
|
265
|
+
W103: "The '{a}' property is deprecated.",
|
266
|
+
W104: "'{a}' is only available in JavaScript 1.7.",
|
267
|
+
W105: "Unexpected {a} in '{b}'.",
|
268
|
+
W106: "Identifier '{a}' is not in camel case.",
|
269
|
+
W107: "Script URL.",
|
270
|
+
W108: "Strings must use doublequote.",
|
271
|
+
W109: "Strings must use singlequote.",
|
272
|
+
W110: "Mixed double and single quotes.",
|
273
|
+
W112: "Unclosed string.",
|
274
|
+
W113: "Control character in string: {a}.",
|
275
|
+
W114: "Avoid {a}.",
|
276
|
+
W115: "Octal literals are not allowed in strict mode.",
|
277
|
+
W116: "Expected '{a}' and instead saw '{b}'.",
|
278
|
+
W117: "'{a}' is not defined.",
|
279
|
+
W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
|
280
|
+
W119: "'{a}' is only available in ES6 (use esnext option).",
|
281
|
+
I001: "Comma warnings can be turned off with 'laxcomma'.",
|
282
|
+
I002: "Reserved words as properties can be used under the 'es5' option.",
|
283
|
+
I003: "ES5 option is now set per default"
|
284
|
+
}.freeze
|
285
|
+
end
|
286
|
+
end
|
@@ -2,12 +2,29 @@ require 'jshint'
|
|
2
2
|
require 'jshint/reporters'
|
3
3
|
|
4
4
|
namespace :jshint do
|
5
|
-
desc "Runs JSHint, the JavaScript lint tool over this
|
6
|
-
task :lint => :environment do
|
5
|
+
desc "Runs JSHint, the JavaScript lint tool over this project's JavaScript assets"
|
6
|
+
task :lint => :environment do |_, args|
|
7
|
+
# Our own argument parsing, since rake jshint will push extra nil's.
|
8
|
+
reporter_name = :Default
|
9
|
+
file = nil
|
10
|
+
reporter_name = args.extras[0] if args.extras.length >= 1
|
11
|
+
file = args.extras[1] if args.extras.length >= 2
|
12
|
+
|
7
13
|
linter = Jshint::Lint.new
|
8
14
|
linter.lint
|
9
|
-
reporter = Jshint::Reporters
|
10
|
-
|
15
|
+
reporter = Jshint::Reporters.const_get(reporter_name).new(linter.errors)
|
16
|
+
|
17
|
+
printer = lambda do |stream|
|
18
|
+
stream.puts reporter.report
|
19
|
+
end
|
20
|
+
if file
|
21
|
+
Dir.mkdir(File.dirname(file))
|
22
|
+
File.open(file, 'w') do |stream|
|
23
|
+
printer.call(stream)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
printer.call($stdout)
|
27
|
+
end
|
11
28
|
end
|
12
29
|
|
13
30
|
desc "Copies the default JSHint options to your Rails application"
|
data/lib/jshint/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jshint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Damian Nicholson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: therubyracer
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: execjs
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,31 +34,13 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 1.4.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: railties
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 3.2.0
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 3.2.0
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: multi_json
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
45
|
- - ~>
|
68
46
|
- !ruby/object:Gem::Version
|
@@ -70,7 +48,6 @@ dependencies:
|
|
70
48
|
type: :runtime
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
52
|
- - ~>
|
76
53
|
- !ruby/object:Gem::Version
|
@@ -78,7 +55,6 @@ dependencies:
|
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: bundler
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
59
|
- - ~>
|
84
60
|
- !ruby/object:Gem::Version
|
@@ -86,57 +62,64 @@ dependencies:
|
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
66
|
- - ~>
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: railties
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.2.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.2.0
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rake
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rspec
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
103
|
+
version: '2.14'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ~>
|
124
109
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
110
|
+
version: '2.14'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: yard
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - '>='
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - '>='
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
description: It achieves this by linting your code through a library called JSHint
|
@@ -162,6 +145,7 @@ files:
|
|
162
145
|
- lib/jshint/railtie.rb
|
163
146
|
- lib/jshint/reporters.rb
|
164
147
|
- lib/jshint/reporters/default.rb
|
148
|
+
- lib/jshint/reporters/junit.rb
|
165
149
|
- lib/jshint/tasks/jshint.rake
|
166
150
|
- lib/jshint/version.rb
|
167
151
|
- spec/fixtures/jshint.yml
|
@@ -174,33 +158,26 @@ files:
|
|
174
158
|
homepage: http://damiannicholson.com
|
175
159
|
licenses:
|
176
160
|
- MIT
|
161
|
+
metadata: {}
|
177
162
|
post_install_message:
|
178
163
|
rdoc_options: []
|
179
164
|
require_paths:
|
180
165
|
- lib
|
181
166
|
required_ruby_version: !ruby/object:Gem::Requirement
|
182
|
-
none: false
|
183
167
|
requirements:
|
184
|
-
- -
|
168
|
+
- - '>='
|
185
169
|
- !ruby/object:Gem::Version
|
186
170
|
version: '0'
|
187
|
-
segments:
|
188
|
-
- 0
|
189
|
-
hash: 463206555677395138
|
190
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
-
none: false
|
192
172
|
requirements:
|
193
|
-
- -
|
173
|
+
- - '>='
|
194
174
|
- !ruby/object:Gem::Version
|
195
175
|
version: '0'
|
196
|
-
segments:
|
197
|
-
- 0
|
198
|
-
hash: 463206555677395138
|
199
176
|
requirements: []
|
200
177
|
rubyforge_project:
|
201
|
-
rubygems_version:
|
178
|
+
rubygems_version: 2.0.2
|
202
179
|
signing_key:
|
203
|
-
specification_version:
|
180
|
+
specification_version: 4
|
204
181
|
summary: Ensures your JavaScript code adheres to best practices
|
205
182
|
test_files:
|
206
183
|
- spec/fixtures/jshint.yml
|