typed-ember/glint

checkStandaloneTemplates not respected if disabled and no environment provided for hbs files

elwayman02 opened this issue · 0 comments

Take this tsconfig, for example:

  "glint": {
    "environment": [
      "ember-template-imports"
    ],
    "checkStandaloneTemplates": false
  }

The above config could be used to enable typechecking for GTS files while not enabling it for legacy Ember components using HBS files. By setting checkStandaloneTemplates to false, we explicitly indicate that Glint should not be typechecking standalone hbs files, either.

Expected Behavior:

Glint should typecheck tags in GTS files but return no type errors for HBS files, whether or not they have a backing component class.

Actual Behavior:

Glint does not return type errors for HBS files with backing component classes, but it does throw the following error for all template-only HBS files:

No active Glint environment (ember-template-imports) supports standalone template files

Since we already indicated via checkStandaloneTemplates that this behavior should be disabled, Glint should not throw an error complaining about lack of environment support for something it's been explicitly asked not to do.