Permalink
Browse files

docs

  • Loading branch information...
1 parent 4b6083e commit 65170fa6a0139f2c643d0cb82c2411a2ae30f285 @kof committed Dec 28, 2010
Showing with 56 additions and 12 deletions.
  1. +40 −1 conf/server.json
  2. +8 −8 lib/linter/jslint.js
  3. +8 −3 readme.md
View
@@ -1,37 +1,76 @@
{
"jslint": {
+ // true if ADsafe rules should be enforced. See http://www.ADsafe.org/.
+ "adsafe": false,
+ // true if bitwise operators should not be allowed.
"bitwise": true,
+ // true if the standard browser globals should be predefined.
"browser": false,
+ // true if upper case HTML should be allowed.
"cap": false,
+ // true if CSS workarounds should be tolerated.
+ "css": true,
+ // true if debugger statements should be allowed. Set this option to false before going into production.
"debug": false,
+ // true if browser globals that are useful in development should be predefined.
"devel": false,
+ // true if === should be required.
"eqeqeq": true,
+ // true if ES5 syntax should be allowed.
"es5": true,
+ // true if eval should be allowed.
"evil": true,
+ // true if unfiltered for in statements should be allowed.
"forin": true,
+ // true if HTML fragments should be allowed.
"fragment": false,
+ // true if immediate function invocations must be wrapped in parens
"immed": true,
+ // The number of spaces used for indentation (default is 4)
"indent": 4,
+ // true if statement breaks should not be checked.
"laxbreak": false,
- "maxlen": 90,
+ // The maximum number of warnings reported (default is 50)
+ "maxerr": 100,
+ // The maximum number of characters in a line
+ "maxlen": 80,
+ // true if names should be checked for initial or trailing underbars
"nomen": false,
+ // true if Initial Caps must be used with constructor functions.
"newcap": true,
+ // true if HTML event handlers should be allowed.
"on": false,
+ // true if only one var statement per function should be allowed.
"onevar": true,
+ // true if the scan should stop on first error.
"passfail": false,
+ // true if ++ and -- should not be allowed.
"plusplus": false,
+ // An array of strings, the names of predefined global variables, or an object whose keys are global variable names, and whose values are booleans that determine if each variable is assignable
"predef": ["global", "process", "require", "__dirname", "__filename", "module", "exports", "Buffer"],
+ // true if . and [^...] should not be allowed in RegExp literals. These forms should not be used when validating in secure applications.
"regexp": false,
+ // true if the Rhino environment globals should be predefined.
"rhino": false,
+ // true if the safe subset rules are enforced. These rules are used by ADsafe. It enforces the safe subset rules but not the widget structure rules.
"safe": false,
+ // true if the ES5 "use strict"; pragma is required. Do not use this option carelessly.
"strict": false,
+ // true if subscript notation may be used for expressions better expressed in dot notation.
"sub": false,
+ // true if variables must be declared before used.
"undef": true,
+ // true if strict whitespace rules apply.
"white": false,
+ // true if the Yahoo Widgets globals should be predefined
+ "widget": false,
+ // true if the Windows globals should be predefined.
"windows": false
},
"closure-linter": {
+ // presence of correct JsDoc annotations
"nojsdoc": false,
+ // If you want Closure Linter to be more strict about style rules like spacing, JsDoc types, and author tags
"strict": false
},
"closure-compiler": {
View
@@ -32,14 +32,14 @@ module.exports = function jslint(file, options, callback) {
if (JSLINT(code, options) === false) {
// standartize error reporting
JSLINT.data().errors.forEach(function(err) {
- if (err) {
- errors.push({
- linter: 'JSLINT',
- file: file,
- message: err.reason + ': ' + err.evidence,
- line: err.line + ':' + err.character
- });
- }
+ if (err) {
+ errors.push({
+ linter: 'JSLINT',
+ file: file,
+ message: err.reason + ': ' + err.evidence,
+ line: err.line + ':' + err.character
+ });
+ }
});
}
View
@@ -12,9 +12,14 @@ You can easily add more quality tools.
- unified errors reporting format
## Currently used tools
- - JSLint http://www.jslint.com/lint.html
- - Closure Linter http://code.google.com/p/closure-linter
- - Closure Compiler http://code.google.com/p/closure-compiler
+- [JSLint](http://www.jslint.com/lint.html)
+- [Closure Linter](http://code.google.com/p/closure-linter)
+- [Closure Compiler](http://code.google.com/p/closure-compiler)
+
+## Error message descriptions
+- [jslint](http://www.jslint.com/msgs.html)
+- [Closure Compiler](http://code.google.com/intl/de-DE/closure/compiler/docs/error-ref.html)
+- [Googles Styleguide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
## Installation
npm install codenazi

0 comments on commit 65170fa

Please sign in to comment.