Browse Source

Formatting/linting

Chimo 3 years ago
parent
commit
323e24d163
4 changed files with 30 additions and 4 deletions
  1. 11
    0
      .jscsrc
  2. 2
    0
      .jshintignore
  3. 14
    0
      .jshintrc
  4. 3
    4
      js/gs-timeago.js

+ 11
- 0
.jscsrc View File

@@ -0,0 +1,11 @@
1
+{
2
+	"preset": "jquery",
3
+	"validateLineBreaks": null,
4
+	"requireCamelCaseOrUpperCaseIdentifiers": null,
5
+	"maximumLineLength": 500,
6
+	"requireBlocksOnNewline": true,
7
+	"requireSpaceBeforeBlockStatements": true,
8
+	"disallowMixedSpacesAndTabs": true,
9
+    "validateIndentation": 4,
10
+    "excludeFiles": [ "js/jquery.timeago.js" ]
11
+}

+ 2
- 0
.jshintignore View File

@@ -0,0 +1,2 @@
1
+js/jquery.timeago.js
2
+

+ 14
- 0
.jshintrc View File

@@ -0,0 +1,14 @@
1
+{
2
+	"boss": true,
3
+	"curly": true,
4
+	"eqeqeq": true,
5
+	"eqnull": true,
6
+	"expr": true,
7
+	"immed": true,
8
+	"noarg": true,
9
+	"undef": true,
10
+	"unused": true,
11
+	"jquery": true,
12
+	"browser": true,
13
+	"es3": true
14
+}

+ 3
- 4
js/gs-timeago.js View File

@@ -1,4 +1,5 @@
1
-(function () {
1
+( function() {
2
+    /*global RealtimeUpdate: false*/
2 3
     "use strict";
3 4
 
4 5
     // Take care of timestamps present on page load
@@ -19,6 +20,4 @@
19 20
                 .timeago();
20 21
         } );
21 22
     };
22
-}());
23
-
24
-
23
+}() );

Loading…
Cancel
Save