Skip to content

Commit 62b05b6

Browse files
authored
Merge pull request #258 from maslianok/v12.0.2
🎄 v12.0.2
2 parents f4b2264 + c856da8 commit 62b05b6

17 files changed

+2901
-1932
lines changed

.eslintignore

-4
This file was deleted.

.eslintrc

-25
This file was deleted.

.prettierrc.js

-7
This file was deleted.

.prettierrc.mjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @see https://prettier.io/docs/en/configuration.html
3+
* @type {import("prettier").Config}
4+
*/
5+
const config = {
6+
printWidth: 120,
7+
singleQuote: true,
8+
};
9+
10+
export default config;

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Handle element resizes like it's 2024!
1+
# Handle element resizes like it's 2025!
22

33
<img src="https://img.shields.io/npm/v/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/npm/l/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/npm/dm/react-resize-detector?style=flat-square" /> <img src="https://img.shields.io/bundlejs/size/react-resize-detector?style=flat-square" />
44

@@ -84,7 +84,7 @@ const CustomComponent = () => {
8484
handleHeight: false,
8585
refreshMode: 'debounce',
8686
refreshRate: 1000,
87-
onResize
87+
onResize,
8888
});
8989

9090
return <div ref={ref}>{`${width}x${height}`}</div>;
@@ -131,7 +131,7 @@ beforeEach(() => {
131131
window.ResizeObserver = jest.fn().mockImplementation(() => ({
132132
observe: jest.fn(),
133133
unobserve: jest.fn(),
134-
disconnect: jest.fn()
134+
disconnect: jest.fn(),
135135
}));
136136

137137
wrapper = mount(<MyComponent />);

eslint.config.mjs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import reactPlugin from 'eslint-plugin-react';
4+
import prettierConfig from 'eslint-config-prettier';
5+
6+
export default tseslint.config(
7+
{
8+
ignores: ['**/build/**', '**/playground/**'],
9+
},
10+
eslint.configs.recommended,
11+
tseslint.configs.recommended,
12+
reactPlugin.configs.flat.recommended,
13+
reactPlugin.configs.flat['jsx-runtime'],
14+
{
15+
settings: {
16+
react: {
17+
version: 'detect',
18+
},
19+
},
20+
},
21+
prettierConfig,
22+
);

package.json

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-resize-detector",
3-
"version": "12.0.1",
3+
"version": "12.0.2",
44
"description": "React resize detector",
55
"type": "module",
66
"exports": "./build/index.js",
@@ -14,7 +14,6 @@
1414
},
1515
"scripts": {
1616
"build": "rollup -c",
17-
"link": "npm link react react-dom",
1817
"prettier": "prettier --write .",
1918
"lint": "eslint . --fix",
2019
"fix": "npm run prettier && npm run lint",
@@ -25,22 +24,21 @@
2524
"lodash": "^4.17.21"
2625
},
2726
"devDependencies": {
28-
"@rollup/plugin-commonjs": "^28.0.1",
29-
"@rollup/plugin-node-resolve": "^15.3.0",
30-
"@rollup/plugin-typescript": "^12.1.1",
27+
"@rollup/plugin-commonjs": "^28.0.2",
28+
"@rollup/plugin-node-resolve": "^16.0.0",
29+
"@rollup/plugin-typescript": "^12.1.2",
3130
"@types/lodash": "^4.17.13",
32-
"@types/react": "^19.0.1",
31+
"@types/react": "^19.0.2",
3332
"@types/react-dom": "^19.0.2",
34-
"@typescript-eslint/eslint-plugin": "^7.18.0",
35-
"@typescript-eslint/parser": "^7.18.0",
36-
"eslint": "^8.57.1",
33+
"eslint": "^9.17.0",
3734
"eslint-config-prettier": "^9.1.0",
38-
"eslint-plugin-react": "^7.37.2",
35+
"eslint-plugin-react": "^7.37.3",
3936
"prettier": "^3.4.2",
40-
"rollup": "^4.28.1",
41-
"rollup-plugin-node-externals": "^7.1.3",
37+
"rollup": "^4.29.1",
38+
"rollup-plugin-node-externals": "^8.0.0",
4239
"tslib": "^2.8.1",
43-
"typescript": "^5.7.2"
40+
"typescript": "^5.7.2",
41+
"typescript-eslint": "^8.19.0"
4442
},
4543
"peerDependencies": {
4644
"react": "^18.0.0 || ^19.0.0"

playground/.eslintignore

-7
This file was deleted.

playground/eslint.config.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
import eslint from '@eslint/js';
22
import tseslint from 'typescript-eslint';
3-
import prettier from 'eslint-config-prettier';
3+
import reactPlugin from 'eslint-plugin-react';
4+
import prettierConfig from 'eslint-config-prettier';
45

5-
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, prettier);
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
tseslint.configs.recommended,
9+
reactPlugin.configs.flat.recommended,
10+
reactPlugin.configs.flat['jsx-runtime'],
11+
{
12+
settings: {
13+
react: {
14+
version: 'detect',
15+
},
16+
},
17+
},
18+
prettierConfig,
19+
);

playground/package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,23 @@
1212
},
1313
"dependencies": {
1414
"@radix-ui/themes": "^3.1.6",
15-
"lucide-react": "^0.468.0",
16-
"react": "^18.3.1",
17-
"react-dom": "^18.3.1",
15+
"lucide-react": "^0.469.0",
16+
"react": "^19.0.0",
17+
"react-dom": "^19.0.0",
1818
"react-resize-detector": "file:.."
1919
},
2020
"devDependencies": {
2121
"@types/node": "^22.10.2",
22-
"@types/react": "^18.3.3",
23-
"@types/react-dom": "^18.3.0",
22+
"@types/react": "^19.0.2",
23+
"@types/react-dom": "^19.0.2",
2424
"@vitejs/plugin-react": "^4.3.4",
25-
"eslint": "^8.57.1",
25+
"eslint": "^9.17.0",
2626
"eslint-config-prettier": "^9.1.0",
27+
"eslint-plugin-react": "^7.37.3",
2728
"linklocal": "^2.8.2",
2829
"prettier": "3.4.2",
2930
"typescript": "^5.7.2",
30-
"typescript-eslint": "^7.18.0",
31-
"vite": "^5.4.11"
31+
"typescript-eslint": "^8.19.0",
32+
"vite": "^6.0.6"
3233
}
3334
}

0 commit comments

Comments
 (0)