Skip to content

Commit

Permalink
ui: update all packages to latest
Browse files Browse the repository at this point in the history
* update eslint to 9.x
* node.js 20.9 is required

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Aug 18, 2024
1 parent 628212e commit 7617fcf
Show file tree
Hide file tree
Showing 20 changed files with 996 additions and 887 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ dist-ssr
.cache

oui-ui-core/htdoc/src/applications

.eslintcache
8 changes: 4 additions & 4 deletions applications/oui-app-acl/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-backup/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vicons/antd": "^0.12.0",
"@vicons/carbon": "^0.12.0",
"@vicons/fa": "^0.12.0",
Expand All @@ -13,9 +13,9 @@
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-demo/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vicons/antd": "^0.12.0",
"@vicons/carbon": "^0.12.0",
"@vicons/fa": "^0.12.0",
Expand All @@ -13,9 +13,9 @@
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-dhcp-lease/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-home/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-layout/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vicons/antd": "^0.12.0",
"@vicons/carbon": "^0.12.0",
"@vicons/fa": "^0.12.0",
Expand All @@ -13,9 +13,9 @@
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-login/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-stations/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-system/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-upgrade/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
8 changes: 4 additions & 4 deletions applications/oui-app-user/htdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"build": "vite build"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.4",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.1",
"vite-plugin-compression": "^0.5.1",
"vue-i18n": "^9.9.1"
"vue-i18n": "^9.14.0"
}
}
2 changes: 1 addition & 1 deletion docs/src/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ OUI --->
```

::: tip
The `Node.js 18+` is required to compile Oui.
The `Node.js 20.9+` is required to compile Oui.

Select `Use existing nodejs installation on the host system` to reduce compilation time.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/zh/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ OUI --->
```

::: tip
编译 Oui 需要用到 Node,而且版本不能低于 18
编译 Oui 需要用到 Node,而且版本不能低于 20.9

勾选 `Use existing nodejs installation on the host system` 可节约编译时间,需要确保主机上安装的 Node 版本不低于 18
勾选 `Use existing nodejs installation on the host system` 可节约编译时间,需要确保主机上安装的 Node 版本不低于 20.9

你可以使用 [nvm](https://github.com/nvm-sh/nvm) 管理多个 Node 版本。
:::
Expand Down
2 changes: 1 addition & 1 deletion oui-ui-core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ define Package/oui-ui-core/conffiles
endef

define Build/Prepare
$(call CheckNode,18)
$(call CheckNode,20.9)
$(CP) ./htdoc $(PKG_BUILD_DIR)
echo "VITE_OUI_LOGIN_VIEW=$(CONFIG_OUI_LOGIN_VIEW)" > $(PKG_BUILD_DIR)/htdoc/.env.local
echo "VITE_OUI_LAYOUT_VIEW=$(CONFIG_OUI_LAYOUT_VIEW)" >> $(PKG_BUILD_DIR)/htdoc/.env.local
Expand Down
46 changes: 0 additions & 46 deletions oui-ui-core/htdoc/.eslintrc.js

This file was deleted.

37 changes: 37 additions & 0 deletions oui-ui-core/htdoc/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'

export default [
{files: ['**/*.{js,mjs,cjs,vue}']},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...pluginVue.configs['flat/essential'],
{
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/no-multiple-template-root': 'off',
'vue/multi-word-component-names': 'off',
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'brace-style': 'error',
'comma-dangle': 'error',
'comma-spacing': 'error',
'keyword-spacing': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'space-before-function-paren': ['error', 'never'],
'space-infix-ops': ['error', {'int32Hint': false}],
'arrow-spacing': 'error',
'no-var': 'error',
'no-duplicate-imports': 'error',
'space-before-blocks': 'error',
'space-in-parens': ['error', 'never'],
'no-multi-spaces': 'error',
'eqeqeq': 'error',
'indent': ['error', 2],
'semi': ['error', 'never']
}
}
]
Loading

0 comments on commit 7617fcf

Please sign in to comment.