@@ -178,6 +178,12 @@ module.exports = {
178
178
'node/no-mixed-requires' : 2 ,
179
179
// Using path.join() is often not needed when using only core Node.js APIs
180
180
'node/no-path-concat' : 0 ,
181
+ 'node/no-unsupported-features/es-syntax' : [
182
+ 'error' ,
183
+ {
184
+ ignores : [ 'modules' ] ,
185
+ } ,
186
+ ] ,
181
187
// Browser globals should not use `require()`. Non-browser globals should
182
188
'node/prefer-global/console' : 2 ,
183
189
'node/prefer-global/buffer' : [ 2 , 'never' ] ,
@@ -299,6 +305,15 @@ module.exports = {
299
305
'import/no-extraneous-dependencies' : 0 ,
300
306
} ,
301
307
} ,
308
+ // TypeScript-specific settings.
309
+ {
310
+ files : [ '*.ts' , '*.tsx' ] ,
311
+ extends : [
312
+ 'plugin:@typescript-eslint/eslint-recommended' ,
313
+ 'plugin:@typescript-eslint/recommended' ,
314
+ 'plugin:import/typescript' ,
315
+ ] ,
316
+ } ,
302
317
{
303
318
// ES modules
304
319
files : [ '*.mjs' ] ,
@@ -311,6 +326,20 @@ module.exports = {
311
326
} ,
312
327
] ,
313
328
settings : {
329
+ 'import/parsers' : {
330
+ '@typescript-eslint/parser' : [ '.ts' , '.tsx' ] ,
331
+ } ,
332
+ 'import/resolver' : {
333
+ node : {
334
+ extensions : [ '.js' , '.jsx' , '.d.ts' , '.ts' , '.tsx' ] ,
335
+ } ,
336
+ typescript : {
337
+ alwaysTryTypes : true ,
338
+ } ,
339
+ } ,
340
+ node : {
341
+ tryExtensions : [ '.js' , '.ts' , '.d.ts' ] ,
342
+ } ,
314
343
react : {
315
344
version : '16.13.1' ,
316
345
} ,
0 commit comments