Skip to content

Commit 4574659

Browse files
committed
rearrange comma-dangle rule to match es5/es6 codestyles, fixes airbnb#741
1 parent aa9add1 commit 4574659

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

packages/eslint-config-airbnb/rules/errors.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = {
22
'rules': {
3-
// disallow trailing commas in object literals
4-
'comma-dangle': [2, 'always-multiline'],
53
// disallow assignment in conditional expressions
64
'no-cond-assign': [2, 'always'],
75
// disallow use of console

packages/eslint-config-airbnb/rules/es6.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ module.exports = {
3030
// require space before/after arrow function's arrow
3131
// https://github.com/eslint/eslint/blob/master/docs/rules/arrow-spacing.md
3232
'arrow-spacing': [2, { 'before': true, 'after': true }],
33+
// require trailing commas in multiline object literals
34+
'comma-dangle': [2, 'always-multiline'],
3335
// verify super() callings in constructors
3436
'constructor-super': 0,
3537
// enforce the spacing around the * in generator functions

packages/eslint-config-airbnb/rules/legacy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module.exports = {
22
'rules': {
3+
// disallow trailing commas in object literals
4+
'comma-dangle': [2, 'never'],
35
// specify the maximum depth that blocks can be nested
46
'max-depth': [0, 4],
57
// limits the number of parameters that can be used in the function declaration.

0 commit comments

Comments
 (0)