jslint 1.1.2 → 1.1.3
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.
- data/VERSION +1 -1
- data/jslint.gemspec +11 -11
- data/jslint/node.coffee +10 -10
- data/jslint/node.js +10 -10
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/jslint.gemspec
CHANGED
@@ -4,15 +4,15 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.1.
|
7
|
+
s.name = "jslint"
|
8
|
+
s.version = "1.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
15
|
-
s.executables = [
|
11
|
+
s.authors = ["Geraud Boyer"]
|
12
|
+
s.date = "2011-12-23"
|
13
|
+
s.description = "This gem provides an easy way to use jslint with your programs. It comes with rhino and it will use nodes.js if it is present."
|
14
|
+
s.email = "geraud@gmail.com"
|
15
|
+
s.executables = ["jslint"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.md"
|
@@ -43,10 +43,10 @@ Gem::Specification.new do |s|
|
|
43
43
|
"spec/spec.opts",
|
44
44
|
"spec/spec_helper.rb"
|
45
45
|
]
|
46
|
-
s.homepage =
|
47
|
-
s.require_paths = [
|
48
|
-
s.rubygems_version =
|
49
|
-
s.summary =
|
46
|
+
s.homepage = "http://github.com/geraud/jslint"
|
47
|
+
s.require_paths = ["lib"]
|
48
|
+
s.rubygems_version = "1.8.11"
|
49
|
+
s.summary = "Wrapping of jslint"
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
52
52
|
s.specification_version = 3
|
data/jslint/node.coffee
CHANGED
@@ -8,16 +8,16 @@
|
|
8
8
|
###
|
9
9
|
###jslint rhino: false, node: true, strict: false
|
10
10
|
###
|
11
|
-
###global require,
|
11
|
+
###global require,util,__filename,process
|
12
12
|
###
|
13
13
|
|
14
14
|
((args) ->
|
15
|
-
|
15
|
+
util = require 'util'
|
16
16
|
fs = require 'fs'
|
17
17
|
path = require 'path'
|
18
18
|
|
19
19
|
print_syntax = () ->
|
20
|
-
|
20
|
+
util.puts 'Usage: jslint.js [options] file.js'
|
21
21
|
process.exit 1
|
22
22
|
|
23
23
|
print_syntax() if args.length is 0
|
@@ -45,10 +45,10 @@
|
|
45
45
|
input_filename = arg
|
46
46
|
input = fs.readFileSync input_filename
|
47
47
|
if not input
|
48
|
-
|
48
|
+
util.puts "jslint: Couldn't open file '#{input_filename}'."
|
49
49
|
process.exit 1
|
50
50
|
else
|
51
|
-
#
|
51
|
+
# util.debug('opening input');
|
52
52
|
input = input.toString 'UTF8'
|
53
53
|
return
|
54
54
|
|
@@ -57,13 +57,13 @@
|
|
57
57
|
if not JSLINT input, options
|
58
58
|
JSLINT.errors.forEach (error) ->
|
59
59
|
if error
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
util.puts "Lint at line #{error.line} character #{error.character}: #{error.reason}"
|
61
|
+
util.puts (error.evidence or '').replace /^\s*(\S*(\s+\S+)*)\s*$/, "$1"
|
62
|
+
util.puts ''
|
63
63
|
process.exit 2
|
64
64
|
else
|
65
|
-
|
65
|
+
util.puts "jslint: No problems found in #{input_filename}"
|
66
66
|
process.exit 0
|
67
67
|
|
68
68
|
return
|
69
|
-
) process.
|
69
|
+
) process.argv.slice 2
|
data/jslint/node.js
CHANGED
@@ -8,14 +8,14 @@
|
|
8
8
|
*/
|
9
9
|
/*jslint rhino: false, node: true, strict: false
|
10
10
|
*/
|
11
|
-
/*global require,
|
11
|
+
/*global require,util,__filename,process
|
12
12
|
*/(function(args) {
|
13
|
-
var JSLINT, filename, fs, input, input_filename, options, path, print_syntax,
|
14
|
-
|
13
|
+
var JSLINT, filename, fs, input, input_filename, options, path, print_syntax, util;
|
14
|
+
util = require('util');
|
15
15
|
fs = require('fs');
|
16
16
|
path = require('path');
|
17
17
|
print_syntax = function() {
|
18
|
-
|
18
|
+
util.puts('Usage: jslint.js [options] file.js');
|
19
19
|
return process.exit(1);
|
20
20
|
};
|
21
21
|
if (args.length === 0) {
|
@@ -51,7 +51,7 @@
|
|
51
51
|
input_filename = arg;
|
52
52
|
input = fs.readFileSync(input_filename);
|
53
53
|
if (!input) {
|
54
|
-
|
54
|
+
util.puts("jslint: Couldn't open file '" + input_filename + "'.");
|
55
55
|
process.exit(1);
|
56
56
|
} else {
|
57
57
|
input = input.toString('UTF8');
|
@@ -64,14 +64,14 @@
|
|
64
64
|
if (!JSLINT(input, options)) {
|
65
65
|
JSLINT.errors.forEach(function(error) {
|
66
66
|
if (error) {
|
67
|
-
|
68
|
-
|
69
|
-
return
|
67
|
+
util.puts("Lint at line " + error.line + " character " + error.character + ": " + error.reason);
|
68
|
+
util.puts((error.evidence || '').replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
|
69
|
+
return util.puts('');
|
70
70
|
}
|
71
71
|
});
|
72
72
|
process.exit(2);
|
73
73
|
} else {
|
74
|
-
|
74
|
+
util.puts("jslint: No problems found in " + input_filename);
|
75
75
|
process.exit(0);
|
76
76
|
}
|
77
|
-
})(process.
|
77
|
+
})(process.argv.slice(2));
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jslint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-23 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &70244897080280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70244897080280
|
25
25
|
description: This gem provides an easy way to use jslint with your programs. It comes
|
26
26
|
with rhino and it will use nodes.js if it is present.
|
27
27
|
email: geraud@gmail.com
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project:
|
79
|
-
rubygems_version: 1.8.
|
79
|
+
rubygems_version: 1.8.11
|
80
80
|
signing_key:
|
81
81
|
specification_version: 3
|
82
82
|
summary: Wrapping of jslint
|