Skip to content

Commit

Permalink
chore(frontend): correct formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Data5tream committed Jul 7, 2023
1 parent 4fe5642 commit 927399b
Show file tree
Hide file tree
Showing 17 changed files with 327 additions and 331 deletions.
36 changes: 18 additions & 18 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript'),
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
};
16 changes: 6 additions & 10 deletions frontend/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 120,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
60 changes: 30 additions & 30 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"name": "watcher-frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.20.5",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"sass": "^1.63.6",
"svelte": "^3.59.2",
"svelte-check": "^3.4.4",
"tslib": "^2.6.0",
"typescript": "^5.1.3",
"vite": "^4.3.9"
},
"type": "module"
"name": "watcher-frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.20.5",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"sass": "^1.63.6",
"svelte": "^3.59.2",
"svelte-check": "^3.4.4",
"tslib": "^2.6.0",
"typescript": "^5.1.3",
"vite": "^4.3.9"
},
"type": "module"
}
12 changes: 6 additions & 6 deletions frontend/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}

export {};
18 changes: 9 additions & 9 deletions frontend/src/app.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div class="app">%sveltekit.body%</div>
</body>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div class="app">%sveltekit.body%</div>
</body>
</html>
53 changes: 27 additions & 26 deletions frontend/src/lib/components/PageFooter.svelte
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
<footer>
<div class="content">
&copy; {new Date().getFullYear()}, Simon Stefan Barth | <a href='https://github.com/Data5tream/simple-status-page' target='_blank' rel='noreferrer'>GitHub</a>
</div>
<div class="content">
&copy; {new Date().getFullYear()}, Simon Stefan Barth |
<a href="https://github.com/Data5tream/simple-status-page" target="_blank" rel="noreferrer">GitHub</a>
</div>
</footer>

<style lang="scss">
footer {
width: 100%;
padding: 12px 0 8px;
background: var(--c-black);
color: var(--c-white);
}
footer {
width: 100%;
padding: 12px 0 8px;
background: var(--c-black);
color: var(--c-white);
}
.content {
max-width: 1400px;
margin: 0 16px;
font-family: monospace;
font-size: 14px;
.content {
max-width: 1400px;
margin: 0 16px;
font-family: monospace;
font-size: 14px;
@media screen and (min-width: 1432px) {
width: 100%;
margin: 0 auto;
}
}
}
a {
&,
&:visited {
color: var(--c-white);
}
a {
&,
&:visited {
color: var(--c-white);
}
&:hover,
&:active {
background: var(--c-white);
color: var(--c-black);
}
}
&:hover,
&:active {
background: var(--c-white);
color: var(--c-black);
}
}
</style>
28 changes: 14 additions & 14 deletions frontend/src/lib/components/PageHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<script lang="ts">
import { env } from '$env/dynamic/public';
import { env } from '$env/dynamic/public';
const title = env.PUBLIC_PAGE_TITLE ? env.PUBLIC_PAGE_TITLE : 'Simple Status Page';
const title = env.PUBLIC_PAGE_TITLE ? env.PUBLIC_PAGE_TITLE : 'Simple Status Page';
</script>

<svelte:head>
<title>{title}</title>
<title>{title}</title>
</svelte:head>

<h1>{title}</h1>

<style lang="scss">
h1 {
display: inline-block;
background: var(--c-black);
color: var(--c-white);
padding: 8px 16px 8px 8px;
font-family: monospace;
h1 {
display: inline-block;
background: var(--c-black);
color: var(--c-white);
padding: 8px 16px 8px 8px;
font-family: monospace;
&:after {
content: '_';
animation: blink 2s infinite;
}
}
&:after {
content: '_';
animation: blink 2s infinite;
}
}
</style>

0 comments on commit 927399b

Please sign in to comment.