Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 30, 2014
1 parent cd8acaf commit 37cb85e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
11 changes: 10 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"env": {
"browser": false,
"node": false,
"amd": false,
"mocha": false,
"jasmine": false
},
"rules": {
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": [0],
"comma-style": [2, "last"],
"default-case": [2],
"dot-notation": [2, { "allowKeywords": true }],
"eol-last": [2],
"func-style": [0, "expression"],
"quotes": [2, "single", "avoid-escape"],
Expand All @@ -18,6 +26,7 @@
"no-reserved-keys": [2],
"no-shadow": [0],
"no-unused-vars": [1, { "vars": "all", "args": "after-used" }],
"space-after-function-name": [2, "never"],
"space-after-keywords": [2, "always", { "checkFunctionKeyword": true }],
"space-in-brackets": [0, "always", {
"singleValue": false,
Expand All @@ -30,7 +39,7 @@
"strict": [1],
"wrap-iife": [2],
"wrap-regex": [2],
"yoda": [1, "never", { "exceptRange": true }]
"yoda": [2, "never", { "exceptRange": true }]
}
}

2 changes: 0 additions & 2 deletions es5-sham.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
// vim: ts=4 sts=4 sw=4 expandtab

//Add semicolon to prevent IIFE from being passed as argument to concated code.
/*eslint-disable no-extra-semi */
;
/*eslint-enable no-extra-semi */

// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/returnExports.js
Expand Down
4 changes: 1 addition & 3 deletions es5-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
// vim: ts=4 sts=4 sw=4 expandtab

// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
/*eslint-disable no-extra-semi */
;
/*eslint-enable no-extra-semi */

// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/returnExports.js
Expand Down Expand Up @@ -831,7 +829,7 @@ defineProperties(Date.prototype, {
result = [month + 1, this.getUTCDate(), this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
year = (
(year < 0 ? '-' : (year > 9999 ? '+' : '')) +
('00000' + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6)
('00000' + Math.abs(year)).slice((0 <= year && year <= 9999) ? -4 : -6)
);

length = result.length;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"test": "npm run lint && jasmine-node --matchall ./ tests/spec/",
"test-native": "jasmine-node --matchall tests/spec/",
"lint": "npm run jscs && npm run eslint",
"eslint": "eslint tests/helpers/*.js tests/spec/*.js es5-shim.js es5-sham.js",
"eslint": "eslint --reset tests/helpers/*.js tests/spec/*.js es5-shim.js es5-sham.js",
"jscs": "jscs tests/helpers/*.js tests/spec/*.js es5-shim.js es5-sham.js"
},
"devDependencies": {
"eslint": "~0.10.2",
"eslint": "~0.11.0",
"jasmine-node": "~1.14.5",
"jscs": "~1.9.0",
"uglify-js": "~2.4.16"
Expand Down

0 comments on commit 37cb85e

Please sign in to comment.