setup ci, fix files using biome
This commit is contained in:
19
.gitlab-ci.yml
Normal file
19
.gitlab-ci.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
default:
|
||||||
|
image: oven/bun
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- lint
|
||||||
|
|
||||||
|
build:
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
|
||||||
|
lint:
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
script:
|
||||||
|
- bun install -g biome
|
||||||
|
- biome check
|
||||||
|
- biome lint
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Ignore artifacts:
|
|
||||||
build
|
|
||||||
coverage
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"tabWidth": 4,
|
|
||||||
"useTabs": false
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
|
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import js from "@eslint/js";
|
import js from "@eslint/js";
|
||||||
import globals from "globals";
|
import { globalIgnores } from "eslint/config";
|
||||||
import reactHooks from "eslint-plugin-react-hooks";
|
import reactHooks from "eslint-plugin-react-hooks";
|
||||||
import reactRefresh from "eslint-plugin-react-refresh";
|
import reactRefresh from "eslint-plugin-react-refresh";
|
||||||
|
import globals from "globals";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
import { globalIgnores } from "eslint/config";
|
|
||||||
|
|
||||||
export default tseslint.config([
|
export default tseslint.config([
|
||||||
globalIgnores(["dist"]),
|
globalIgnores(["dist"]),
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
const token =
|
||||||
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
||||||
|
|
||||||
async function fetchTentHumidity() {
|
async function fetchTentHumidity() {
|
||||||
const url = "/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
|
const url =
|
||||||
|
"/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
@@ -18,8 +20,8 @@ async function fetchTentTemperature() {
|
|||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
@@ -27,4 +29,4 @@ async function fetchTentTemperature() {
|
|||||||
return data.state;
|
return data.state;
|
||||||
}
|
}
|
||||||
|
|
||||||
export { fetchTentHumidity, fetchTentTemperature };
|
export { fetchTentHumidity, fetchTentTemperature };
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ export default function DepartureList(props: {
|
|||||||
<div className={style.container}>
|
<div className={style.container}>
|
||||||
<h2>{name} Departures</h2>
|
<h2>{name} Departures</h2>
|
||||||
<div className={style.departureLists}>
|
<div className={style.departureLists}>
|
||||||
{departureTables(left)}
|
{departureTables(left)}
|
||||||
{departureTables(right)}
|
{departureTables(right)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useFlatasticStore } from "@/store/flatastic";
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import { useFlatasticStore } from "@/store/flatastic";
|
||||||
|
|
||||||
import type { FlatasticChore } from "@/types/flatasticChore";
|
import type { FlatasticChore } from "@/types/flatasticChore";
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ import { useEffect } from "react";
|
|||||||
import { useHomeAssistantStore } from "@/store/homeAssistant";
|
import { useHomeAssistantStore } from "@/store/homeAssistant";
|
||||||
|
|
||||||
export default function Timetable() {
|
export default function Timetable() {
|
||||||
const fetchHomeAssistantData = useHomeAssistantStore((state) => state.fetch);
|
const fetchHomeAssistantData = useHomeAssistantStore(
|
||||||
const tentTemperature = useHomeAssistantStore((state) => state.tentTemperature);
|
(state) => state.fetch,
|
||||||
|
);
|
||||||
|
const tentTemperature = useHomeAssistantStore(
|
||||||
|
(state) => state.tentTemperature,
|
||||||
|
);
|
||||||
const tentHumidity = useHomeAssistantStore((state) => state.tentHumidity);
|
const tentHumidity = useHomeAssistantStore((state) => state.tentHumidity);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user