Browse Source

Repo cleanup

pull/145/head
Sacha Weatherstone 3 years ago
parent
commit
e2cc25a9b0
Failed to extract signature
  1. 27
      .github/workflows/nightly.yml
  2. 7
      .trunk/.gitignore
  3. 10
      .trunk/configs/.markdownlint.yaml
  4. 4
      .trunk/configs/.prettierignore
  5. 4
      .trunk/configs/prettier.config.cjs
  6. 14
      .trunk/configs/svgo.config.js
  7. 26
      .trunk/trunk.yaml
  8. 2
      .vscode/extensions.json
  9. 4
      .vscode/settings.json
  10. 18
      biome.json
  11. 12
      eslint.config.js
  12. 40
      package.json
  13. 2534
      pnpm-lock.yaml
  14. 23
      rome.json
  15. 2
      src/components/PageComponents/Connect/BLE.tsx
  16. 18
      src/components/PageComponents/ModuleConfig/Telemetry.tsx
  17. 2
      src/index.css
  18. 9
      src/validation/moduleConfig/telemetry.ts

27
.github/workflows/nightly.yml

@ -1,27 +0,0 @@
name: Nightly
on:
schedule:
- cron: 0 8 * * 1-5
workflow_dispatch: {}
jobs:
trunk_check:
name: Trunk Check Upload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
- name: Install Dependencies
run: pnpm install
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}

7
.trunk/.gitignore

@ -1,7 +0,0 @@
*out
*logs
*actions
*notifications
plugins
user_trunk.yaml
user.yaml

10
.trunk/configs/.markdownlint.yaml

@ -1,10 +0,0 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false

4
.trunk/configs/.prettierignore

@ -1,4 +0,0 @@
# Ignore artifacts:
dist
pnpm-lock.yaml
stats.html

4
.trunk/configs/prettier.config.cjs

@ -1,4 +0,0 @@
module.exports = {
trailingComma: "none",
plugins: [require("prettier-plugin-tailwindcss")]
};

14
.trunk/configs/svgo.config.js

@ -1,14 +0,0 @@
module.exports = {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false, // https://github.com/svg/svgo/issues/1128
sortAttrs: true,
removeOffCanvasPaths: true
}
}
}
]
};

26
.trunk/trunk.yaml

@ -1,26 +0,0 @@
version: 0.1
cli:
version: 1.3.2
plugins:
sources:
- id: trunk
ref: v0.0.8
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
runtimes:
enabled:
- [email protected]
- [email protected]
actions:
disabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available

2
.vscode/extensions.json

@ -1,3 +1,3 @@
{
"recommendations": ["bradlc.vscode-tailwindcss"]
"recommendations": ["bradlc.vscode-tailwindcss", "biomejs.biome"]
}

4
.vscode/settings.json

@ -1,4 +1,4 @@
{
"editor.defaultFormatter": "rome.rome",
"editor.formatOnSave": true
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
}

18
biome.json

@ -0,0 +1,18 @@
{
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true
}
}
}

12
eslint.config.js

@ -1,12 +0,0 @@
import react from "eslint-plugin-react";
export default [
"eslint:all",
{
files: ["src/**/*.{ts,tsx}"],
rules: {
semi: "error",
"prefer-const": "error"
}
}
];

40
package.json

@ -23,7 +23,7 @@
"@emeraldpay/hashicon-react": "^0.5.2",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "^3.3.2",
"@meshtastic/meshtasticjs": "2.2.12-0",
"@meshtastic/meshtasticjs": "2.2.13-1",
"@preact/signals-react": "^1.3.6",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-checkbox": "^1.0.4",
@ -42,50 +42,50 @@
"@tailwindcss/typography": "^0.5.10",
"@turf/turf": "^6.5.0",
"base64-js": "^1.5.1",
"biome": "^0.3.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cmdk": "^0.2.0",
"esptool-js": "^0.3.1",
"esptool-js": "^0.3.2",
"geodesy": "^2.4.0",
"immer": "^10.0.3",
"jszip": "^3.10.1",
"lucide-react": "^0.288.0",
"lucide-react": "^0.292.0",
"mapbox-gl": "npm:empty-npm-package@^1.0.0",
"maplibre-gl": "3.5.1",
"maplibre-gl": "3.6.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.47.0",
"react-hook-form": "^7.48.2",
"react-map-gl": "7.1.6",
"react-qrcode-logo": "^2.9.0",
"rfc4648": "^1.5.2",
"tailwind-merge": "^1.14.0",
"rfc4648": "^1.5.3",
"tailwind-merge": "^2.0.0",
"tailwindcss-animate": "^1.0.7",
"timeago-react": "^3.0.6",
"zustand": "4.4.4"
"zustand": "4.4.6"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.6",
"@types/chrome": "^0.0.248",
"@types/geodesy": "^2.2.6",
"@types/node": "^20.8.8",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@types/w3c-web-serial": "^1.0.5",
"@types/web-bluetooth": "^0.0.19",
"@vitejs/plugin-react": "^4.1.0",
"@tailwindcss/forms": "^0.5.7",
"@types/chrome": "^0.0.251",
"@types/geodesy": "^2.2.7",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/w3c-web-serial": "^1.0.6",
"@types/web-bluetooth": "^0.0.20",
"@vitejs/plugin-react": "^4.1.1",
"autoprefixer": "^10.4.16",
"gzipper": "^7.2.0",
"postcss": "^8.4.31",
"rollup-plugin-visualizer": "^5.9.2",
"rome": "^12.1.3",
"tailwindcss": "^3.3.3",
"tailwindcss": "^3.3.5",
"tar": "^6.2.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-environment": "^1.1.3",
"vite-plugin-pwa": "^0.16.5"
"vite-plugin-pwa": "^0.16.7"
}
}

2534
pnpm-lock.yaml

File diff suppressed because it is too large

23
rome.json

@ -1,23 +0,0 @@
{
"$schema": "./node_modules/rome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentSize": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"node_modules",
"dist"
]
}
}

2
src/components/PageComponents/Connect/BLE.tsx

@ -53,7 +53,7 @@ export const BLE = (): JSX.Element => {
onClick={() => {
void navigator.bluetooth
.requestDevice({
filters: [{ services: [Constants.serviceUUID] }],
filters: [{ services: [Constants.ServiceUuid] }],
})
.then((device) => {
const exists = bleDevices.findIndex((d) => d.id === device.id);

18
src/components/PageComponents/ModuleConfig/Telemetry.tsx

@ -74,6 +74,24 @@ export const Telemetry = (): JSX.Element => {
label: "Air Quality Update Interval",
description: "How often to send Air Quality data over the mesh",
},
{
type: "toggle",
name: "powerMeasurementEnabled",
label: "Power Measurement Enabled",
description: "Enable the Power Measurement Telemetry",
},
{
type: "number",
name: "powerUpdateInterval",
label: "Power Update Interval",
description: "How often to send Power data over the mesh",
},
{
type: "text",
name: "powerScreenEnabled",
label: "Power Screen Enabled",
description: "Enable the Power Telemetry Screen",
},
],
},
]}

2
src/index.css

@ -99,4 +99,4 @@
img {
-drag: none;
-webkit-user-drag: none;
}
}

9
src/validation/moduleConfig/telemetry.ts

@ -26,4 +26,13 @@ export class TelemetryValidation
@IsInt()
airQualityInterval: number;
@IsBoolean()
powerMeasurementEnabled: boolean;
@IsInt()
powerUpdateInterval: number;
@IsBoolean()
powerScreenEnabled: boolean;
}

Loading…
Cancel
Save