diff --git a/index.js b/index.js index 840392a..84bf13b 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,14 @@ 'use strict'; -const reqAll = require('req-all'); +const fs = require('fs'); +const path = require('path'); const createIndex = require('create-eslint-index'); -const rules = reqAll('rules', {camelize: false}); +const rules = {}; +for (const file of fs.readdirSync(`${__dirname}/rules`)) { + const ruleName = path.basename(file, path.extname(file)); + rules[ruleName] = require(`./rules/${ruleName}`); +} const externalRecommendedRules = { 'no-var': 'error' diff --git a/package.json b/package.json index 6d97a56..7464862 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,7 @@ "dependencies": { "create-eslint-index": "^1.0.0", "eslint-ast-utils": "^1.0.0", - "lodash": "^4.13.1", - "req-all": "^0.1.0" + "lodash": "^4.13.1" }, "devDependencies": { "ava": "^0.17.0",