1.0.6 • Published 4 years ago

tslint-only-modules v1.0.6

Weekly downloads
131
License
MIT
Repository
github
Last release
4 years ago

tslint-only-modules

A TSLint rule that restricts all typescript source files to be modules.

Rationale

In projects which ubiquitously use ES6 modules, a file having no imports or exports is a red flag. As of ES6, any file containing a top-level import or export is considered a module; however, if a file contains no top-level import or export declarations, its contents will be exposed as available in the global scope.

Having a hybrid mix of ES6 modules and global-scope scripts can lead to unexpected behavior. Perhaps the file isn't truly accessible in the global scope after webpack compilation - in this case, it could result in a fatal error which would not get caught until run-time.

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago