Skip to content

Commit 74c44d6

Browse files
authored
Merge pull request #668 from YoungHypo/issue-test_dashboard_node
upgrade CI test node to 20.15 and eslint to v8
2 parents 1628d33 + dee4f38 commit 74c44d6

File tree

4 files changed

+58
-14
lines changed

4 files changed

+58
-14
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,7 @@ deno.lock
255255

256256
# test postman
257257
tests/postman/env.json
258-
tests/postman/junitResult.xml
258+
tests/postman/junitResult.xml
259+
260+
# Postgres
261+
pgdata/

src/dashboard/.eslintrc.js

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@
22
SPDX-License-Identifier: Apache-2.0
33
*/
44
module.exports = {
5-
parser: 'babel-eslint',
5+
parser: '@babel/eslint-parser',
6+
parserOptions: {
7+
requireConfigFile: false,
8+
babelOptions: {
9+
presets: ['@babel/preset-react'],
10+
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]],
11+
},
12+
ecmaFeatures: {
13+
legacyDecorators: true,
14+
},
15+
},
616
extends: ['airbnb', 'prettier', 'plugin:compat/recommended'],
17+
plugins: ['react-hooks'],
718
env: {
819
browser: true,
920
node: true,
@@ -37,8 +48,34 @@ module.exports = {
3748
'jsx-a11y/anchor-is-valid': 0,
3849
'linebreak-style': 0,
3950
'prefer-destructuring': 0,
51+
'react/jsx-props-no-spreading': 0,
52+
'react/function-component-definition': 0,
53+
'react/react-in-jsx-scope': 0,
54+
'react-hooks/rules-of-hooks': 'off',
55+
'react-hooks/exhaustive-deps': 'warn',
56+
'import/extensions': 0,
57+
'react/state-in-constructor': 0,
58+
'react/static-property-placement': 0,
59+
'class-methods-use-this': 0,
60+
'react/jsx-fragments': 0,
61+
'react/jsx-no-useless-fragment': 0,
62+
'react/no-arrow-function-lifecycle': 0,
63+
'react/no-unstable-nested-components': 0,
64+
'react/no-unused-class-component-methods': 0,
65+
'arrow-body-style': 0,
66+
'no-useless-catch': 0,
67+
'compat/compat': 0,
68+
'import/order': 0,
69+
'react/jsx-curly-brace-presence': 0,
70+
'default-case-last': 0,
71+
'prefer-regex-literals': 0,
4072
},
4173
settings: {
4274
polyfills: ['fetch', 'promises', 'url', 'object-assign'],
75+
'import/resolver': {
76+
node: {
77+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
78+
},
79+
},
4380
},
4481
};

src/dashboard/package.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@
5454
"@ant-design/icons": "^4.1.0",
5555
"@ant-design/pro-layout": "^5.0.0",
5656
"@antv/data-set": "^0.10.1",
57+
"@babel/core": "^7.26.10",
58+
"@babel/plugin-proposal-decorators": "^7.25.9",
5759
"antd": "^4.2.5",
5860
"bizcharts": "3.5.3",
5961
"bizcharts-plugin-slider": "^2.1.1-beta.1",
6062
"body-parser": "^1.19.0",
6163
"cello-paginator": "^1.0.1",
6264
"classnames": "^2.2.6",
6365
"enquire-js": "^0.2.1",
66+
"eslint-plugin-react-hooks": "^5.2.0",
6467
"express": "^4.16.4",
6568
"gg-editor": "^2.0.2",
6669
"lodash": "^4.17.11",
@@ -90,28 +93,29 @@
9093
"validator": "^13.7.0"
9194
},
9295
"devDependencies": {
96+
"@babel/eslint-parser": "^7.22.15",
97+
"@babel/preset-react": "^7.22.15",
9398
"@types/history": "^4.7.2",
9499
"@types/react": "^16.8.1",
95100
"@types/react-dom": "^16.0.11",
96101
"glob": "^9.0.0",
97102
"@umijs/preset-react": "^1.2.2",
98103
"antd-pro-merge-less": "^1.0.0",
99104
"antd-theme-webpack-plugin": "^1.2.0",
100-
"babel-eslint": "^10.0.1",
101105
"chalk": "^2.4.2",
102106
"check-prettier": "^1.0.1",
103107
"cross-env": "^5.2.0",
104108
"cross-port-killer": "^1.0.1",
105109
"enzyme": "^3.9.0",
106-
"eslint": "^5.13.0",
107-
"eslint-config-airbnb": "^17.1.0",
108-
"eslint-config-prettier": "^4.1.0",
109-
"eslint-plugin-babel": "^5.3.0",
110-
"eslint-plugin-compat": "^2.6.3",
111-
"eslint-plugin-import": "2.20.1",
112-
"eslint-plugin-jsx-a11y": "^6.2.1",
113-
"eslint-plugin-markdown": "^2.2.0",
114-
"eslint-plugin-react": "^7.12.4",
110+
"eslint": "^8.53.0",
111+
"eslint-config-airbnb": "^19.0.4",
112+
"eslint-config-prettier": "^9.0.0",
113+
"eslint-plugin-babel": "^5.3.1",
114+
"eslint-plugin-compat": "^4.2.0",
115+
"eslint-plugin-import": "^2.29.0",
116+
"eslint-plugin-jsx-a11y": "^6.7.1",
117+
"eslint-plugin-markdown": "^3.0.1",
118+
"eslint-plugin-react": "^7.33.2",
115119
"faker": "^4.1.0",
116120
"gh-pages": "^6.1.1",
117121
"husky": "^4.2.5",

tests/dashboard/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: '3.2'
22
services:
33
test-dashboard:
4-
image: node:14.18
4+
image: node:20.15
55
volumes:
66
- $ROOT_PATH/src/dashboard:/dashboard
77
working_dir: /dashboard
8-
command: bash -c "npm i && npm run lint"
8+
command: bash -c "yarn && yarn lint"

0 commit comments

Comments
 (0)