Repository navigation
Resolve ember-source from the linted file - #269
Merged
NullVoxPopuli merged 1 commit intoOct 23, 2026
Merged
NullVoxPopuli merged 1 commit into
NullVoxPopuli merged 1 commit into
Conversation
The built-in keyword check looked up ember-source from the parser's own folder. ember-source is a dependency of the project, not of the parser, so with pnpm that lookup finds only the hoisted copy. In a monorepo the hoisted copy can be a different version than the one the package uses. For example, a 7.3 app next to 7.0 test apps got 7.0, and `no-undef` flagged `on`, `fn` and the other keywords. The lookup now starts at the directory of the linted file, and the result is cached per directory. The `emberSourceVersion` option still wins over the lookup. A new test makes a monorepo with 7.0.0 at the root and 7.3.1 in one package. It fails on the old lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli-ai-agent
pushed a commit
to NullVoxPopuli-ai-agent/ember-inspector
that referenced
this pull request
Oct 23, 2026
ember-eslint-parser finds ember-source, but from its own folder. With pnpm, that is the hoisted 7.0 of the test apps, which is older than the keywords. The parser fix is ember-tooling/ember-eslint-parser#269. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli
approved these changes
Oct 23, 2026
NullVoxPopuli
marked this pull request as ready for review
October 23, 2026 14:39
Contributor
🏎️ Benchmark ComparisonParse
Full mitata output
Full mitata output |
Merged
NullVoxPopuli-ai-agent
pushed a commit
to NullVoxPopuli-ai-agent/ember-inspector
that referenced
this pull request
Oct 23, 2026
ember-eslint-parser 0.16.1 looks up ember-source from the linted file (ember-tooling/ember-eslint-parser#269), so it finds the 7.3 of the UI package and not the hoisted 7.0 of the test apps. Only the parser entries change in the lockfile. `pnpm update` also moved the postcss peer of webpack in the test apps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli-ai-agent
pushed a commit
to NullVoxPopuli-ai-agent/ember-inspector
that referenced
this pull request
Oct 23, 2026
ember-eslint-parser finds ember-source, but from its own folder. With pnpm, that is the hoisted 7.0 of the test apps, which is older than the keywords. The parser fix is ember-tooling/ember-eslint-parser#269. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli-ai-agent
pushed a commit
to NullVoxPopuli-ai-agent/ember-inspector
that referenced
this pull request
Oct 23, 2026
ember-eslint-parser 0.16.1 looks up ember-source from the linted file (ember-tooling/ember-eslint-parser#269), so it finds the 7.3 of the UI package and not the hoisted 7.0 of the test apps. Only the parser entries change in the lockfile. `pnpm update` also moved the postcss peer of webpack in the test apps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a pnpm monorepo, the built-in keyword check (
on,fn,eqand the others) used the wrongember-source. It now uses theember-sourcethat the linted file resolves.Cause
The parser called
require('ember-source/package.json')from its own folder.ember-sourceis not a dependency of the parser, so pnpm puts no copy next to it, and Node finds the hoisted copy innode_modules/.pnpm/node_modules. In a monorepo with more than oneember-source, that copy can be any of them.Example: in ember-inspector, the UI package uses 7.3.1 and three test apps use 7.0.0. The parser got 7.0.0, so
no-undefflagged every keyword in the UI.Fix
emberSourceVersionoption still wins over the lookup.Tests
A new test makes a temporary monorepo: 7.0.0 at the root, 7.3.1 in
packages/new-app, nothing inpackages/old-app. A file innew-appgets the keywords, and a file inold-appdoes not. The test fails on the old lookup.I also linted ember-inspector (emberjs/ember-inspector#2818) with this branch and without the
emberSourceVersionoption. Theno-undeferrors for the keywords are gone.🤖 Generated with Claude Code