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

Glimmer Processor can't handle errors without lines #1683

Closed
wagenet opened this issue Nov 29, 2022 · 7 comments · Fixed by #1920 or #1942
Closed

Glimmer Processor can't handle errors without lines #1683

wagenet opened this issue Nov 29, 2022 · 7 comments · Fixed by #1920 or #1942
Labels

Comments

@wagenet
Copy link
Contributor

wagenet commented Nov 29, 2022

const line = lines[message.line - 1];

Some errors do not have lines associated with them, so this does not work.

@NullVoxPopuli
Copy link
Contributor

hmm -- how aren't there lines?

@bmish bmish added the Bug label Nov 29, 2022
@wagenet
Copy link
Contributor Author

wagenet commented Nov 29, 2022

  message: {
    ruleId: null,
    fatal: true,
    severity: 2,
    message: 'Parsing error: ESLint was configured to run on `<tsconfigRootDir>/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts` using `parserOptions.project`: <tsconfigRootDir>/../../../../../users/pwagenet/development/auditboard/auditboard-frontend/tsconfig.json\n' +
      'However, that TSConfig does not include this file. Either:\n' +
      "- Change ESLint's list of included files to not include this file\n" +
      '- Change that TSConfig to include this file\n' +
      '- Create a new TSConfig that includes this file and include it in your parserOptions.project\n' +
      'See the TypeScript ESLint docs for more info: https://typescript-eslint.io/docs/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file',
    line: undefined,
    column: undefined
  },

@NullVoxPopuli
Copy link
Contributor

ah! all my tests didn't have parsing errors. good call out

@wagenet
Copy link
Contributor Author

wagenet commented Dec 14, 2022

This would be fixed by #1667

@bwbuchanan
Copy link

  message: {
    ruleId: null,
    fatal: true,
    severity: 2,
    message: 'Parsing error: ESLint was configured to run on `<tsconfigRootDir>/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts/0_/Users/pwagenet/Development/AuditBoard/auditboard-frontend/addons/luna/addon/components/util/cache-state.gts` using `parserOptions.project`: <tsconfigRootDir>/../../../../../users/pwagenet/development/auditboard/auditboard-frontend/tsconfig.json\n' +
      'However, that TSConfig does not include this file. Either:\n' +
      "- Change ESLint's list of included files to not include this file\n" +
      '- Change that TSConfig to include this file\n' +
      '- Create a new TSConfig that includes this file and include it in your parserOptions.project\n' +
      'See the TypeScript ESLint docs for more info: https://typescript-eslint.io/docs/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file',
    line: undefined,
    column: undefined
  },

@wagenet did you manage to solve the underlying issue with typescript-eslint (.gts file not included in tsconfig.json)?

I've tried adding "**/*.gts" to the includes in tsconfig.json, to no avail.

@wagenet
Copy link
Contributor Author

wagenet commented Jan 31, 2023

@bwbuchanan unfortunately, I had to turn off type-aware lints in gts files. This is an issue others are aware of. I think we may have to update ESLint to be able to use Glint directly.

@bmish
Copy link
Member

bmish commented Aug 22, 2023

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