Skip to content

Commit

Permalink
fix(vscode): show project details codelens above package.json#nx if i…
Browse files Browse the repository at this point in the history
…t exists (#2361)
  • Loading branch information
MaxKless authored Dec 11, 2024
1 parent 0379c2e commit 2cd8cb7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ export class ProjectDetailsCodelensProvider implements NxCodeLensProvider {
}
return new Position(1, 1);
} else {
const nxProperty = properties?.find(
(prop) => getPropertyName(prop) === 'nx'
);
if (nxProperty) {
return document.positionAt(nxProperty.getStart(jsonFile));
}
const scriptsProperty = properties?.find(
(prop) => getPropertyName(prop) === 'scripts'
);
Expand Down

0 comments on commit 2cd8cb7

Please sign in to comment.