Skip to content

Commit

Permalink
fix: code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Feb 13, 2023
1 parent 0c7592c commit d3665ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/files/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const loadInstalledPackages = async (rootPath, subPath = '') => {
});
packageAtRootData = JSON.parse(manifestContent);
packageAtRootData.relativePath = subPath;
// eslint-disable-next-line no-empty
// eslint-disable-next-line no-empty
} catch (error) {}

if (packageAtRootData) {
Expand All @@ -47,7 +47,7 @@ const loadInstalledPackages = async (rootPath, subPath = '') => {
totalSize -= await getFolderSize(modulesPath);
}
packageAtRootData.size = totalSize;
// eslint-disable-next-line no-empty
// eslint-disable-next-line no-empty
} catch (error) {}
}

Expand Down
13 changes: 2 additions & 11 deletions src/graph/generateNpmGraph.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
const {
processDependenciesForPackage,
processPlaceholders,
makeNode,
} = require('./utils');
const {processDependenciesForPackage, processPlaceholders, makeNode} = require('./utils');

const packageNameFromPath = (path) => {
// TODO: For locally linked packages this might not include a `node_modules` string
Expand All @@ -16,12 +12,7 @@ const generateNpmGraph = ({packages}) => {
let root = null;

Object.entries(packages).forEach(([packageLocation, packageData]) => {
const {
name: originalName,
version,
resolved,
integrity,
} = packageData;
const {name: originalName, version, resolved, integrity} = packageData;
const name = originalName || packageNameFromPath(packageLocation);

const newPackage = makeNode({
Expand Down
6 changes: 1 addition & 5 deletions src/graph/generatePnpmGraph.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
const {
processDependenciesForPackage,
processPlaceholders,
makeNode,
} = require('./utils');
const {processDependenciesForPackage, processPlaceholders, makeNode} = require('./utils');

const parsePath = (path) => {
const parts = path.slice(1).split('/');
Expand Down

0 comments on commit d3665ef

Please sign in to comment.