Skip to content

Commit

Permalink
Adds Prettier Config + Prettify all files on Src and Electron Folder (#…
Browse files Browse the repository at this point in the history
…788)

* feat: add prettier scripts

* chore: ignore locale files

* feat: prettier on all files

* chore: add prettier to lint workflow

* chore: prettify more files

* chore: fix time container
  • Loading branch information
flavioislima authored Dec 18, 2021
1 parent 45e8969 commit 376c647
Show file tree
Hide file tree
Showing 106 changed files with 4,546 additions and 3,711 deletions.
16 changes: 8 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "Heroic Games Launcher",
"name": "Heroic Games Launcher",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile",

// Add the IDs of extensions you want installed when the container is created.
"extensions": [],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [],

"postCreateCommand": "pacman -Syyu --noconfirm && pacman -S nodejs npm yarn --noconfirm",
"postCreateCommand": "pacman -Syyu --noconfirm && pacman -S nodejs npm yarn --noconfirm"
}
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## IMPORTANT! Do not erase this template!
### Is this a game issue? If YES please use our Discord to get help.
## IMPORTANT! Do not erase this template!

### Is this a game issue? If YES please use our Discord to get help.

### Open here only issues with Heroic like: Heroic doesn't open, some button is out of place, Heroic closes unexpectedly, installs got interrupted, etc.

### Try to get help on our Wiki first: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/Troubleshooting

**Describe the bug**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<--- Put the description here --->

---

-------------------------------------------------------------
Use the following Checklist if you have changed something on the Backend or Frontend:

- [ ] Tested the feature and it's working on a current and clean install.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ jobs:
run: yarn
- name: Lint code.
run: yarn lint
- name: Prettier code.
run: yarn prettier
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install modules.
run: yarn
- name: Test
run: yarn test:ci
- name: Checkout repository.
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install modules.
run: yarn
- name: Test
run: yarn test:ci
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
build
public/index.html
public/index.html
public/locales/
10 changes: 5 additions & 5 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"coenraads.bracket-pair-colorizer-2",
"steoates.autoimport",
"dsznajder.es7-react-js-snippets",
"eamodio.gitlens"
"eamodio.gitlens",
"esbenp.prettier-vscode"
]
}
80 changes: 40 additions & 40 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Test",
"detail": "yarn test",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for Linux",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --linux",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for Windows",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --win"
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for MacOS",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --darwin"
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Test",
"detail": "yarn test",
"group": {
"kind": "test",
"isDefault": true
}
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for Linux",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --linux",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for Windows",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --win"
},
{
"type": "npm",
"script": "dist",
"problemMatcher": [],
"label": "Build for MacOS",
"detail": "yarn build-electron && yarn build && electron-builder -c.extraMetadata.main=build/main.js --darwin"
}
]
}
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Changelog


## 1.11.0 Alpha

### General

- Changed the way Heroic install DXVK/VKD3D completely now removing the DLLs when toggling the feature off.
- The Navbar is now visible on the Login Page as well, this makes changing the settings and debugging errors easier.
- Added Window menu + keyboard shortcuts to Quit, Reload and Open the Developer tools.
Expand All @@ -14,17 +14,20 @@
- Updated Electron to version 15.3

### Bugfixes

- Fix Heroic coming to the front everytime a game was stopped.
- Fix Desktop shortcuts not being created when the DE had language different from English.

## 1.10.3

### General

- Added controls to reload, go back and forward on the Store and Wiki webviews;
- [Linux/MacOS] Improved Wine, Proton and Crossover Searching;
- [MacOS] Some unused settings were removed;

### BugFixes

- [MacOS] Fixed an issue on BigSur that was causing Heroic screen to become blank;
- Other small UI fixes;

Expand Down Expand Up @@ -74,7 +77,9 @@

- Added Korean, Croatian and Traditional Chinese languages.
- Other translations updates and fixes.

### Bugfixes

- Fixed Update game from context menu not working.
- Fixed Update icon misplaced on game card.
- Fixed (probably) rare issue that could cause a Heroic to show only a blank screen when trying to load games from cache.
Expand Down Expand Up @@ -156,7 +161,7 @@

- Added Simplified Chinese language
- Added recent games on the tray icon and a filter on the library.
- Added Discord RPC support (except Linux AppImages) thanks @TabulateJarl8
- Added Discord RPC support (except Linux AppImages) thanks @TabulateJarl8
- Submenu now is always visible on Game Page.
- It's possible to update a game from the game page now by clicking on the update information instead of opening the settings like before.
- Downloading Fortnite and Cyberpunk2077 still not possible but they now can be imported.
Expand All @@ -170,7 +175,7 @@
- Improved Winetricks and Winecfg handlers and they should work now with proton 6.3+
- Fixed save-sync folder when using Proton
- Added `STEAM_COMPAT_CLIENT_INSTALL_PATH` variable when launching a game with proton since its needed from Proton versions 6.3+.
- Improved Logging when running from the terminal. Thanks @dragonDScript and @Nocccer
- Improved Logging when running from the terminal. Thanks @dragonDScript and @Nocccer

### Windows

Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Discord](https://img.shields.io/discord/812703221789097985.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=7389D8)](https://discord.gg/rHJ2uqdquK) [![GitHub release](https://img.shields.io/github/release/Heroic-Games-Launcher/HeroicGamesLauncher.svg?label=Release)](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/) ![GitHub all releases](https://img.shields.io/github/downloads/Heroic-Games-Launcher/HeroicGamesLauncher/total?label=Downloads) [![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/COPYING) [![Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dheroicgameslauncher%26type%3Dpatrons&style=flat&label=Patreon)](https://patreon.com/heroicgameslauncher) [![Donate](https://img.shields.io/badge/PayPal-Donate-blue?style=flat&logo=data:image/svg%2bxml;base64,PHN2ZyBzdHlsZT0iLW1zLXRyYW5zZm9ybTpyb3RhdGUoMzYwZGVnKTstd2Via2l0LXRyYW5zZm9ybTpyb3RhdGUoMzYwZGVnKTt0cmFuc2Zvcm06cm90YXRlKDM2MGRlZykiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj48bWV0YWRhdGE+PHJkZjpSREY+PGNjOldvcmsgcmRmOmFib3V0PSIiPjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PjxkYzp0eXBlIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiLz48L2NjOldvcms+PC9yZGY6UkRGPjwvbWV0YWRhdGE+PHBhdGggZD0iTTguMzIgMjEuOTdhLjU0Ni41NDYgMCAwIDEtLjI2LS4zMmMtLjAzLS4xNS0uMDYuMTEuNi00LjA5Yy42LTMuOC41OS0zLjc0LjY3LTMuODVjLjEzLS4xNy4xMS0uMTcgMS42MS0uMThjMS4zMi0uMDMgMS42LS4wMyAyLjE5LS4xMmMzLjI1LS40NSA1LjI2LTIuMzYgNS45Ni01LjY2Yy4wNC0uMjIuMDgtLjQxLjA5LS40MWMwLS4wMS4wNy4wNC4xNS4xYzEuMDMuNzggMS4zOCAyLjIyLjk5IDQuMTRjLS40NiAyLjI5LTEuNjggMy44MS0zLjU4IDQuNDZjLS44MS4yOC0xLjQ5LjM5LTIuNjkuNDJjLS44LjA0LS44Mi4wNC0xLjA1LjE5Yy0uMTcuMTctLjE2LjE0LS41NSAyLjU1Yy0uMjcgMS43LS4zNyAyLjI1LS40MSAyLjM1Yy0uMDcuMTYtLjIxLjMtLjM3LjM4bC0uMTEuMDdIMTBjLTEuMjkgMC0xLjYyIDAtMS42OC0uMDNtLTQuNS0yLjIzYy0uMTktLjEtLjMyLS4yNy0uMzItLjQ3QzMuNSAxOSA2LjExIDIuNjggNi4xOCAyLjVjLjA5LS4xOC4zMi0uMzcuNS0uNDRMNi44MyAyaDMuNTNjMy45MSAwIDMuNzYgMCA0LjY0LjJjMi42Mi41NSAzLjgyIDIuMyAzLjM3IDQuOTNjLS41IDIuOTMtMS45OCA0LjY3LTQuNSA1LjNjLS44Ny4yMS0xLjQ4LjI3LTMuMTQuMjdjLTEuMzEgMC0xLjQxLjAxLTEuNjcuMTVjLS4yNi4xNS0uNDcuNDItLjU2Ljc1Yy0uMDQuMDctLjI3IDEuNDctLjUzIDMuMWEyNDEuMyAyNDEuMyAwIDAgMC0uNDcgMy4wMmwtLjAzLjA2SDUuNjljLTEuNTggMC0xLjggMC0xLjg3LS4wNHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)](https://www.paypal.me/heroicgl) [![kofi](https://img.shields.io/badge/Ko--Fi-Donate-orange?style=flat&logo=ko-fi)](https://ko-fi.com/heroicgames)


Heroic is an Open Source Game Launcher for Linux, Windows and MacOS (Limited to Windows games using Wine/Crossover).
Right now it supports launching games from the Epic Games Store using [Legendary](https://github.com/derrod/legendary), a CLI alternative to the Epic Games Launcher.
Heroic is built with Web Technologies like: TypeScript, React, NodeJS and Electron.
Expand Down Expand Up @@ -83,6 +82,7 @@ Heroic is built with Web Technologies like: TypeScript, React, NodeJS and Electr
- Swedish
- Tamil
- Turkish

### Help with Translations [Here](https://hosted.weblate.org/projects/heroic-games-launcher)

## Installation
Expand All @@ -105,7 +105,7 @@ If you would prefer, we have a docker container defined to develop / build Heroi

**VS Code**

There is a `.devcontainer` directory containing a definition that VS Code will recognize for automatically opening your local Heroic directory in a container in VS Code.
There is a `.devcontainer` directory containing a definition that VS Code will recognize for automatically opening your local Heroic directory in a container in VS Code.

**NOTE: this requires that you install the 'Remote - Containers' extension.**

Expand All @@ -121,17 +121,18 @@ After the container's package manager runs, open a new terminal session and you
If you don't use VS Code or don't want it integrated with the container, you can build and run the container manually using either Docker or Podman.

1. From the root of your local Heroic directory, run:

```
docker build -t heroicdevcontainer -f Dockerfile .
```

2. Assuming all went well, you can now enter the container:
2. Assuming all went well, you can now enter the container:

```
docker run -it -v ./:/tmp/heroic localhost/heroicdevcontainer:latest
```

3. The above command will mount your local Heroic dir to `/tmp/heroic` in the container (unless you used a different path).
3. The above command will mount your local Heroic dir to `/tmp/heroic` in the container (unless you used a different path).

```
cd /tmp/heoric
Expand All @@ -152,12 +153,15 @@ sudo dpkg -i heroic_x.x.x_amd64.deb
#### Debian (third party `apt` repository)

You can add the [**MAD Linux**](https://madlinux.sourceforge.io) [`apt` repository](https://gitlab.com/myawesomedistro/madrepo):

```
bash <(wget -O- https://raw.githubusercontent.com/Heroic-Games-Launcher/HeroicGamesLauncher/main/madrepo.sh)
```

If you need support on it, get access to **MAD Linux** [**Guilded**](https://guilded.gg/madlinux) server.

Maybe you want to boost the download speed on updates with [`apt-fast`](https://github.com/ilikenwf/apt-fast):

```
sudo add-apt-repository -y ppa:apt-fast/stable
sudo apt install -y apt-fast
Expand Down Expand Up @@ -208,13 +212,13 @@ Download Heroic.Setup.x.x.x.exe and run it. It will install it to the start menu

### macOS

Download Heroic-x.x.x.dmg and install it.
Download Heroic-x.x.x.dmg and install it.

### Build binaries locally (All platforms)

- All Platforms:
Requires NodeJS to build \
Use yarn or npm
Requires NodeJS to build \
Use yarn or npm

```bash
git clone https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher.git
Expand All @@ -223,20 +227,23 @@ cd HeroicGamesLauncher
```

- Build for Linux:

```bash
yarn

yarn dist {package to create} (eg: deb, pacman, tar.xz, rpm, AppImage)
```

- Build for Windows (Beta):

```bash
yarn.cmd (or npm install)

yarn.cmd (or npm run) dist-win
```

- Build for Mac (Alpha):

```bash
yarn (or npm install)

Expand Down
Loading

0 comments on commit 376c647

Please sign in to comment.