/**
 * @fileoverview Config to enable all rules.
 * @author Robert Fletcher
 */

"use strict";

//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------

let fs = require("fs"),
    path = require("path");

//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------

let ruleFiles = fs.readdirSync(path.resolve(__dirname, "../lib/rules"));
let enabledRules = ruleFiles.reduce(function(result, filename) {
    if (path.extname(filename) === ".js") {
        result[path.basename(filename, ".js")] = "error";
    }
    return result;
}, {});

//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------

module.exports = { rules: enabledRules };

@@ -272,14 +272,18 @@
 --%0A%0A
-let fs
+const load
  = r
@@ -290,17 +290,32 @@
 equire(%22
-f
+../lib/load-rule
 s%22),%0A   
@@ -315,20 +315,21 @@
 %22),%0A    
-path
+rules
  = requi
@@ -332,20 +332,28 @@
 equire(%22
-path
+../lib/rules
 %22);%0A%0A//-
@@ -527,235 +527,145 @@
 --%0A%0A
-let ruleFiles = fs.readdirSync(path.resolve(__dirname, %22../lib/rules%22));%0Alet enabledRules = ruleFiles.reduce(function(result, filename) %7B%0A    if (path.extname(filename) === %22.js%22) %7B%0A        result%5Bpath.basename(filename, %22.js%22)
+const enabledRules = Object.keys(load()).reduce((result, ruleId) =%3E %7B%0A    if (!rules.get(ruleId).meta.deprecated) %7B%0A        result%5BruleId
 %5D = 

make `eslint:all` excluding deprecated rules (fixes #6734) (#6756)