File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
browser-compatibility-checker Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { CompatIssue } from "./compat-issues" ;
2
2
3
- const BROWSER_NAMES : { [ key : string ] : string } = {
3
+ export const BROWSER_NAMES : { [ key : string ] : string } = {
4
4
chrome : "Chrome" ,
5
5
edge : "Edge" ,
6
6
firefox : "Firefox" ,
Original file line number Diff line number Diff line change 5
5
getBrowsersList ,
6
6
} from "./browser-compatibility-checker" ;
7
7
import { minimatch } from "minimatch" ;
8
+ import { BROWSER_NAMES } from "./browser-compatibility-checker/message" ;
8
9
9
10
const compatIssues : {
10
11
[ path : string ] : { [ key : string ] : CompatIssue } ;
@@ -93,14 +94,16 @@ export function activate(context: vscode.ExtensionContext) {
93
94
const vscodeConfig = vscode . workspace . getConfiguration (
94
95
"browser-compatibility-checker" ,
95
96
) ;
96
- let browsersToCheck = vscodeConfig . browsersToCheck ;
97
+ let browsersToCheck : string [ ] = vscodeConfig . browserList ;
97
98
if ( vscode . workspace . workspaceFolders ) {
98
99
const detectedBrowsersList = getBrowsersList (
99
100
vscode . workspace . workspaceFolders ! [ 0 ] . uri . fsPath ,
100
101
) ;
101
102
if ( detectedBrowsersList && detectedBrowsersList . length > 0 ) {
102
- vscode . window . showInformationMessage ( " Using detected browserslist" ) ;
103
+ vscode . window . showInformationMessage ( ` Using detected browserslist: ${ detectedBrowsersList . map ( x => BROWSER_NAMES [ x ] || x ) . join ( ', ' ) } ` ) ;
103
104
browsersToCheck = detectedBrowsersList ;
105
+ } else {
106
+ vscode . window . showInformationMessage ( `Using browser list: ${ browsersToCheck . map ( x => BROWSER_NAMES [ x ] || x ) . join ( ', ' ) } ` ) ;
104
107
}
105
108
}
106
109
const config : Config = {
You can’t perform that action at this time.
0 commit comments