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>
);
}
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…