Skip to content

Commit 5f134f5

Browse files
authored
Merge pull request #415 from iamdarshshah/feat/upgrade-to-v7
chore: upgrade to React 17 with v7.0.0-beta.0 release
2 parents b48b0ae + 4039656 commit 5f134f5

30 files changed

+8255
-8905
lines changed

.all-contributorsrc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"files": [
33
"README.md"
44
],
5-
"imageSize": 100,
6-
"contributorsPerLine": 5,
5+
"imageSize": 80,
6+
"contributorsPerLine": 6,
77
"skipCi": true,
88
"contributors": [
99
{
@@ -25,7 +25,10 @@
2525
"avatar_url": "https://avatars.githubusercontent.com/u/25670841?v=4",
2626
"profile": "https://github.com/iamdarshshah",
2727
"contributions": [
28-
"infra"
28+
"infra",
29+
"code",
30+
"review",
31+
"maintenance"
2932
]
3033
}
3134
],

.eslintrc.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ module.exports = {
1414
'eslint:recommended',
1515
'plugin:@typescript-eslint/eslint-recommended',
1616
'plugin:react/recommended',
17+
'plugin:react/jsx-runtime',
1718
'plugin:@typescript-eslint/recommended',
1819
'plugin:@typescript-eslint/recommended-requiring-type-checking',
1920
'prettier',
20-
'prettier/@typescript-eslint',
21-
'prettier/react',
2221
],
22+
settings: {
23+
react: {
24+
version: '17.0',
25+
},
26+
},
2327
rules: {
24-
'@typescript-eslint/prefer-regexp-exec': 1,
25-
'@typescript-eslint/ban-ts-ignore': 0,
26-
'@typescript-eslint/unbound-method': 1,
28+
'@typescript-eslint/prefer-regexp-exec': 'warn',
29+
'@typescript-eslint/ban-ts-comment': 'off',
30+
'@typescript-eslint/unbound-method': 'warn',
31+
'@typescript-eslint/no-explicit-any': 'warn',
32+
'@typescript-eslint/no-unused-expressions': 'warn',
33+
'@typescript-eslint/no-unsafe-return': 'warn',
34+
'@typescript-eslint/no-unsafe-assignment': 'warn',
35+
'@typescript-eslint/no-unsafe-call': 'warn',
36+
'@typescript-eslint/no-unsafe-argument': 'warn',
37+
'@typescript-eslint/no-empty-object-type': 'warn',
38+
'react/no-deprecated': 'warn',
2739
},
2840
};

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ jobs:
3030
- name: Publish to npm
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
33-
run: npm publish --access public || true
33+
run: |
34+
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
35+
npm publish --access public --tag beta
36+
else
37+
npm publish --access public
38+
fi

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node-version: [16.x, 18.x, 20.x]
14+
node-version: [18.x, 20.x, 22.x]
1515

1616
steps:
1717
- uses: actions/checkout@v4

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn run ts-check && npx lint-staged

.storybook/addons.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

.storybook/config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

.storybook/main.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { StorybookConfig } from '@storybook/react-webpack5';
2+
3+
const config: StorybookConfig = {
4+
stories: [
5+
'../src/**/*.stories.@(js|jsx|ts|tsx)',
6+
'../src/stories/stories.tsx',
7+
],
8+
addons: ['@storybook/addon-essentials'],
9+
framework: {
10+
name: '@storybook/react-webpack5',
11+
options: {},
12+
},
13+
typescript: {
14+
check: false,
15+
reactDocgen: 'react-docgen-typescript',
16+
},
17+
};
18+
19+
export default config;

.storybook/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Preview } from '@storybook/react';
2+
3+
const preview: Preview = {
4+
parameters: {
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

.storybook/webpack.config.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)