Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v5.0.0

- `allowComponentDidCatch` has been replaced with `allowErrorBoundary`. Like `allowComponentDidCatch`, `allowErrorBoundary` defaults to true, but `allowErrorBoundary` allows class components that use `componentDidCatch` and/or `getDerivedStateFromError`. No change is required if you're using the defaults for this lint rule. If you've disabled `allowComponentDidCatch`, you'll need to make the following change:

```diff
rules: {
"react-prefer-function-component/react-prefer-function-component": [
"error",
- { allowComponentDidCatch: false },
+ { allowErrorBoundary: false },
],
},
```

See [#29](https://github.com/tatethurston/eslint-plugin-react-prefer-function-component/pull/29), thanks @henryqdineen!

## v4.0.1

- Fix flat config issue. See [#23](https://github.com/tatethurston/eslint-plugin-react-prefer-function-component/pull/23). Thanks @MariaSolOs!
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"license": "ISC",
"main": "index.js",
"devDependencies": {
"eslint": "^9.22.0",
"eslint-plugin-react": "^7.37.4",
"eslint": "9.37.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-prefer-function-component": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions examples/flat-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"license": "ISC",
"main": "index.js",
"devDependencies": {
"eslint": "^9.22.0",
"eslint-plugin-react": "^7.37.4",
"eslint": "9.37.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-prefer-function-component": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions examples/recommended-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"license": "ISC",
"main": "index.js",
"devDependencies": {
"eslint": "^9.22.0",
"eslint-plugin-react": "^7.37.4",
"eslint": "9.37.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-prefer-function-component": "workspace:*"
}
}
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@types/estree": "^1.0.6",
"@types/node": "^22.13.10",
"@typescript-eslint/eslint-plugin": "^8.27.0",
"@typescript-eslint/parser": "^8.27.0",
"@types/estree": "^1.0.8",
"@types/node": "^22.19.1",
"@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.48.0",
"@vitest/coverage-v8": "3.0.9",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-react": "^7.37.4",
"eslint": "9.37.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"husky": "^9.1.7",
"prettier": "^3.5.3",
"prettier": "^3.7.1",
"prettier-package-json": "^2.8.0",
"typescript": "^5.8.2",
"vitest": "^3.0.9"
"typescript": "^5.9.3",
"vitest": "^3.2.4"
},
"packageManager": "pnpm@8.6.9"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-prefer-function-component",
"version": "4.0.1",
"version": "5.0.0",
"description": "ESLint plugin that prevents the use of JSX class components",
"license": "MIT",
"author": "Tate <tatethurston@gmail.com>",
Expand Down Expand Up @@ -30,7 +30,7 @@
"lint jsx class"
],
"devDependencies": {
"eslint": "^9.22.0"
"eslint": "9.37.0"
},
"exports": {
"./package.json": "./package.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/flat-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"eslint": "^9.22.0",
"eslint": "9.37.0",
"eslint-plugin-react-prefer-function-component": "workspace:^"
}
}
Loading