Skip to content

Commit 68e1b03

Browse files
authored
feat: modules update (#18)
- updated npm dependencies - migrated to eslint 9
1 parent c98ab10 commit 68e1b03

File tree

5 files changed

+128
-90
lines changed

5 files changed

+128
-90
lines changed

.eslintignore

-4
This file was deleted.

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.16.0
1+
v22.0.0

eslint.config.mjs

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import globals from 'globals'
2+
import react from 'eslint-plugin-react'
3+
import prettier from 'eslint-plugin-prettier'
4+
import typescriptEslint from '@typescript-eslint/eslint-plugin'
5+
import { fixupPluginRules } from '@eslint/compat'
6+
import tsParser from '@typescript-eslint/parser'
7+
8+
export default [
9+
{
10+
ignores: ['**/node_modules', '**/dist', '**/webpack']
11+
},
12+
{
13+
files: ['*.ts', '*.tsx'],
14+
plugins: {
15+
prettier,
16+
'@typescript-eslint': typescriptEslint,
17+
react: fixupPluginRules(react)
18+
},
19+
languageOptions: {
20+
globals: {
21+
...globals.browser,
22+
...globals.jest
23+
},
24+
parser: tsParser,
25+
ecmaVersion: 'latest',
26+
sourceType: 'module',
27+
parserOptions: {
28+
ecmaFeatures: {
29+
jsx: true
30+
}
31+
}
32+
},
33+
settings: {
34+
react: {
35+
version: 'detect'
36+
}
37+
}
38+
}]

package.json

+88-85
Original file line numberDiff line numberDiff line change
@@ -18,116 +18,119 @@
1818
"postinstall": "husky install",
1919
"prettier": "prettier --write \"src/**/*.{ts,tsx,html,css,scss}\"",
2020
"lint": "run-p lint:**",
21-
"lint:script": "eslint --fix --cache --quiet --ext .ts,.tsx ./",
21+
"lint:script": "eslint --fix --cache --quiet ./",
2222
"lint:style": "stylelint --fix \"src/**/*.{css,scss}\"",
2323
"analyze": "npx webpack-bundle-analyzer dist/client/analyze.json",
2424
"setup": "sh setup.sh"
2525
},
2626
"dependencies": {
27-
"@babel/runtime": "7.22.11",
28-
"@loadable/component": "^5.15.3",
29-
"@loadable/server": "5.16.1",
30-
"classnames": "^2.3.2",
31-
"core-js": "^3.32.1",
32-
"dotenv": "^16.3.1",
27+
"@babel/runtime": "7.24.7",
28+
"@loadable/component": "^5.16.4",
29+
"@loadable/server": "5.16.5",
30+
"classnames": "^2.5.1",
31+
"core-js": "^3.37.1",
32+
"dotenv": "^16.4.5",
3333
"morgan": "^1.10.0",
34-
"postcss": "^8.4.28",
35-
"react": "^18.2.0",
36-
"react-dom": "^18.2.0",
37-
"react-helmet-async": "^2.0.4",
38-
"react-router": "^6.15.0",
39-
"react-router-dom": "^6.15.0",
40-
"reflect-metadata": "^0.1.13",
41-
"uuid": "^9.0.1",
42-
"winston": "^3.10.0",
43-
"workbox-window": "^7.0.0",
44-
"yup": "^1.3.3"
34+
"postcss": "^8.4.39",
35+
"react": "^18.3.1",
36+
"react-dom": "^18.3.1",
37+
"react-helmet-async": "^2.0.5",
38+
"react-router": "^6.24.1",
39+
"react-router-dom": "^6.24.1",
40+
"reflect-metadata": "^0.2.2",
41+
"uuid": "^10.0.0",
42+
"winston": "^3.13.0",
43+
"workbox-window": "^7.1.0",
44+
"yup": "^1.4.0"
4545
},
4646
"devDependencies": {
47-
"@babel/cli": "7.22.10",
48-
"@babel/core": "7.22.11",
49-
"@babel/plugin-proposal-decorators": "^7.22.10",
50-
"@babel/plugin-transform-runtime": "^7.22.10",
51-
"@babel/preset-env": "7.22.10",
52-
"@babel/preset-react": "^7.22.5",
53-
"@babel/preset-typescript": "^7.22.11",
54-
"@babel/register": "7.22.5",
47+
"@babel/cli": "7.24.7",
48+
"@babel/core": "7.24.7",
49+
"@babel/plugin-proposal-decorators": "^7.24.7",
50+
"@babel/plugin-transform-runtime": "^7.24.7",
51+
"@babel/preset-env": "7.24.7",
52+
"@babel/preset-react": "^7.24.7",
53+
"@babel/preset-typescript": "^7.24.7",
54+
"@babel/register": "7.24.6",
55+
"@eslint/compat": "^1.1.0",
5556
"@loadable/babel-plugin": "5.16.1",
5657
"@loadable/webpack-plugin": "^5.15.2",
57-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
58+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
5859
"@svgr/webpack": "^8.1.0",
59-
"@testing-library/dom": "^9.3.1",
60-
"@testing-library/jest-dom": "^6.1.2",
61-
"@testing-library/react": "^14.0.0",
62-
"@testing-library/user-event": "^14.4.3",
60+
"@testing-library/dom": "^10.3.1",
61+
"@testing-library/jest-dom": "^6.4.6",
62+
"@testing-library/react": "^16.0.0",
63+
"@testing-library/user-event": "^14.5.2",
6364
"@types/classnames": "^2.3.0",
64-
"@types/express": "^4.17.17",
65-
"@types/jest": "^29.5.4",
66-
"@types/loadable__component": "^5.13.4",
67-
"@types/loadable__server": "^5.12.6",
68-
"@types/loadable__webpack-plugin": "^5.7.3",
65+
"@types/express": "^4.17.21",
66+
"@types/jest": "^29.5.12",
67+
"@types/loadable__component": "^5.13.9",
68+
"@types/loadable__server": "^5.12.11",
69+
"@types/loadable__webpack-plugin": "^5.7.6",
6970
"@types/mini-css-extract-plugin": "^2.5.0",
70-
"@types/morgan": "^1.9.5",
71-
"@types/node": "^20.5.6",
72-
"@types/react-dom": "^18.2.7",
71+
"@types/morgan": "^1.9.9",
72+
"@types/node": "^20.14.10",
73+
"@types/react-dom": "^18.3.0",
7374
"@types/react-router-dom": "^5.3.3",
74-
"@types/require-from-string": "^1.2.1",
75-
"@types/serve-favicon": "^2.5.4",
76-
"@types/uuid": "^9.0.8",
77-
"@types/webpack-env": "^1.18.1",
78-
"@types/webpack-node-externals": "^3.0.0",
75+
"@types/require-from-string": "^1.2.3",
76+
"@types/serve-favicon": "^2.5.7",
77+
"@types/uuid": "^10.0.0",
78+
"@types/webpack-env": "^1.18.5",
79+
"@types/webpack-node-externals": "^3.0.4",
7980
"@types/webpack-stats-plugin": "^0.3.5",
80-
"@typescript-eslint/eslint-plugin": "^6.4.1",
81-
"@typescript-eslint/parser": "^6.4.1",
82-
"autoprefixer": "^10.4.15",
81+
"@typescript-eslint/eslint-plugin": "^7.15.0",
82+
"@typescript-eslint/parser": "^7.15.0",
83+
"autoprefixer": "^10.4.19",
8384
"babel-loader": "^9.1.3",
84-
"copy-webpack-plugin": "^11.0.0",
85+
"copy-webpack-plugin": "^12.0.2",
8586
"cross-env": "^7.0.3",
86-
"css-loader": "6.8.1",
87-
"cssnano": "^6.0.1",
88-
"eslint": "^8.48.0",
89-
"eslint-plugin-prettier": "^5.0.0",
90-
"eslint-plugin-react": "^7.33.2",
91-
"express": "^4.18.2",
92-
"fork-ts-checker-webpack-plugin": "^8.0.0",
93-
"html-loader": "^4.2.0",
94-
"html-webpack-plugin": "^5.5.3",
95-
"husky": "^8.0.3",
87+
"css-loader": "7.1.2",
88+
"cssnano": "^7.0.4",
89+
"eslint": "^9.6.0",
90+
"eslint-plugin-prettier": "^5.1.3",
91+
"eslint-plugin-react": "^7.34.3",
92+
"eslint-plugin-react-compiler": "^0.0.0-experimental-0998c1e-20240625",
93+
"express": "^4.19.2",
94+
"fork-ts-checker-webpack-plugin": "^9.0.2",
95+
"globals": "^15.8.0",
96+
"html-loader": "^5.0.0",
97+
"html-webpack-plugin": "^5.6.0",
98+
"husky": "^9.0.11",
9699
"identity-obj-proxy": "^3.0.0",
97-
"jest": "^29.6.4",
98-
"jest-environment-jsdom": "^29.6.4",
99-
"lint-staged": "^14.0.1",
100-
"mini-css-extract-plugin": "^2.7.6",
101-
"nodemon": "^3.0.1",
100+
"jest": "^29.7.0",
101+
"jest-environment-jsdom": "^29.7.0",
102+
"lint-staged": "^15.2.7",
103+
"mini-css-extract-plugin": "^2.9.0",
104+
"nodemon": "^3.1.4",
102105
"npm-run-all": "^4.1.5",
103-
"postcss-loader": "^7.3.3",
104-
"postcss-scss": "^4.0.7",
105-
"prettier": "^3.0.2",
106-
"react-refresh": "^0.14.0",
106+
"postcss-loader": "^8.1.1",
107+
"postcss-scss": "^4.0.9",
108+
"prettier": "^3.3.2",
109+
"react-refresh": "^0.14.2",
107110
"require-from-string": "^2.0.2",
108-
"rimraf": "^5.0.1",
109-
"sass": "^1.66.1",
110-
"sass-loader": "^13.3.2",
111+
"rimraf": "^5.0.8",
112+
"sass": "^1.77.6",
113+
"sass-loader": "^14.2.1",
111114
"serve-favicon": "^2.5.0",
112-
"stylelint": "^15.10.3",
115+
"stylelint": "^16.6.1",
113116
"stylelint-config-prettier": "^9.0.5",
114-
"stylelint-config-standard-scss": "^10.0.0",
115-
"stylelint-order": "^6.0.3",
116-
"ts-jest": "^29.1.1",
117-
"ts-node": "^10.9.1",
117+
"stylelint-config-standard-scss": "^13.1.0",
118+
"stylelint-order": "^6.0.4",
119+
"ts-jest": "^29.1.5",
120+
"ts-node": "^10.9.2",
118121
"tsconfig-paths-webpack-plugin": "^4.1.0",
119-
"typescript": "^5.2.2",
120-
"webpack": "^5.88.2",
122+
"typescript": "^5.5.3",
123+
"webpack": "^5.92.1",
121124
"webpack-cli": "^5.1.4",
122-
"webpack-dev-middleware": "^6.1.1",
123-
"webpack-dev-server": "^4.15.1",
124-
"webpack-hot-middleware": "2.25.4",
125+
"webpack-dev-middleware": "^7.2.1",
126+
"webpack-dev-server": "^5.0.4",
127+
"webpack-hot-middleware": "2.26.1",
125128
"webpack-node-externals": "^3.0.0",
126129
"webpack-stats-plugin": "^1.1.3",
127-
"workbox-precaching": "^7.0.0",
128-
"workbox-recipes": "^7.0.0",
129-
"workbox-routing": "^7.0.0",
130-
"workbox-strategies": "^7.0.0",
131-
"workbox-webpack-plugin": "^7.0.0"
130+
"workbox-precaching": "^7.1.0",
131+
"workbox-recipes": "^7.1.0",
132+
"workbox-routing": "^7.1.0",
133+
"workbox-strategies": "^7.1.0",
134+
"workbox-webpack-plugin": "^7.1.0"
132135
}
133136
}

webpack/rules/styles.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const cssRule = {
99
...cssLoader,
1010
options: {
1111
modules: {
12+
namedExport: false,
1213
exportLocalsConvention: 'camelCaseOnly',
1314
localIdentName: '[local]__[contenthash:base64:5]'
1415
}

0 commit comments

Comments
 (0)