Skip to content

Commit

Permalink
Merge pull request #5254 from mermaid-js/chore/InterfaceNaming
Browse files Browse the repository at this point in the history
chore: Add interface naming Convention
  • Loading branch information
sidharthv96 committed Jan 31, 2024
2 parents 7503694 + e9680e0 commit 33d45f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ module.exports = {
minimumDescriptionLength: 10,
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'typeLike',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
'json/*': ['error', 'allowComments'],
'@cspell/spellchecker': [
'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface QuadrantBuildType {
borderLines?: QuadrantLineType[];
}

export interface quadrantBuilderData {
export interface QuadrantBuilderData {
titleText: string;
quadrant1Text: string;
quadrant2Text: string;
Expand Down Expand Up @@ -116,15 +116,15 @@ interface CalculateSpaceData {
export class QuadrantBuilder {
private config: QuadrantBuilderConfig;
private themeConfig: QuadrantBuilderThemeConfig;
private data: quadrantBuilderData;
private data: QuadrantBuilderData;

constructor() {
this.config = this.getDefaultConfig();
this.themeConfig = this.getDefaultThemeConfig();
this.data = this.getDefaultData();
}

getDefaultData(): quadrantBuilderData {
getDefaultData(): QuadrantBuilderData {
return {
titleText: '',
quadrant1Text: '',
Expand Down Expand Up @@ -194,7 +194,7 @@ export class QuadrantBuilder {
log.info('clear called');
}

setData(data: Partial<quadrantBuilderData>) {
setData(data: Partial<QuadrantBuilderData>) {
this.data = { ...this.data, ...data };
}

Expand Down

0 comments on commit 33d45f6

Please sign in to comment.