microsoft / dtslint

A utility built on TSLint for linting TypeScript declaration (.d.ts) files.
MIT License
925 stars 86 forks source link

Ability to use `esnext` module #316

Open stramel opened 4 years ago

stramel commented 4 years ago

Currently, it is impossible to use any other module config instead of commonjs. As a result, it is impossible to test the ImportMeta interface.

You can see here, https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/snowpack-env/snowpack-env-tests.ts

The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'.ts(1343)
TypeScript@next compile error: 
The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'. (expect)tslint(1)