Skip to content

Commit 6062294

Browse files
committed
Revert "Revert "Update to eslint-2.x""
This reverts commit 28a1b6d.
1 parent a5bbf92 commit 6062294

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

Diff for: best-practices.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ module.exports = {
2828
'no-div-regex': 0,
2929
// disallow else after a return in an if
3030
'no-else-return': 2,
31-
// disallow use of labels for anything other then loops and switches
32-
'no-empty-label': 2,
3331
// disallow comparisons to null without a type-checking operator
3432
'no-eq-null': 0,
3533
// disallow use of eval()
@@ -51,7 +49,7 @@ module.exports = {
5149
// disallow usage of __iterator__ property
5250
'no-iterator': 2,
5351
// disallow use of labeled statements
54-
'no-labels': 2,
52+
'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }],
5553
// disallow unnecessary nested blocks
5654
'no-lone-blocks': 2,
5755
// disallow creation of functions within loops

Diff for: package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,11 @@
1919
"keywords": [
2020
"eslint",
2121
"eslint-config"
22-
]
22+
],
23+
"devDependencies": {
24+
"eslint": "^2.0.0"
25+
},
26+
"peerDependencies": {
27+
"eslint": "^2.0.0"
28+
}
2329
}

Diff for: stylistic-issues.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ module.exports = {
2828
'jsx-quotes': 2,
2929
// enforces spacing between keys and values in object literal properties
3030
'key-spacing': [2, {'beforeColon': false, 'afterColon': true}],
31+
// require a space before and after keywords
32+
'keyword-spacing': [2, {
33+
'before': true,
34+
'after': true,
35+
'overrides': {
36+
'return': { 'after': true },
37+
'throw': { 'after': true },
38+
'case': { 'after': true }
39+
}
40+
}],
3141
// enforces empty lines around comments
3242
'lines-around-comment': 0,
3343
// disallow mixed 'LF' and 'CRLF' as linebreaks
@@ -100,10 +110,6 @@ module.exports = {
100110
'semi': [2, 'always'],
101111
// sort variables within the same declaration block
102112
'sort-vars': 0,
103-
// require a space before certain keywords
104-
'space-before-keywords': [2, 'always'],
105-
// require a space after certain keywords
106-
'space-after-keywords': [2, 'always'],
107113
// require or disallow space before blocks
108114
'space-before-blocks': 2,
109115
// require or disallow space before function opening parenthesis
@@ -112,8 +118,6 @@ module.exports = {
112118
'space-in-parens': 0,
113119
// require spaces around operators
114120
'space-infix-ops': 2,
115-
// require a space after return, throw, and case
116-
'space-return-throw-case': 2,
117121
// Require or disallow spaces before/after unary operators
118122
'space-unary-ops': 0,
119123
// require or disallow a space immediately following the // or /* in a comment

0 commit comments

Comments
 (0)