Is there a way to add a rule into eslintrc where by every .js or .jsx file in a src folder must contain proptypes and/or defaultprops, and if it doesnt, an error is thrown.
In your .eslintrc file you need to add the following lines:
plugins: [
'react',
],
rules: {
'react/prop-types': ['error'],
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With