Skip to content

Commit

Permalink
Update acceptedStyles type
Browse files Browse the repository at this point in the history
  • Loading branch information
eddeee888 committed Dec 22, 2020
1 parent 8bc3823 commit d337729
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/plugin/src/rules/naming-convention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ const formats = {
UPPER_CASE: /^[A-Z_]*$/g,
};

type ValidNaming = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
const acceptedStyles: ValidNaming[] = ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'];
const acceptedStyles: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'] = [
'camelCase',
'PascalCase',
'snake_case',
'UPPER_CASE',
];
type ValidNaming = typeof acceptedStyles[number];
interface CheckNameFormatParams {
value: string;
style?: ValidNaming;
Expand Down

0 comments on commit d337729

Please sign in to comment.