Skip to content

Commit

Permalink
fix(@typescript-eslint): use naming-convention for generic type naming
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Feb 20, 2020
1 parent ad64b1f commit ef2b574
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions @typescript-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ const config = {
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
// eslint-disable-next-line local/prefer-valid-rules
'@typescript-eslint/generic-type-naming': [
'error',
/^T([A-Z][a-zA-Z]+)$|^[A-Z]$/u.toString().slice(1, -2)
],
// eslint-disable-next-line local/prefer-valid-rules
'@typescript-eslint/member-naming': [
'warn',
{ private: '^_', protected: '^_' }
],
'@typescript-eslint/naming-convention': [
'error',
{ selector: 'typeLike', format: ['PascalCase'] },
{
selector: 'typeParameter',
format: ['PascalCase'],
custom: { match: true, regex: /^T([A-Z][a-zA-Z]+)$|^[A-Z]$/u.source }
},
{ selector: 'variable', format: ['camelCase', 'UPPER_CASE'] },
{ selector: 'enumMember', format: ['PascalCase', 'UPPER_CASE'] }
],
Expand Down

0 comments on commit ef2b574

Please sign in to comment.