Skip to content

Commit 5935fa9

Browse files
committed
perf: upgrade all packages to latest
BREAKING CHANGE: Upgrade all the packages including react to the latest version
1 parent b726b8d commit 5935fa9

22 files changed

+1785
-2773
lines changed

.eslintignore

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

.eslintrc.js

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

.husky/pre-commit

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
1+
npm run test
42
npm run pre-commit

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"src/**/*.(ts|tsx)": ["eslint --fix", "prettier --write"]
3+
}

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
22
"singleQuote": true,
3-
"arrowParens": "avoid"
3+
"arrowParens": "avoid",
4+
"tabWidth": 2,
5+
"semi": true
46
}

config/webpack.common.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ module.exports = {
1010
entry: commonPaths.entryPath,
1111
module: {
1212
rules: [
13-
// {
14-
// enforce: 'pre',
15-
// test: /\.(js|jsx)$/,
16-
// loader: 'eslint-loader',
17-
// exclude: /(node_modules)/,
18-
// options: {
19-
// emitWarning: process.env.NODE_ENV !== 'production',
20-
// },
21-
// },
2213
{
2314
test: /\.tsx?$/,
2415
exclude: /(node_modules|\.webpack)/,

config/webpack.prod.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ module.exports = {
44
mode: 'production',
55
output: {
66
globalObject: 'self',
7-
filename: '[name].[hash].js',
7+
filename: '[name].[fullhash].js',
88
path: commonPaths.outputPath,
99
chunkFilename: '[name].[chunkhash].js',
1010
},
11-
1211
devtool: 'source-map',
1312
};

eslint.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import eslint from '@eslint/js';
2+
import tsESLint from 'typescript-eslint';
3+
import eslintConfigPrettier from 'eslint-config-prettier';
4+
import eslintPluginReact from 'eslint-plugin-react';
5+
6+
import globals from 'globals';
7+
8+
export default [
9+
eslint.configs.recommended,
10+
...tsESLint.configs.recommended,
11+
eslintConfigPrettier,
12+
eslintPluginReact.configs.flat.recommended,
13+
eslintPluginReact.configs.flat['jsx-runtime'],
14+
{
15+
ignores: ['config'],
16+
},
17+
{
18+
files: ['src/**/*.{ts,tsx}'],
19+
settings: {
20+
react: {
21+
version: 'detect',
22+
},
23+
},
24+
plugins: {
25+
react: eslintPluginReact,
26+
},
27+
languageOptions: {
28+
parserOptions: {
29+
ecmaFeatures: {
30+
jsx: true,
31+
},
32+
},
33+
globals: {
34+
...globals.browser,
35+
},
36+
},
37+
rules: {
38+
'react/jsx-uses-react': 'error',
39+
'react/jsx-uses-vars': 'error',
40+
'react/prop-types': 'off',
41+
},
42+
},
43+
];

jest.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
21
module.exports = {
32
preset: 'ts-jest',
43
testEnvironment: 'jsdom',
@@ -12,7 +11,6 @@ module.exports = {
1211
'!src/components/App/tabs.ts',
1312
'!src/helpers/const.ts',
1413
'!src/helpers/global.ts',
15-
'!src/reportWebVitals.ts',
1614
],
1715
coverageThreshold: {
1816
global: {

0 commit comments

Comments
 (0)