odin-javascript-exercises/node_modules/eslint/conf/eslint-all.js
2017-12-15 12:56:14 -06:00

31 lines
966 B
JavaScript

/**
* @fileoverview Config to enable all rules.
* @author Robert Fletcher
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const load = require("../lib/load-rules"),
Rules = require("../lib/rules");
const rules = new Rules();
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const enabledRules = Object.keys(load()).reduce((result, ruleId) => {
if (!rules.get(ruleId).meta.deprecated) {
result[ruleId] = "error";
}
return result;
}, {});
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = { rules: enabledRules };