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

Commit

Permalink
Use PascalCase for TypeScript's enum member
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuharuohzeki committed May 26, 2020
1 parent 1908268 commit 2c42781
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/eslintrc_typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,14 @@ module.exports = {
{
'selector': 'memberLike',
'modifiers': ['private', 'protected'],
'format': null,
'format': ['camelCase'],
// FIXME: Does this option really work?
'leadingUnderscore': 'require',
},
{
'selector': 'enumMember',
'format': ['PascalCase'],
},

{
'selector': 'typeLike',
Expand Down
9 changes: 9 additions & 0 deletions test/typescript/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
// Only for testing to avoid the compile error by typescript compiler
// if there it no input

/* eslint-env node */

console.log('test');

enum BarEnum {
A = 1,
}

const enum ConstBarEnum {
A = '1',
}

0 comments on commit 2c42781

Please sign in to comment.