jslintrb 0.6.0 → 0.7.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.
@@ -1,3 +1,7 @@
1
+ === 0.7.0 / 2010-04-09
2
+
3
+ * add option to allow void
4
+
1
5
  === 0.6.0 / 2010-03-30
2
6
 
3
7
  * add Nick Galbreath's idea of mangling getter/setter syntax to get through the non-ES5 parser
@@ -27,14 +27,21 @@ example at http://github.com/smparkes/env-js/blob/envjsrb/.jslintrbrc.
27
27
 
28
28
  == Differences from upstream
29
29
 
30
- JSLint warns against using new to be evaluated soley for side-effects. jslintrb allows this if you set the "newside" option.
31
-
32
- Upstream doesn't support ECMAScript 5 getters and setters. Nick
33
- Galbreath (http://blog.client9.com/) had the idea of just using a
34
- regexp to mangle the common cases for the purposes of jslint until
35
- upstream suports them. You can do this now in jslintrb by setting the
36
- "gettersetter" option to true. Note that this option has to be turned
37
- on in a .jslintrbrc file; it can't be turned on with inline comments.
30
+ JSLint warns against using new to be evaluated soley for
31
+ side-effects. jslintrb allows this if you set the "newside" option.
32
+
33
+ JSLint forbids the use void(x). I find this the cleanest/most reliable
34
+ way of generating the undefined value, since the "undefined" variable
35
+ can be defined. The "void" option enables the use of void.
36
+
37
+ Upstream recently added support for ECMAScript 5 getters and setters
38
+ but this hasn't been integrated yet. (Not sure about the requirements
39
+ for paired getters/setters.) Nick Galbreath (http://blog.client9.com/)
40
+ had the idea of just using a regexp to mangle the common cases for the
41
+ purposes of jslint until upstream suports them. You can do this now in
42
+ jslintrb by setting the "gettersetter" option to true. Note that this
43
+ option has to be turned on in a .jslintrbrc file; it can't be turned
44
+ on with inline comments.
38
45
 
39
46
  == Copyright
40
47
 
@@ -1,3 +1,3 @@
1
1
  module JSLintRB
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -5065,7 +5065,7 @@ loop: for (;;) {
5065
5065
  return this;
5066
5066
  }).exps = true;
5067
5067
 
5068
- reserve('void');
5068
+ // reserve('void');
5069
5069
 
5070
5070
  // Superfluous reserved words
5071
5071
 
@@ -5226,6 +5226,13 @@ loop: for (;;) {
5226
5226
  } else {
5227
5227
  option = {};
5228
5228
  }
5229
+
5230
+ if (option.void) {
5231
+ reservevar("void");
5232
+ } else {
5233
+ reserve("void");
5234
+ }
5235
+
5229
5236
  option.indent = option.indent || 4;
5230
5237
  option.maxerr = option.maxerr || 50;
5231
5238
  adsafe_id = '';
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 6
7
+ - 7
8
8
  - 0
9
- version: 0.6.0
9
+ version: 0.7.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Steven Parkes
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-30 00:00:00 -07:00
17
+ date: 2010-04-09 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency