eslint-plugin-react-hook-form
Version:
ESLint plugin for react-hook-form
30 lines (24 loc) • 866 B
JavaScript
/**
* @fileoverview ESLint for react-hook-form
* @author Andrew Kao
*/
;
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var requireIndex = require("requireindex");
//------------------------------------------------------------------------------
// Plugin Definition
//------------------------------------------------------------------------------
// import all rules in lib/rules
module.exports.rules = requireIndex(__dirname + "/rules");
module.exports.configs = {
recommended: {
plugins: ["react-hook-form"],
rules: {
"react-hook-form/destructuring-formstate": "error",
"react-hook-form/no-access-control": "error",
"react-hook-form/no-nested-object-setvalue": "error",
},
},
};