Skip to content

Commit 7666bf4

Browse files
committed
Updating to use eslint 4.x.
1 parent c582fc2 commit 7666bf4

File tree

7 files changed

+29
-14
lines changed

7 files changed

+29
-14
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## 3.0.0
4+
- Updated base eslint dependency to 4.0.0
5+
- Added errors/for-direction rule
6+
- Added errors/getter-return rule
7+
- Added node/no-buffer-constructor rule
8+
- Added style/semi-style rule
9+
- Added style/switch-colon-spacing rule
10+
- Removed react/jsx-space-before-closing rule
11+
312
## 2.25.0
413
- Added react/no-will-update-set-state rule
514
- Updated base eslint-plugin-react dependency to 7.0.0

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-smartthings",
3-
"version": "2.25.0",
3+
"version": "3.0.0",
44
"description": "SmartThings's ESLint config",
55
"main": "index.js",
66
"repository": {
@@ -31,7 +31,7 @@
3131
},
3232
"homepage": "https://github.com/SmartThingsOSS/eslint-config-smartthings",
3333
"peerDependencies": {
34-
"eslint": "^3.0.0",
34+
"eslint": "^4.0.0",
3535
"eslint-plugin-react": "^7.0.0"
3636
}
3737
}

rules/errors.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module.exports = {
22
'rules': {
3+
// enforce “for” loop update clause moving the counter in the right direction
4+
'for-direction': 2,
5+
// enforce return statements in getters
6+
'getter-return': 2,
37
// Disallow await inside of loops (no-await-in-loop)
48
'no-await-in-loop': 2,
59
// disallow comparing against -0

rules/es6.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ module.exports = {
5454
'prefer-destructuring': 0,
5555
// disallow parseInt() in favor of binary, octal, and hexadecimal literals
5656
'prefer-numeric-literals': 2,
57-
// suggest using Reflect methods where applicable
58-
'prefer-reflect': 0,
5957
// require rest parameters instead of arguments
6058
'prefer-rest-params': 0,
6159
// suggest using the spread operator instead of .apply()

rules/node.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
'global-require': 2,
1010
// enforces error handling in callbacks (node environment)
1111
'handle-callback-err': 0,
12+
// disallow use of the Buffer() constructor
13+
'no-buffer-constructor': 2,
1214
// disallow mixing regular variable and require declarations
1315
'no-mixed-requires': [0, false],
1416
// disallow use of new operator with the require function

rules/react.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ module.exports = {
7171
'react/jsx-pascal-case': 2,
7272
// Enforce props alphabetical sorting
7373
'react/jsx-sort-props': 0,
74-
// Validate spacing before closing bracket in JSX
75-
'react/jsx-space-before-closing': [2, 'always'],
7674
// Validate whitespace in and around the JSX opening and closing brackets
7775
'react/jsx-tag-spacing': [2, {
7876
'closingSlash': 'never',

rules/style.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module.exports = {
22
'rules': {
3+
// enforce line breaks after opening and before closing array brackets
4+
'array-bracket-newline': 0,
35
// enforce spacing inside array brackets
46
'array-bracket-spacing': 0,
7+
// enforce line breaks after each array element
8+
'array-element-newline': 0,
59
// enforce consistent spacing inside single-line blocks
610
'block-spacing': [2, 'always'],
711
// enforce one true brace style
@@ -44,8 +48,6 @@ module.exports = {
4448
'line-comment-position': 0,
4549
// enforces empty lines around comments
4650
'lines-around-comment': 0,
47-
// require or disallow newlines around directives
48-
'lines-around-directive': 0,
4951
// disallow mixed 'LF' and 'CRLF' as linebreaks
5052
'linebreak-style': 0,
5153
// enforce a maximum depth that blocks can be nested
@@ -68,10 +70,6 @@ module.exports = {
6870
'new-cap': [2, { 'newIsCap': true }],
6971
// disallow the omission of parentheses when invoking a constructor with no arguments
7072
'new-parens': 2,
71-
// allow/disallow an empty newline after var statement
72-
'newline-after-var': 0,
73-
// require newline before return statement
74-
'newline-before-return': 0,
7573
// disallow use of the Array constructor
7674
'no-array-constructor': 2,
7775
// disallow bitwise operators
@@ -128,6 +126,8 @@ module.exports = {
128126
'operator-linebreak': 0,
129127
// enforce padding within blocks
130128
'padded-blocks': [2, 'never'],
129+
// require or disallow padding lines between statements
130+
'padding-line-between-statements': 0,
131131
// require quotes around object literal property names
132132
'quote-props': 0,
133133
// specify whether double or single quotes should be used
@@ -136,10 +136,12 @@ module.exports = {
136136
'require-jsdoc': 0,
137137
// require identifiers to match the provided regular expression
138138
'id-match': 0,
139-
// enforce spacing before and after semicolons
140-
'semi-spacing': [2, { 'before': false, 'after': true }],
141139
// require or disallow use of semicolons instead of ASI
142140
'semi': [2, 'always'],
141+
// enforce spacing before and after semicolons
142+
'semi-spacing': [2, { 'before': false, 'after': true }],
143+
// enforce location of semicolons
144+
'semi-style': [2, 'last'],
143145
// requires object keys to be sorted
144146
'sort-keys': 0,
145147
// sort variables within the same declaration block
@@ -162,6 +164,8 @@ module.exports = {
162164
'exceptions': ['-', '+'],
163165
'markers': ['=', '!'] // space here to support sprockets directives
164166
}],
167+
// enforce spacing around colons of switch statements
168+
'switch-colon-spacing': 2,
165169
// Require or disallow spacing between template tags and their literals (template-tag-spacing)
166170
'template-tag-spacing': [2, 'never'],
167171
// require or disallow the Unicode BOM

0 commit comments

Comments
 (0)