Skip to content

Commit

Permalink
WIP: switching to Node.js v18
Browse files Browse the repository at this point in the history
  • Loading branch information
slavas490 committed Aug 28, 2024
1 parent b42c869 commit 71af5ac
Show file tree
Hide file tree
Showing 8 changed files with 5,045 additions and 4,793 deletions.
6 changes: 6 additions & 0 deletions ui/core/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
22 changes: 12 additions & 10 deletions ui/core/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@ module.exports = {
root: true,
env: {
node: true,
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
browser: true,
commonjs: true,
es6: true,
jquery: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard'
'@vue/standard',
'eslint:recommended',
'plugin:prettier/recommended'
],
rules: {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-undef': 'off',
'no-useless-escape': 'off',
'vue/require-v-for-key': 'off',
'vue/valid-template-root': 'off',
'vue/no-mutating-props': ["error", {
"shallowOnly": true
'vue/no-mutating-props': ['error', {
shallowOnly: true
}],
'vue/multi-word-component-names': 'off',
'standard/no-callback-literal': 'off'
},
parserOptions: {
parser: 'babel-eslint'
parser: '@babel/eslint-parser'
}
}
29 changes: 20 additions & 9 deletions ui/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"@johmun/vue-tags-input": "^2.0.1",
"@mdi/font": "^7.4.47",
"@proxeus/wallet": "1.0.0",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-e2e-cypress": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"ajv": "^8.14.0",
"async": "^3.2.5",
"axios": "^1.6.8",
Expand All @@ -29,6 +33,7 @@
"flatpickr": "^4.5.1",
"font-awesome": "^4.7.0",
"handlebars": "^4.0.11",
"har-validator": "^5.1.5",
"he": "^1.2.0",
"html-svg-connect": "^2.0.0",
"human-standard-token-abi": "^2.0.0",
Expand All @@ -37,6 +42,7 @@
"jquery-ui": "^1.13.3",
"js-sha3": "^0.9.3",
"moment": "^2.30.1",
"node-polyfill-webpack-plugin": "^4.0.0",
"popper.js": "^1.14.4",
"sass": "^1.77.2",
"sortablejs": "^1.15.2",
Expand Down Expand Up @@ -78,25 +84,30 @@
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@cypress/webpack-preprocessor": "^4.1.5",
"@vue/cli-plugin-babel": "^4",
"@vue/cli-plugin-e2e-cypress": "^4",
"@vue/cli-plugin-eslint": "^4",
"@vue/cli-service": "^4",
"@vue/eslint-config-standard": "^5.1.2",
"@vue/cli-plugin-babel": "^5",
"@vue/cli-plugin-e2e-cypress": "^5",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "^5",
"@vue/eslint-config-standard": "^6.1.0",
"autoprefixer": "^9.0.1",
"babel-eslint": "^10.1.0",
"check-node-version": "^3.2.0",
"eslint": "^6.8.0",
"cypress": "^9.7.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^9.25.0",
"eslint-plugin-vue": "^9.27.0",
"file-loader": "^3.0.1",
"less": "^3.8.1",
"less-loader": "^4.1.0",
"postcss-loader": "^3.0.0",
"prettier": "^2.4.1",
"sass-loader": "^10.1.1",
"vue-template-compiler": "^2.7.16",
"webpack": "^4",
Expand Down
Empty file.
Empty file.
33 changes: 21 additions & 12 deletions ui/core/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const webpack = require('webpack')
const path = require('path')
const pluginVue = require('eslint-plugin-vue')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
assetsDir: 'static/assets/',
Expand Down Expand Up @@ -37,8 +39,7 @@ module.exports = {
devServer: {
port: 3005,
historyApiFallback: {
rewrites: [
{
rewrites: [{
from: /^\/init$/,
to: '/initial.html'
},
Expand Down Expand Up @@ -82,15 +83,15 @@ module.exports = {
}
},
chainWebpack: config => {

This comment has been minimized.

Copy link
@loleg

loleg Aug 30, 2024

Contributor

Was this commented out on purpose?

This comment has been minimized.

Copy link
@slavas490

slavas490 Sep 4, 2024

Author Contributor

we have to reinstall esling for the new version of webpack\vite. maybe we need to change the way of configuring this plugin as well

config.module
.rule('eslint')
.use('eslint-loader')
.loader('eslint-loader')
.tap(options => {
options.configFile = path.resolve(__dirname, '.eslintrc.js')
options.fix = true
return options
})
// config.module
// .rule('eslint')
// .use('eslint-loader')
// .loader('eslint-loader')
// .tap(options => {
// options.configFile = path.resolve(__dirname, '.eslintrc.js')
// options.fix = true
// return options
// })
// remove vue-cli-service error output
// config.plugins.delete('friendly-errors')
// remove vue-cli-service's progress output
Expand All @@ -110,6 +111,14 @@ module.exports = {
}

config.plugins.push(
new webpack.ProvidePlugin({ jQuery: 'jquery', $: 'jquery', 'window.jQuery': 'jquery' }))
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
'window.jQuery': 'jquery'
}))

config.plugins.push([
new NodePolyfillPlugin()
])
}
}
8 changes: 4 additions & 4 deletions ui/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^4.1.5",
"@vue/cli-plugin-babel": "^4",
"@vue/cli-plugin-e2e-cypress": "^4",
"@vue/cli-plugin-eslint": "^4",
"@vue/cli-service": "^4",
"@vue/cli-plugin-babel": "^5",
"@vue/cli-plugin-e2e-cypress": "^5",
"@vue/cli-plugin-eslint": "^5",
"@vue/cli-service": "^5",
"@vue/eslint-config-standard": "^5",
"autoprefixer": "^9.0.1",
"babel-eslint": "^10.0.1",
Expand Down
Loading

0 comments on commit 71af5ac

Please sign in to comment.