reactjs - How to disable ESLint react/prop-types rule in a file? -
i'm using react , eslint eslint-plugin-react. want disable prop-types rule in 1 file.
var react = require('react'); var model = require('./componentmodel'); var component = react.createclass({ /* eslint-disable react/prop-types */ proptypes: model.proptypes, /* eslint-enable react/prop-types */ render: function () { return ( <div classname="component"> {this.props.title} </div> ); } });
just put on top of file:
/* eslint react/prop-types: 0 */
Comments
Post a Comment