Skip to content

Commit

Permalink
Update comma-dangle rule
Browse files Browse the repository at this point in the history
Disallow trailing comma in imports, exports, and functions.
  • Loading branch information
alexesprit committed May 30, 2020
1 parent cbaefa2 commit b0098d5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ module.exports = {
camelcase: ['error', { properties: 'never' }],

// Require or disallow trailing commas
'comma-dangle': ['error', 'always-multiline'],
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'never',
exports: 'never',
functions: 'never',
},
],

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

0 comments on commit b0098d5

Please sign in to comment.