File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,16 @@ export const activate = (context: vscode.ExtensionContext) => {
9
9
10
10
context . subscriptions . push (
11
11
vscode . workspace . onDidOpenTextDocument ( document => {
12
+ if ( ! isConfigFile ( document ) ) {
13
+ return ;
14
+ }
12
15
updateDiagnostics ( document , collection ) ;
13
16
} )
14
17
) ;
15
18
16
19
context . subscriptions . push (
17
20
vscode . workspace . onDidChangeTextDocument ( event => {
18
- if ( event . document . getText ( ) === '' ) {
21
+ if ( ! isConfigFile ( event . document ) ) {
19
22
collection . delete ( event . document . uri ) ;
20
23
return ;
21
24
}
@@ -49,10 +52,6 @@ const updateDiagnostics = (
49
52
50
53
const documentNode = parse ( document . getText ( ) ) as parse . ObjectNode ;
51
54
52
- if ( ! isConfigFile ( document ) ) {
53
- return ;
54
- }
55
-
56
55
// check if urlsToWatch is empty
57
56
const urlsToWatchNode = getASTNode (
58
57
documentNode . children ,
You can’t perform that action at this time.
0 commit comments