mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
939 B
30 lines
939 B
/**
|
|
* @fileoverview Config to enable all rules.
|
|
* @author Robert Fletcher
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Requirements
|
|
//------------------------------------------------------------------------------
|
|
|
|
const load = require("../lib/load-rules"),
|
|
rules = require("../lib/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 };
|
|
|