I'm using React
and ESLint
with eslint-plugin-react
.
I want to disable
the prop-types
rule in one 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 this on top of your file: