Skip to content

Commit b0098d5

Browse files
committed
Update comma-dangle rule
Disallow trailing comma in imports, exports, and functions.
1 parent cbaefa2 commit b0098d5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,16 @@ module.exports = {
7979
camelcase: ['error', { properties: 'never' }],
8080

8181
// Require or disallow trailing commas
82-
'comma-dangle': ['error', 'always-multiline'],
82+
'comma-dangle': [
83+
'error',
84+
{
85+
arrays: 'always-multiline',
86+
objects: 'always-multiline',
87+
imports: 'never',
88+
exports: 'never',
89+
functions: 'never',
90+
},
91+
],
8392

8493
// Require space after comma
8594
'comma-spacing': ['error', { after: true }],

0 commit comments

Comments
 (0)