Sometimes, we want to fix ESLint error missing in props validation with React
In this article, we’ll look at how to fix ESLint error missing in props validation with React.
How to fix ESLint error missing in props validation with React?
To fix ESLint error missing in props validation with React, we can add a comment or disable the rule globally with a config.
For instance, we write
/* eslint-disable react/prop-types */
to disable prop type check for the line immediately below the comment in our code.
Or we can add
{
//...
"rules": {
"react/prop-types": "off"
}
//...
}
in .eslintrc to disable the prop type validation rule for the whole project.
Conclusion
To fix ESLint error missing in props validation with React, we can add a comment or disable the rule globally with a config.