Skip to content

Commit

Permalink
refactor: moved extension types
Browse files Browse the repository at this point in the history
  • Loading branch information
marabesi committed Jun 30, 2024
1 parent 83bf00e commit a0fae6c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
16 changes: 1 addition & 15 deletions vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@ import * as vscode from 'vscode';
import path from 'path';
import { SmellDetector } from './modules/smells-detector';
import { Smell } from './modules/types';

type ComposedSmell = {
smell: Smell;
range: vscode.Range;
};

export const warningDecorationType = vscode.window.createTextEditorDecorationType({
backgroundColor: 'rgba(255,0,0, 0.5)',
light: {
borderColor: 'darkblue'
},
dark: {
borderColor: 'lightblue'
}
});
import { ComposedSmell, warningDecorationType } from './extension.types';

let currentDecoration = warningDecorationType;
let ranges: ComposedSmell[] = [];
Expand Down
17 changes: 17 additions & 0 deletions vscode/src/extension.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Range, window } from 'vscode';
import { Smell } from "./modules/types";

export type ComposedSmell = {
smell: Smell;
range: Range;
};

export const warningDecorationType = window.createTextEditorDecorationType({
backgroundColor: 'rgba(255,0,0, 0.5)',
light: {
borderColor: 'darkblue'
},
dark: {
borderColor: 'lightblue'
}
});

0 comments on commit a0fae6c

Please sign in to comment.