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
  • Loading branch information
MaxKless committed Dec 11, 2024
1 parent 0379c2e commit a796dc9
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 a796dc9

Please sign in to comment.