Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
feat: improve comma-dangle rule for TypeScript files (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell authored Oct 18, 2020
1 parent c24836b commit 50785b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ module.exports = {

// Replace Airbnb 'comma-dangle' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
// The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': baseStyleRules['comma-dangle'],
'@typescript-eslint/comma-dangle': [baseStyleRules['comma-dangle'][0], {
...baseStyleRules['comma-dangle'][1],
enums: baseStyleRules['comma-dangle'][1].arrays,
generics: baseStyleRules['comma-dangle'][1].arrays,
tuples: baseStyleRules['comma-dangle'][1].arrays,
}],

// Replace Airbnb 'comma-spacing' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
Expand Down

0 comments on commit 50785b8

Please sign in to comment.