Skip to content

Commit

Permalink
ADD: Format Check Action (#2033)
Browse files Browse the repository at this point in the history
* ADD: staking module for ejector, random EC in OneClickInstallation

* ADD: Format Check for Repo

* FIX: typo
  • Loading branch information
NeoPlays authored Sep 4, 2024
1 parent 44450ef commit 39b9023
Show file tree
Hide file tree
Showing 306 changed files with 3,076 additions and 5,886 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/code_quality_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code Quality Check

on:
pull_request:
branches: [main]

workflow_dispatch:

jobs:
prettier:
name: Prettier
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install
working-directory: ./launcher
- run: npm run format:check
working-directory: ./launcher
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vue3snippets.enable-compile-vue-file-on-did-save-code": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false
Expand Down
8 changes: 8 additions & 0 deletions launcher/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/.git
**/.svn
**/.hg
**/node_modules
**/coverage
**/dist
**/dist_electron
package-lock.json
4 changes: 2 additions & 2 deletions launcher/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"printWidth": 120,
"printWidth": 140,
"useTabs": false
}
}
17 changes: 6 additions & 11 deletions launcher/customsign.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
'use strict';
"use strict";

// custom sign script calling digicerts keytool from out of the electron-builder
exports.default = async function(configuration) {

if(configuration.path){

require("child_process").execSync(
`smctl sign --keypair-alias=${process.env.KEYPAIR_ALIAS} --input "${String(configuration.path)}"`
);

}
};
exports.default = async function (configuration) {
if (configuration.path) {
require("child_process").execSync(`smctl sign --keypair-alias=${process.env.KEYPAIR_ALIAS} --input "${String(configuration.path)}"`);
}
};
3 changes: 2 additions & 1 deletion launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"lint:fix": "eslint --ext .js,.vue --ignore-path ../.gitignore --fix src",
"stereum": "concurrently \"npm:electron:serve\" \"npm:watch:css\"",
"backend:watch": "nodemon --watch 'src/backend' --exec 'npm run electron:serve'",
"format": "prettier . --write"
"format": "prettier . --write",
"format:check": "prettier . --check"
},
"dependencies": {
"@headlessui/vue": "^1.7.16",
Expand Down
4 changes: 2 additions & 2 deletions launcher/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please
enable it to continue.</strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
Expand Down
Loading

0 comments on commit 39b9023

Please sign in to comment.