Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

WIP: [typescript-eslint] Migrate generic-type-naming to naming-convention #304

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 20 additions & 12 deletions config/eslintrc_typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ module.exports = {
// TODO: #301
'@typescript-eslint/explicit-module-boundary-types': 'off',

// * We accept the style for T , TA , TAbc , TA1Bca , T1 , T2.
// * You seem this style is similar to C# or typescript compiler.
// * This choise is for:
// * future readability
// * expressiveness
// * Our target is an application, not library.
// * Automate code review process and avoid the bike-shedding.
// * We don't allow the style for `R`, `K`, `V`, or other forms which we can see in Java or other many languages.
// * It's short but less information.
'@typescript-eslint/generic-type-naming': ['error', '^T([A-Z0-9][a-zA-Z0-9]*){0,1}$'],

// TODO: @typescript-eslint/indent

// [By TypeScript coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines),
Expand Down Expand Up @@ -142,7 +131,26 @@ module.exports = {
],
}],

// TODO(#300): '@typescript-eslint/naming-convention'
'@typescript-eslint/naming-convention': ['error',
// * We accept the style for T , TA , TAbc , TA1Bca , T1 , T2.
// * You seem this style is similar to C# or typescript compiler.
// * This choise is for:
// * future readability
// * expressiveness
// * Our target is an application, not library.
// * Automate code review process and avoid the bike-shedding.
// * We don't allow the style for `R`, `K`, `V`, or other forms which we can see in Java or other many languages.
// * It's short but less information.
{
'selector': 'typeParameter',
// 'format': ['PascalCase'],
// 'prefix': ['T'],
'custom': {
'regex': '^T([A-Z0-9][a-zA-Z0-9]*){0,1}$',
'match': true,
}
},
],

// This should be sorted with ESLint builtin rule.
'no-array-constructor': 'off',
Expand Down