Skip to content

Commit

Permalink
Chore: remove dead code for loading rules
Browse files Browse the repository at this point in the history
The `lib/rules.js` file contains a code path that was previously needed to load core rules, but is no longer used as of aa56247.
  • Loading branch information
not-an-aardvark committed Jan 30, 2019
1 parent c464e27 commit 1ceb214
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/load-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ const rulesDirCache = {};

/**
* Load all rule modules from specified directory.
* @param {string} [relativeRulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`.
* @param {string} relativeRulesDir Path to rules directory, may be relative.
* @param {string} cwd Current working directory
* @returns {Object} Loaded rule modules by rule ids (file names).
*/
module.exports = function(relativeRulesDir, cwd) {

const rulesDir = relativeRulesDir
? path.resolve(cwd, relativeRulesDir)
: path.join(__dirname, "rules");
const rulesDir = path.resolve(cwd, relativeRulesDir);

// cache will help performance as IO operation are expensive
if (rulesDirCache[rulesDir]) {
Expand Down

0 comments on commit 1ceb214

Please sign in to comment.