You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/typescript-estree/README.md
+5
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,11 @@ I work closely with the TypeScript Team and we are gradually aliging the AST of
144
144
-`npm run unit-tests` - run only unit tests
145
145
-`npm run ast-alignment-tests` - run only Babylon AST alignment tests
146
146
147
+
## Debugging
148
+
149
+
If you encounter a bug with the parser that you want to investigate, you can turn on the debug logging via setting the environment variable: `DEBUG=typescript-eslint:*`.
150
+
I.e. in this repo you can run: `DEBUG=typescript-eslint:* yarn lint`.
151
+
147
152
## License
148
153
149
154
TypeScript ESTree inherits from the the original TypeScript ESLint Parser license, as the majority of the work began there. It is licensed under a permissive BSD 2-clause license.
// Eg. on linux the number of watches are limited and one could easily exhaust watches and the exception ENOSPC is thrown when creating watcher at that point
137
+
// so instead of throwing error, use fs.watchFile
138
+
fsWatcher=chokidar.watch(watchPath,{
139
+
ignoreInitial: true,
140
+
persistent: false,
141
+
useFsEvents: false,
142
+
...options,
143
+
usePolling: true,
144
+
});
145
+
}
146
+
147
+
letcounter=1;
148
+
constwatcher={
149
+
close: (): void=>{
150
+
counter-=1;
151
+
if(counter<=0){
152
+
fsWatcher.close();
153
+
fileWatcherTrackingSet.delete(watchPath);
154
+
}
155
+
},
156
+
forceClose: fsWatcher.close.bind(fsWatcher),
157
+
on: fsWatcher.on.bind(fsWatcher),
158
+
trackWatcher: (): void=>{
159
+
counter+=1;
160
+
},
161
+
};
162
+
163
+
fileWatcherTrackingSet.set(watchPath,watcher);
164
+
165
+
returnwatcher;
119
166
}
120
167
121
168
/**
@@ -219,7 +266,6 @@ export function calculateProjectParserOptions(
219
266
watcher.on('change',path=>{
220
267
callback(path,ts.FileWatcherEventKind.Changed);
221
268
});
222
-
configSystemFileWatcherTrackingSet.add(watcher);
223
269
}
224
270
225
271
constnormalizedFileName=path.normalize(fileName);
@@ -239,7 +285,6 @@ export function calculateProjectParserOptions(
0 commit comments