• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

benmosher / eslint-plugin-import / #28399472

pending completion
#28399472

push

GitHub
<a href="https://github.com/benmosher/eslint-plugin-import/commit/<a class=hub.com/benmosher/eslint-plugin-import/commit/79ad37dfbf90869a29029b2bc556bd6108018c99">79ad37dfb<a href="https://github.com/benmosher/eslint-plugin-import/commit/79ad37dfbf90869a29029b2bc556bd6108018c99">">Merge </a><a class="double-link" href="https://github.com/benmosher/eslint-plugin-import/commit/<a class="double-link" href="https://github.com/benmosher/eslint-plugin-import/commit/44e85782da066487a4a5f5a62ae9b8d0c1d55aff">44e85782d</a>">44e85782d</a><a href="https://github.com/benmosher/eslint-plugin-import/commit/79ad37dfbf90869a29029b2bc556bd6108018c99"> into 4a9be6384">4a9be6384</a>

1363 of 1848 branches covered (73.76%)

1677 of 2595 relevant lines covered (64.62%)

38.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/utils/module-require.js
1
'use strict';
2
exports.__esModule = true;
×
3

4
const Module = require('module');
×
5
const path = require('path');
×
6

7
// borrowed from babel-eslint
8
function createModule(filename) {
9
  const mod = new Module(filename);
×
10
  mod.filename = filename;
×
11
  mod.paths = Module._nodeModulePaths(path.dirname(filename));
×
12
  return mod;
×
13
}
14

15
exports.default = function moduleRequire(p) {
×
16
  try {
×
17
    // attempt to get espree relative to eslint
18
    const eslintPath = require.resolve('eslint');
×
19
    const eslintModule = createModule(eslintPath);
×
20
    return require(Module._resolveFilename(p, eslintModule));
×
21
  } catch(err) { /* ignore */ }
22

23
  try {
×
24
    // try relative to entry point
25
    return require.main.require(p);
×
26
  } catch(err) { /* ignore */ }
27

28
  // finally, try from here
29
  return require(p);
×
30
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc