Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elwayman02 opened this issue Jul 22, 2024 · 0 comments

Comments

@elwayman02
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant