Skip to content

Commit

Permalink
Resolve eslint peer by cwd
Browse files Browse the repository at this point in the history
`cwd` is not a valid option, it needs to be `basedir`, which defaults
to `__basedir`.  That’s fine for direct dependencies, but not for
peers like eslint.
  • Loading branch information
IanVS committed Oct 22, 2018
1 parent 35e47b7 commit 35fc403
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/config/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ These will be used as custom formatters.

import resolve from 'resolve';

export var stats = resolve.sync('eslint-stats/byErrorAndWarning.js', { cwd: process.cwd() });
export var summary = resolve.sync('eslint-summary/summary.js', { cwd: process.cwd() });
export var detailed = resolve.sync('eslint-formatter-friendly', { cwd: process.cwd() });
export var stats = resolve.sync('eslint-stats/byErrorAndWarning.js');
export var summary = resolve.sync('eslint-summary/summary.js');
export var detailed = resolve.sync('eslint-formatter-friendly');
2 changes: 1 addition & 1 deletion src/nibbler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import resolve from 'resolve';

const { CLIEngine } = require(resolve.sync('eslint', { cwd: process.cwd() }));
const { CLIEngine } = require(resolve.sync('eslint', { basedir: process.cwd() }));
let cli = new CLIEngine({});

function getCounts(messages) {
Expand Down

0 comments on commit 35fc403

Please sign in to comment.