Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable rule require-default-props for the function react components; Change display-name rule to error #54

Merged
merged 11 commits into from
Feb 4, 2025
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.21.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add trailing space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 2.2.0

- Disable rule `require-default-props` for react components

## 2.1.0

- Restrict `enum` usage for typescript
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-yola",
"version": "2.1.0",
"version": "2.2.0-rc.sz.4",
"main": "index.js",
"scripts": {
"lint": "eslint -c .eslintrc.js ./",
7 changes: 1 addition & 6 deletions src/eslint-config-yola/react/rules/react.js
Original file line number Diff line number Diff line change
@@ -399,12 +399,7 @@ module.exports = {

// Enforce a defaultProps definition for every prop that is not a required prop
// https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md
'react/require-default-props': [
'error',
{
forbidDefaultForRequired: true,
},
],
'react/require-default-props': 'off',

// Forbids using non-exported propTypes
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
Loading