For posterity:
TSLint is not always working when the .ts file to lint doesn't have any import statements...
Here's an example of two files with the same error. They are using let where const must be used since the "prefer-const" rule is set to true. The one with an import will properly display the error, the other won't output anything!
This is working as intended. If you don't have an import or export in a file, it's not a module but is considered global. Since TSLint cannot know if some other file uses variables in global scope, prefer-const ignores variables defined at the top level of global scripts.
Most helpful comment
For posterity:
This is working as intended. If you don't have an
importorexportin a file, it's not a module but is considered global. Since TSLint cannot know if some other file uses variables in global scope,prefer-constignores variables defined at the top level of global scripts.