Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 24, 2022
1 parent 9ec0f71 commit 4aa46ef
Show file tree
Hide file tree
Showing 3 changed files with 458 additions and 1,186 deletions.
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { program } from 'commander';
import picocolors from 'picocolors';
import fusv from './index.js';

const { version } = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url)));
const { version } = JSON.parse(fs.readFileSync(new URL('package.json', import.meta.url)));

program
.arguments('[folders]')
Expand Down Expand Up @@ -52,7 +52,7 @@ const executeForPath = async(arg, options) => {
console.log(`Variable ${picocolors.red(name)} is not being used! ${picocolors.gray(file)}:${picocolors.yellow(line)}`);
}

return Promise.reject(new Error(`Found ${unusedVars.unused.length} unused variables in "${picocolors.cyan(dir)}" folder`));
throw new Error(`Found ${unusedVars.unused.length} unused variables in "${picocolors.cyan(dir)}" folder`);
}

console.log(picocolors.green(`No unused variables found in "${dir}!"`));
Expand Down
Loading

0 comments on commit 4aa46ef

Please sign in to comment.