Skip to content

Commit

Permalink
fixes #1608: integrate eslint into testing process
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed May 20, 2014
1 parent 4de07c0 commit 5d3d268
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 78 deletions.
126 changes: 126 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"env": {
"browser": true,
"node": true,
"amd": true
},

"rules": {
"block-scoped-var": 0,
"brace-style": [1, "1tbs"],
"camelcase": 2,
"complexity": [0, 11],
"consistent-return": 2,
"consistent-this": [0, "that"],
"curly": [0, "multi"],
"dot-notation": 2,
"eqeqeq": [1, "smart"],
"func-names": 0,
"func-style": [0, "declaration"],
"guard-for-in": 0,
"handle-callback-err": 0,
"max-depth": [1, 4],
"max-len": [0, 80, 4],
"max-nested-callbacks": [0, 2],
"max-params": [1, 4],
"max-statements": [0, 10],
"new-cap": 1,
"new-parens": 0,
"no-alert": 2,
"no-array-constructor": 2,
"no-bitwise": 0,
"no-caller": 2,
"no-catch-shadow": 2,
"no-comma-dangle": 2,
"no-cond-assign": 2,
"no-console": 2,
"no-constant-condition": 1,
"no-control-regex": 2,
"no-debugger": 2,
"no-delete-var": 2,
"no-div-regex": 1,
"no-dupe-keys": 2,
"no-else-return": 1,
"no-empty": 2,
"no-empty-class": 2,
"no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 1,
"no-extra-semi": 2,
"no-extra-strict": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-func-assign": 2,
"no-global-strict": 2,
"no-implied-eval": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-lonely-if": 1,
"no-loop-func": 2,
"no-mixed-requires": [0, false],
"no-multi-str": 2,
"no-native-reassign": 2,
"no-negated-in-lhs": 2,
"no-nested-ternary": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-object": 2,
"no-new-wrappers": 2,
"no-obj-calls": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-path-concat": 0,
"no-plusplus": 0,
"no-process-exit": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 0,
"no-sequences": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-space-before-semi": 2,
"no-spaced-func": 2,
"no-sparse-arrays": 2,
"no-sync": 0,
"no-ternary": 0,
"no-undef": 2,
"no-undef-init": 2,
"no-underscore-dangle": 0,
"no-unreachable": 2,
"no-unused-expressions": 2,
"no-unused-vars": [2, {"vars": "local", "args": "after-used"}],
"no-use-before-define": 2,
"no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
"no-with": 2,
"no-wrap-func": 2,
"no-yoda": 2,
"one-var": 0,
"quote-props": 0,
"quotes": [2, "single", "avoid-escape"],
"radix": 2,
"semi": 2,
"sort-vars": 0,
"space-after-keywords": 1,
"space-in-brackets": [2, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-word-ops": 2,
"strict": 0,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"wrap-iife": 0,
"wrap-regex": 1
}
}
36 changes: 25 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
{
"name" : "underscore",
"description" : "JavaScript's functional programming helper library.",
"homepage" : "http://underscorejs.org",
"keywords" : ["util", "functional", "server", "client", "browser"],
"author" : "Jeremy Ashkenas <[email protected]>",
"repository" : {"type": "git", "url": "git://github.com/jashkenas/underscore.git"},
"main" : "underscore.js",
"version" : "1.6.0",
"name": "underscore",
"description": "JavaScript's functional programming helper library.",
"homepage": "http://underscorejs.org",
"keywords": [
"util",
"functional",
"server",
"client",
"browser"
],
"author": "Jeremy Ashkenas <[email protected]>",
"repository": {
"type": "git",
"url": "git://github.com/jashkenas/underscore.git"
},
"main": "underscore.js",
"version": "1.6.0",
"devDependencies": {
"docco": "0.6.x",
"phantomjs": "1.9.7-1",
"uglify-js": "2.4.x"
"uglify-js": "2.4.x",
"eslint": "0.6.x"
},
"scripts": {
"test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true",
"test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true && eslint underscore.js",
"build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js",
"doc": "docco underscore.js"
},
Expand All @@ -23,5 +33,9 @@
"url": "https://raw.github.com/jashkenas/underscore/master/LICENSE"
}
],
"files" : ["underscore.js", "underscore-min.js", "LICENSE"]
"files": [
"underscore.js",
"underscore-min.js",
"LICENSE"
]
}
Loading

0 comments on commit 5d3d268

Please sign in to comment.