mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-02-03 18:57:38 +01:00
Add check-prettier to GitHub actions
Signed-off-by: Marquis Kurt <software@marquiskurt.net>
This commit is contained in:
parent
cbb12c4455
commit
298b7606cb
22
.github/workflows/review-style.yml
vendored
Normal file
22
.github/workflows/review-style.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: Prettier
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone source code
|
||||
uses: actions/checkout@v1
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Install dependencies and run Prettier
|
||||
run: |
|
||||
npm install
|
||||
npm run check-prettier
|
||||
env:
|
||||
CI: true
|
@ -56,6 +56,7 @@
|
||||
"build-desktop-darwin-nosign": "npm run create-mac-icon; electron-builder -p 'never' -m dmg -c.mac.identity=null -c.afterSign=\"desktop/donothing.js\"",
|
||||
"build-desktop-linux": "electron-builder -p 'never' -l deb AppImage snap",
|
||||
"build-desktop-linux-select": "electron-builder -p 'never' -l ",
|
||||
"check-prettier": "prettier --check src/**/**.tsx",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
|
@ -131,11 +131,11 @@ export function createUserDefaults() {
|
||||
export async function getConfig(): Promise<Config | undefined> {
|
||||
try {
|
||||
const resp = await axios.get("config.json");
|
||||
let config: Config = resp.data;
|
||||
return config;
|
||||
return resp.data as Config;
|
||||
} catch (err) {
|
||||
console.error(
|
||||
"Couldn't configure Hyperspace with the config file. Reason: " + err.name
|
||||
"Couldn't configure Hyperspace with the config file. Reason: " +
|
||||
err.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user