Skip to content

Commit

Permalink
fix: Interface of Config; add interface for EslintConfig and use it i…
Browse files Browse the repository at this point in the history
…n PracticeContext
  • Loading branch information
adelkahomolova committed Sep 19, 2019
1 parent 3e6fd36 commit 70f4c9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/contexts/IConfigProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ export interface Config {
[key in Practices]?: PracticeImpact;
};
tokens?: {
[key in Service]: string;
[key in Service]: string | EslintConfig;
};
}

export interface EslintConfig {
eslintIgnore?: string[];
useEslintrc?: boolean;
impact?: string;
}

enum Service {
Slack = 'Slack',
}
Expand Down
3 changes: 2 additions & 1 deletion src/contexts/practice/PracticeContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { IIssueTrackingInspector } from '../../inspectors/IIssueTrackingInspecto
import { ProjectComponent } from '../../model';
import { IFileInspector } from '../../inspectors/IFileInspector';
import { ICollaborationInspector } from '../../inspectors/ICollaborationInspector';
import { EslintConfig } from '../IConfigProvider';

export interface PracticeContext {
projectComponent: ProjectComponent;
Expand All @@ -12,5 +13,5 @@ export interface PracticeContext {
issueTrackingInspector: IIssueTrackingInspector | undefined;
collaborationInspector: ICollaborationInspector | undefined;
fileInspector: IFileInspector | undefined;
config?: any; //Config
config?: EslintConfig;
}

0 comments on commit 70f4c9c

Please sign in to comment.