-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from systemli/add-prettier-config
🎨 Apply prettier config
- Loading branch information
Showing
47 changed files
with
3,350 additions
and
2,884 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
{ | ||
"plugins": [ | ||
"@babel/plugin-proposal-object-rest-spread" | ||
], | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
"plugins": ["@babel/plugin-proposal-object-rest-spread"], | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "09:00" | ||
timezone: "Europe/Berlin" | ||
interval: 'weekly' | ||
day: 'friday' | ||
time: '09:00' | ||
timezone: 'Europe/Berlin' | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "09:00" | ||
timezone: "Europe/Berlin" | ||
interval: 'weekly' | ||
day: 'friday' | ||
time: '09:00' | ||
timezone: 'Europe/Berlin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Quality | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
prettier: | ||
name: Prettier | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run Prettier | ||
uses: wearerequired/lint-action@v1 | ||
with: | ||
check_name: Prettier Results | ||
prettier: true | ||
prettier_dir: src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import L from 'leaflet'; | ||
import L from 'leaflet' | ||
|
||
import 'leaflet/dist/leaflet.css'; | ||
import 'leaflet-draw/dist/leaflet.draw.css'; | ||
import 'leaflet/dist/leaflet.css' | ||
import 'leaflet-draw/dist/leaflet.draw.css' | ||
|
||
// stupid hack so that leaflet's images work after going through webpack | ||
import marker from 'leaflet/dist/images/marker-icon.png'; | ||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png'; | ||
import markerShadow from 'leaflet/dist/images/marker-shadow.png'; | ||
import marker from 'leaflet/dist/images/marker-icon.png' | ||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png' | ||
import markerShadow from 'leaflet/dist/images/marker-shadow.png' | ||
|
||
delete L.Icon.Default.prototype._getIconUrl; | ||
delete L.Icon.Default.prototype._getIconUrl | ||
|
||
L.Icon.Default.mergeOptions({ | ||
iconRetinaUrl: marker2x, | ||
iconUrl: marker, | ||
shadowUrl: markerShadow | ||
}); | ||
iconRetinaUrl: marker2x, | ||
iconUrl: marker, | ||
shadowUrl: markerShadow, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
module.exports = { | ||
plugins: { | ||
'cssnano': { | ||
preset: ['default', { | ||
discardComments: { | ||
removeAll: true, | ||
}, | ||
}] | ||
plugins: { | ||
cssnano: { | ||
preset: [ | ||
'default', | ||
{ | ||
discardComments: { | ||
removeAll: true, | ||
}, | ||
}, | ||
'postcss-remove-google-fonts': {}, | ||
], | ||
}, | ||
}; | ||
'postcss-remove-google-fonts': {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export let ApiUrl = process.env.REACT_APP_API_URL || 'http://localhost:8080/v1'; | ||
export let ApiUrl = process.env.REACT_APP_API_URL || 'http://localhost:8080/v1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
import {ApiUrl} from "./Api"; | ||
import AuthSingleton from "../components/AuthService"; | ||
import { ApiUrl } from './Api' | ||
import AuthSingleton from '../components/AuthService' | ||
|
||
const Auth = AuthSingleton.getInstance(); | ||
const Auth = AuthSingleton.getInstance() | ||
|
||
/** | ||
* @returns {Promise<Response>} | ||
*/ | ||
export function getInactiveSettings() { | ||
return Auth.fetch(`${ApiUrl}/admin/settings/inactive_settings`); | ||
return Auth.fetch(`${ApiUrl}/admin/settings/inactive_settings`) | ||
} | ||
|
||
/** | ||
* @returns {Promise<Response>} | ||
*/ | ||
export function getRefreshInterval() { | ||
return Auth.fetch(`${ApiUrl}/admin/settings/refresh_interval`); | ||
return Auth.fetch(`${ApiUrl}/admin/settings/refresh_interval`) | ||
} | ||
|
||
/** | ||
* @param {object} data | ||
* @returns {Promise<Response>} | ||
*/ | ||
export function putInactiveSettings(data) { | ||
return Auth.fetch(`${ApiUrl}/admin/settings/inactive_settings`, { | ||
body: JSON.stringify(data), | ||
method: 'PUT' | ||
}); | ||
return Auth.fetch(`${ApiUrl}/admin/settings/inactive_settings`, { | ||
body: JSON.stringify(data), | ||
method: 'PUT', | ||
}) | ||
} | ||
|
||
/** | ||
* @param {object} data | ||
* @returns {Promise<Response>} | ||
*/ | ||
export function putRefreshInterval(data) { | ||
return Auth.fetch(`${ApiUrl}/admin/settings/refresh_interval`, { | ||
body: JSON.stringify(data), | ||
method: 'PUT' | ||
}); | ||
return Auth.fetch(`${ApiUrl}/admin/settings/refresh_interval`, { | ||
body: JSON.stringify(data), | ||
method: 'PUT', | ||
}) | ||
} |
Oops, something went wrong.