Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 7add165

Browse files
committed
Linting
1 parent 34098f5 commit 7add165

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+14881
-13413
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ root = true
22

33
[*]
44
charset = utf-8
5-
indent_style = space
6-
indent_size = 4
75
end_of_line = lf
86
insert_final_newline = true
97
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
11
module.exports = {
2-
root: true,
3-
parserOptions: {
4-
parser: "babel-eslint",
5-
},
6-
env: {
7-
node: true,
8-
browser: true
9-
},
10-
extends: [
11-
"plugin:vue/recommended",
12-
"eslint:recommended",
13-
"prettier/vue",
14-
"plugin:prettier/recommended"
15-
],
16-
// required to lint *.vue files
17-
plugins: [
18-
"vue"
19-
],
20-
globals: {
21-
"ga": true, // Google Analytics
22-
"cordova": true,
23-
"__statics": true
24-
},
25-
// add your custom rules here
26-
"rules": {
27-
// allow debugger during development
28-
"vue/component-name-in-template-casing": ["error", "PascalCase"],
29-
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
30-
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
31-
}
32-
}
2+
root: true,
3+
parserOptions: {
4+
parser: "babel-eslint"
5+
},
6+
env: {
7+
node: true,
8+
browser: true
9+
},
10+
extends: ["plugin:prettier/recommended", "plugin:vue/recommended", "eslint:recommended", "prettier/vue"],
11+
// required to lint *.vue files
12+
plugins: ["vue"],
13+
globals: {
14+
__statics: true,
15+
__ryo_bin: true
16+
},
17+
// add your custom rules here
18+
rules: {
19+
// allow debugger during development
20+
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
21+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
22+
"vue/component-name-in-template-casing": ["error", "PascalCase"]
23+
}
24+
};

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2+
23
name: Bug report
34
about: Create a report to help us improve
4-
title: ''
5+
title: ""
56
labels: bug
6-
assignees: ''
7-
8-
---
9-
10-
**Describe the bug**
7+
assignees: ""
8+
---**Describe the bug**
119
A clear and concise description of what the bug is.
1210

1311
**To Reproduce**
@@ -17,5 +15,6 @@ Steps to reproduce the behavior:
1715
If applicable, add screenshots or Log files to help explain your problem.
1816

1917
**Desktop (please complete the following information):**
20-
- OS: [e.g. Ubuntu 16.04, Windows 10]
21-
- Version of Wallet or Git commit hash
18+
19+
- OS: [e.g. Ubuntu 16.04, Windows 10]
20+
- Version of Wallet or Git commit hash

.github/workflows/build.yml

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,78 @@
1-
21
name: Loki Electron Wallet Build
32

43
on:
5-
push:
6-
branches:
7-
- master
4+
push:
5+
branches:
6+
- master
87

98
jobs:
10-
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [windows-latest, macos-latest, ubuntu-latest]
16-
steps:
17-
- name: Checkout git repo
18-
uses: actions/checkout@v1
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [windows-latest, macos-latest, ubuntu-latest]
15+
steps:
16+
- name: Checkout git repo
17+
uses: actions/checkout@v1
1918

20-
- name: Install node
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: "11.9.0"
19+
- name: Install node
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: "11.9.0"
2423

25-
- name: Install dependencies
26-
run: npm install
24+
- name: Install dependencies
25+
run: npm install
2726

28-
- name: Download lokid binaries
29-
run: node ./build/download-binaries.js
27+
- name: Download lokid binaries
28+
run: node ./build/download-binaries.js
3029

31-
- name: Extract zip binaries
32-
if: runner.os != 'Linux'
33-
run: unzip latest.zip
34-
shell: bash
35-
working-directory: ./downloads
30+
- name: Extract zip binaries
31+
if: runner.os != 'Linux'
32+
run: unzip latest.zip
33+
shell: bash
34+
working-directory: ./downloads
3635

37-
- name: Extract xz binaries
38-
if: runner.os == 'Linux'
39-
run: tar -xf latest.xz
40-
shell: bash
41-
working-directory: ./downloads
36+
- name: Extract xz binaries
37+
if: runner.os == 'Linux'
38+
run: tar -xf latest.xz
39+
shell: bash
40+
working-directory: ./downloads
4241

43-
- name: Move lokid binaries
44-
run: |
45-
find ./downloads -type f -name "lokid*" -exec cp '{}' ./bin \;
46-
find ./downloads -type f -name "loki-wallet-rpc*" -exec cp '{}' ./bin \;
47-
shell: bash
42+
- name: Move lokid binaries
43+
run: |
44+
find ./downloads -type f -name "lokid*" -exec cp '{}' ./bin \;
45+
find ./downloads -type f -name "loki-wallet-rpc*" -exec cp '{}' ./bin \;
46+
shell: bash
4847

49-
- name: Verify binaries
50-
run: ls ./bin
51-
shell: bash
48+
- name: Verify binaries
49+
run: ls ./bin
50+
shell: bash
5251

53-
- name: Publish window and linux binaries
54-
if: runner.os != 'macOS'
55-
run: npm run release
56-
env:
57-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Publish window and linux binaries
53+
if: runner.os != 'macOS'
54+
run: npm run release
55+
env:
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5857

59-
- name: Publish mac binaries
60-
if: runner.os == 'macOS'
61-
run: npm run release
62-
env:
63-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64-
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
65-
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
66-
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
67-
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
68-
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
58+
- name: Publish mac binaries
59+
if: runner.os == 'macOS'
60+
run: npm run release
61+
env:
62+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
64+
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
65+
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
66+
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
67+
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
6968

70-
- name: Remove un-needed artifacts
71-
run: rm -r -- ./*/
72-
shell: bash
73-
working-directory: ./dist/electron-mat/Packaged
69+
- name: Remove un-needed artifacts
70+
run: rm -r -- ./*/
71+
shell: bash
72+
working-directory: ./dist/electron-mat/Packaged
7473

75-
- name: Upload artifacts
76-
uses: actions/upload-artifact@v1
77-
with:
78-
name: ${{ runner.OS }}
79-
path: dist/electron-mat/Packaged
74+
- name: Upload artifacts
75+
uses: actions/upload-artifact@v1
76+
with:
77+
name: ${{ runner.OS }}
78+
path: dist/electron-mat/Packaged

.postcssrc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// https://github.com/michael-ciniawsky/postcss-load-config
22

33
module.exports = {
4-
plugins: [
5-
// to edit target browsers: use "browserslist" field in package.json
6-
require("autoprefixer")
7-
]
8-
}
4+
plugins: [
5+
// to edit target browsers: use "browserslist" field in package.json
6+
require("autoprefixer")
7+
]
8+
};

.prettierignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.quasar
2+
.DS_Store
3+
.thumbs.db
4+
node_modules
5+
/dist
6+
/src-cordova/platforms
7+
/src-cordova/plugins
8+
/src-cordova/www
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# Editor directories and files
14+
.idea
15+
.vscode
16+
*.suo
17+
*.ntvs*
18+
*.njsproj
19+
*.sln
20+
*~
21+
\#*\#
22+
.\#*
23+
*.bak
24+
25+
# bin dir
26+
bin/*
27+
!bin/.gitkeep
28+
29+
.env
30+
31+
/downloads
32+
33+
/src/validators/address_tools.js

.prettierrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
printWidth: 120
3+
};

BUILDING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ base64 -i certificate.p12 -o encoded.txt
2626
3. In the left sidebar, click **Secrets**.
2727
4. Add the following secrets:
2828
1. Certificate
29-
* Name: `MAC_CERTIFICATE`
30-
* Value: The encoded Base64 certificate
29+
- Name: `MAC_CERTIFICATE`
30+
- Value: The encoded Base64 certificate
3131
2. Certificate password
32-
* Name: `MAC_CERTIFICATE_PASSWORD`
33-
* Value: The password that was set when the certificate was exported.
32+
- Name: `MAC_CERTIFICATE_PASSWORD`
33+
- Value: The password that was set when the certificate was exported.
3434
3. Apple ID
35-
* Name: `SIGNING_APPLE_ID`
36-
* Value: The apple id (email) to use for signing
35+
- Name: `SIGNING_APPLE_ID`
36+
- Value: The apple id (email) to use for signing
3737
4. Apple Password
38-
* Name: `SIGNING_APP_PASSWORD`
39-
* Value: The app-specific password that was generated for the apple id
38+
- Name: `SIGNING_APP_PASSWORD`
39+
- Value: The app-specific password that was generated for the apple id
4040
5. Team ID (Optional)
41-
* Name: `SIGNING_TEAM_ID`
42-
* Value: The apple team id if you're sigining the application for a team
41+
- Name: `SIGNING_TEAM_ID`
42+
- Value: The apple team id if you're sigining the application for a team

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# Loki Electron GUI Wallet
22

33
### Introduction
4+
45
Loki is a private cryptocurrency based on Monero. Loki aims to provide a private data transmission layer using a second layer of Service Nodes.
56
More information on the project can be found on the [website](https://loki.network) and in the [whitepaper](https://loki.network/whitepaper). Loki is an open source project, and we encourage contributions from anyone with something to offer.
7+
68
<p align="center">
79
<img src="https://raw.githubusercontent.com/KeeJef/loki-electron-gui-wallet/master/src-electron/icons/mrcuug.PNG" width="600">
810
</p>
911

10-
11-
1212
### About this project
1313

1414
This is the new electron GUI for Loki. It is open source and completely free to use without restrictions, anyone may create an alternative implementation of the Loki Electron GUI that uses the protocol and network in a compatible manner.
1515

1616
Please submit any changes as pull requests to the development branch, all changes are assessed in the development branch before being merged to master, release tags are considered stable builds for the GUI.
1717

1818
#### Pre-requisites
19+
1920
- Download latest [Lokid](https://github.com/loki-project/loki/releases/latest)
2021

2122
#### Commands
23+
2224
```
2325
nvm use 11.9.0
2426
npm install -g quasar-cli
@@ -30,13 +32,15 @@ npm install
3032
```
3133

3234
For dev:
35+
3336
```
3437
npm run dev
3538
```
3639

3740
For building:
3841

3942
**Note:** This will only build the binaries for the system you run the command on. Running this command on `linux` will only make `linux` binaries, no `mac` or `windows` binaries.
43+
4044
```
4145
npm run build
4246
```
@@ -47,14 +51,14 @@ Adding a new language is fairly simple.
4751

4852
1. Duplicate the language file `src/i18n/en-us.js` and rename it to the relevant language code.
4953
2. Translate all the strings in that duplicated file. Take note that capitalization matters.
50-
- The translated string must go in-between the quotes (`""`)
51-
- E.G `all: "ALL"` -> `all: "ВСЕ"`
52-
- If possible try and stick to the general string formatting already present.
53-
- E.G if there is a new line then try and keep that in your translation.
54-
- The same goes for the pipe character `|`. **DO NOT REMOVE IT**.
55-
- Please don't translate strings inside `{}` brackets. They are meant as placeholders for other values.
56-
- Some examples include `{type}` and `{count}`.
57-
- E.G if you have a string `A {index}` then you may translate it as `B {index}` or `{index} B` depending on how the string makes sense in your language. You are allowed to reposition the placeholders for the string to make sense **BUT DO NOT DELETE OR REPLACE THE PLACEHOLDERS WITH OTHER VALUES**
54+
- The translated string must go in-between the quotes (`""`)
55+
- E.G `all: "ALL"` -> `all: "ВСЕ"`
56+
- If possible try and stick to the general string formatting already present.
57+
- E.G if there is a new line then try and keep that in your translation.
58+
- The same goes for the pipe character `|`. **DO NOT REMOVE IT**.
59+
- Please don't translate strings inside `{}` brackets. They are meant as placeholders for other values.
60+
- Some examples include `{type}` and `{count}`.
61+
- E.G if you have a string `A {index}` then you may translate it as `B {index}` or `{index} B` depending on how the string makes sense in your language. You are allowed to reposition the placeholders for the string to make sense **BUT DO NOT DELETE OR REPLACE THE PLACEHOLDERS WITH OTHER VALUES**
5862
3. Add the language to the `languages` array in `src/i18n/index.js`. The `flag` property is the [ISO 3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/) of a country.
5963
- **NOTE: DO NOT ADD THE LANGUAGE TO `export default`**. Dynamic language loading is handled by the application.
6064
4. Add your language locale to Vue Timeago. Add it in `src/plugins/timeago.js` under `locales`.

RELEASING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ Releasing the application to work with auto update is very simple.
99
- E.g if the version was `2.1.1` then the github tag would be `v2.1.1`
1010
4. Add release notes
1111
5. Publish the release!
12-
13-

0 commit comments

Comments
 (0)