Conversation
…th ember-estree imports - Add ember-estree as a dependency - Add "type": "module" to package.json - Rename .eslintrc.js → .eslintrc.cjs and .prettierrc.js → .prettierrc.cjs - Convert all source files from CJS require/module.exports to ESM import/export - Replace local buildGlimmerVisitorKeys() with import from ember-estree - Replace local DocumentLines class with import from ember-estree - Remove local implementations of buildGlimmerVisitorKeys and DocumentLines Co-authored-by: NullVoxPopuli <[email protected]>
…lways-available deps Co-authored-by: NullVoxPopuli <[email protected]>
|
@copilot upgrade to ember-eslint 0.2.0 |
Co-authored-by: NullVoxPopuli <[email protected]>
Upgraded to ember-estree |
❌ Benchmark Comparison (failed)Full mitata output |
|
@copilot ci is failing |
Co-authored-by: NullVoxPopuli <[email protected]>
Fixed in
|
|
@copilot you have a conflict with main |
There was a problem hiding this comment.
Deleted in bf60a81. The file was only a re-export — all usages already import DocumentLines directly from ember-estree.
| syncMtsGtsSourceFiles, | ||
| typescriptParser, | ||
| }; | ||
| export { patchTs, replaceExtensions, syncMtsGtsSourceFiles, typescriptParser }; |
There was a problem hiding this comment.
Done in bf60a81. Changed to export let patchTs, replaceExtensions, syncMtsGtsSourceFiles, typescriptParser; at the declaration and removed the trailing export { ... }.
Resolved in |
Co-authored-by: NullVoxPopuli <[email protected]>
|
ESM transformation extracted to here #176 |
|
@copilot the ESM conversion has landed on main -- now fix conflicts on the PR |
Co-authored-by: NullVoxPopuli <[email protected]>
Resolved in |
|
@copilot the pr still has a ton of conflicts |
Co-authored-by: NullVoxPopuli <[email protected]>
Co-authored-by: NullVoxPopuli <[email protected]>
|
@copilot clean up this pr, there are changes that are not relevant to the task at hand. Also, lean on ember-estree more. Use zimmerframe if we need to walk the tree, remove any babel dependencies |
…ed changes Co-authored-by: NullVoxPopuli <[email protected]>
Cleaned up in
Re: zimmerframe — the AST walk in |
| const { templateVisitorKeys } = preprocessedResult; | ||
| const visitorKeys = { ...result.visitorKeys, ...templateVisitorKeys }; | ||
| result.isTypescript = isTypescript || useTypescript; | ||
| result.isTypescript = true; |
There was a problem hiding this comment.
@copilot incorrect, we cannot unconditionally set isTypescript -- we still support js/gjs parsing with ember-estree
There was a problem hiding this comment.
Fixed in b9d7dc1. Restored the file-extension-based check: const isTypescript = options.filePath.endsWith('.gts') || options.filePath.endsWith('.ts'); and set result.isTypescript = isTypescript; so .js/.gjs files correctly get non-typescript scoping.
| * @return {Token[]} | ||
| */ | ||
| function tokenize(template, doc, startOffset) { | ||
| const tokens = []; |
There was a problem hiding this comment.
@copilot what is this function for? why is it needed?
There was a problem hiding this comment.
This is pre-existing code, not something I introduced. It's a simple tokenizer that splits Glimmer template content into word and punctuator tokens with correct ranges/locs for ESLint. It's used in processGlimmerTemplate (line 436) to generate the token array that ESLint expects on AST nodes. Without it, ESLint rules that inspect tokens (e.g. spacing/formatting rules) wouldn't work on template content.
Co-authored-by: NullVoxPopuli <[email protected]>
ember-estree(^0.2.0) dependencybuildGlimmerVisitorKeys()in transforms.js with import from ember-estreeDocumentLineswith import from ember-estreesrc/utils/document.js@babel/eslint-parserdependency and babel fallback parser@babel/corefrom devDependencies and peerDependencies@typescript-eslint/parsera required peer dependencyisTypescriptto use file extension check (.gts/.ts) instead of unconditionaltrue💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.