Bug 1257246: Update eslint rules for eslint 2. r=MattN
Rename the rules that ESLint 2 no longer supports to the new names. Ignore the
microformat test suite as it is external code.
MozReview-Commit-ID: BgIxFERjHp1
--- a/.eslintignore
+++ b/.eslintignore
@@ -188,16 +188,17 @@ toolkit/components/workerloader/tests/mo
# Tests old non-star function generators
toolkit/modules/tests/xpcshell/test_task.js
# Not yet updated
toolkit/components/osfile/**
# External code:
+toolkit/components/microformats/test/**
toolkit/components/reader/Readability.js
toolkit/components/reader/JSDOMParser.js
# Uses preprocessing
toolkit/content/widgets/videocontrols.xml
toolkit/content/widgets/wizard.xml
toolkit/components/jsdownloads/src/DownloadIntegration.jsm
toolkit/components/search/nsSearchService.js
--- a/toolkit/.eslintrc
+++ b/toolkit/.eslintrc
@@ -38,16 +38,19 @@
// "generator-star-spacing": [2, {"before": false, "after": true}],
// Two space indent
// "indent": [2, 2, { "SwitchCase": 1 }],
// Space after colon not before in property declarations
// "key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
+ // Require spaces before and after keywords
+ // "keyword-spacing": 2,
+
// Unix linebreaks
"linebreak-style": [2, "unix"],
// Always require parenthesis for new calls
// "new-parens": 2,
// Use [] instead of Array()
// "no-array-constructor": 2,
@@ -158,37 +161,28 @@
// "no-use-before-define": [2, "nofunc"],
// No using with
"no-with": 2,
// Always require semicolon at end of statement
// "semi": [2, "always"],
- // Require space after keywords
- // "space-after-keywords": 2,
-
// Require space before blocks
// "space-before-blocks": 2,
// Never use spaces before function parentheses
// "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
- // Require spaces before finally, catch, etc.
- // "space-before-keywords": [2, "always"],
-
// No space padding in parentheses
// "space-in-parens": [2, "never"],
// Require spaces around operators
// "space-infix-ops": 2,
- // Require spaces after return, throw and case
- // "space-return-throw-case": 2,
-
// ++ and -- should not need spacing
// "space-unary-ops": [2, { "words": true, "nonwords": false }],
// No comparisons to NaN
"use-isnan": 2,
// Only check typeof against valid results
"valid-typeof": 2,