Skip to content

Commit

Permalink
TEL - Add Biome (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunnaha authored Nov 21, 2024
1 parent 0842a75 commit 5ff2656
Show file tree
Hide file tree
Showing 239 changed files with 24,490 additions and 24,152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
if git ls-files --eol | grep crlf; then
echo "[ERROR] found CRLF line endings, install dos2unix and run 'find . -type f -exec dos2unix {} \;' to fix"
exit 1
fi
fi
31 changes: 31 additions & 0 deletions .github/workflows/telemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Telemetry

on: push

jobs:
telemetry:
name: Lint and build
runs-on: ubuntu-latest
defaults:
run:
working-directory: telemetry
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.5.0
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: telemetry/pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build
5 changes: 0 additions & 5 deletions telemetry/.prettierrc

This file was deleted.

1 change: 0 additions & 1 deletion telemetry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ COPY packages/types/package.json ./packages/types/
COPY packages/ui/package.json ./packages/ui/
COPY packages/public-app/package.json ./packages/public-app/
COPY packages/fake/package.json ./packages/fake/
COPY packages/eslint-config/package.json ./packages/eslint-config/
COPY packages/tsconfig/package.json ./packages/tsconfig/
COPY packages/e2e-tests/package.json ./packages/e2e-tests/
COPY pnpm-lock.yaml ./
Expand Down
31 changes: 31 additions & 0 deletions telemetry/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}
1 change: 0 additions & 1 deletion telemetry/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ services:
- /usr/src/app/packages/public-app/node_modules
- /usr/src/app/packages/public-app/.next
- /usr/src/app/packages/fake/node_modules
- /usr/src/app/packages/eslint-config/node_modules
- /usr/src/app/packages/e2e-tests/node_modules
networks:
- telemetry
Expand Down
62 changes: 34 additions & 28 deletions telemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
{
"name": "@hyped/telemetry",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "turbo run start",
"dev": "turbo run dev",
"dev:test": "turbo run dev:test",
"ci": "turbo run build lint e2e:test",
"lint": "turbo run lint --parallel",
"lint:fix": "turbo run lint:fix --parallel",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"e2e:test": "turbo run e2e:test",
"format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
"build": "turbo run build"
},
"devDependencies": {
"@types/node": "^18.11.18",
"prettier": "3.2.4",
"turbo": "^1.11.3",
"typescript": "^5.3.3"
},
"pnpm": {
"patchedDependencies": {
"@nestjs/common@9.4.2": "patches/@nestjs__common@9.4.2.patch",
"nest-mqtt@0.2.0": "patches/nest-mqtt@0.2.0.patch",
"openmct@3.2.0": "patches/openmct@3.2.0.patch"
}
}
"name": "@hyped/telemetry",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "turbo run start",
"dev": "turbo run dev",
"dev:test": "turbo run dev:test",
"ci": "turbo run build lint e2e:test",
"lint": "turbo run lint --parallel",
"lint:fix": "turbo run lint:fix --parallel",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"e2e:test": "turbo run e2e:test",
"format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
"build": "turbo run build"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^18.11.18",
"prettier": "3.2.4",
"turbo": "^1.11.3",
"typescript": "^5.3.3"
},
"pnpm": {
"patchedDependencies": {
"@nestjs/common@9.4.2": "patches/@nestjs__common@9.4.2.patch",
"nest-mqtt@0.2.0": "patches/nest-mqtt@0.2.0.patch",
"openmct@3.2.0": "patches/openmct@3.2.0.patch"
}
},
"engines": {
"node": ">=18",
"pnpm": ">=9"
},
"packageManager": "pnpm@9.5.0"
}
9 changes: 0 additions & 9 deletions telemetry/packages/constants/.eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions telemetry/packages/constants/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["../../biome.json"]
}
44 changes: 20 additions & 24 deletions telemetry/packages/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
{
"name": "@hyped/telemetry-constants",
"private": true,
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/telemetry-constants.esm.js",
"files": [
"dist",
"src"
],
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"lint": "eslint \"src/**/*.ts\" --max-warnings 0 --report-unused-disable-directives",
"lint:fix": "eslint \"src/**/*.ts\" --fix"
},
"devDependencies": {
"@hyped/telemetry-types": "workspace:*",
"@hyped/eslint-config": "workspace:*",
"@hyped/tsconfig": "workspace:*",
"tsdx": "^0.14.1",
"tslib": "^2.5.3",
"typescript": "^5.3.3"
}
"name": "@hyped/telemetry-constants",
"private": true,
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/telemetry-constants.esm.js",
"files": ["dist", "src"],
"scripts": {
"start": "dts watch",
"build": "dts build",
"lint": "biome lint .",
"lint:fix": "biome check --write ."
},
"devDependencies": {
"@hyped/telemetry-types": "workspace:*",
"@hyped/tsconfig": "workspace:*",
"dts-cli": "^2.0.5",
"tslib": "^2.5.3",
"typescript": "^5.3.3"
}
}
6 changes: 3 additions & 3 deletions telemetry/packages/constants/src/faults/levels.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const FAULT_LEVEL = {
WATCH: 'WATCH',
WARNING: 'WARNING',
CRITICAL: 'CRITICAL',
WATCH: 'WATCH',
WARNING: 'WARNING',
CRITICAL: 'CRITICAL',
} as const;

export type FaultLevel = (typeof FAULT_LEVEL)[keyof typeof FAULT_LEVEL];
12 changes: 6 additions & 6 deletions telemetry/packages/constants/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export { pods, POD_IDS } from './pods/pods';
export type { PodId, Pods } from './pods/pods';
export {
ALL_POD_STATES,
PASSIVE_STATES,
ACTIVE_STATES,
NULL_STATES,
FAILURE_STATES,
getStateType,
ALL_POD_STATES,
PASSIVE_STATES,
ACTIVE_STATES,
NULL_STATES,
FAILURE_STATES,
getStateType,
} from './pods/states';
export type { PodStateType, PodStateCategoryType } from './pods/states';
export { MODES, MODE_EXCLUDED_STATES } from './pods/modes';
Expand Down
100 changes: 50 additions & 50 deletions telemetry/packages/constants/src/openmct/object-types/object-types.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
import type { OpenMctObjectTypes } from '@hyped/telemetry-types';

export const openMctObjectTypes: OpenMctObjectTypes = [
{
id: 'temperature',
name: 'Temperature',
icon: 'icon-telemetry',
},
{
id: 'thermistor',
name: 'Thermistor',
icon: 'icon-telemetry',
},
{
id: 'acceleration',
name: 'Acceleration',
icon: 'icon-telemetry',
},
{
id: 'pressure',
name: 'Pressure',
icon: 'icon-telemetry',
},
{
id: 'hall_effect',
name: 'Hall Effect',
icon: 'icon-telemetry',
},
{
id: 'displacement',
name: 'Displacement',
icon: 'icon-telemetry',
},
{
id: 'velocity',
name: 'Velocity',
icon: 'icon-telemetry',
},
{
id: 'status',
name: 'status',
icon: 'icon-telemetry',
},
{
id: 'keyence',
name: 'Keyence',
icon: 'icon-telemetry',
},
{
id: 'brake_feedback',
name: 'Brake Feedback',
icon: 'icon-telemetry',
},
{
id: 'temperature',
name: 'Temperature',
icon: 'icon-telemetry',
},
{
id: 'thermistor',
name: 'Thermistor',
icon: 'icon-telemetry',
},
{
id: 'acceleration',
name: 'Acceleration',
icon: 'icon-telemetry',
},
{
id: 'pressure',
name: 'Pressure',
icon: 'icon-telemetry',
},
{
id: 'hall_effect',
name: 'Hall Effect',
icon: 'icon-telemetry',
},
{
id: 'displacement',
name: 'Displacement',
icon: 'icon-telemetry',
},
{
id: 'velocity',
name: 'Velocity',
icon: 'icon-telemetry',
},
{
id: 'status',
name: 'status',
icon: 'icon-telemetry',
},
{
id: 'keyence',
name: 'Keyence',
icon: 'icon-telemetry',
},
{
id: 'brake_feedback',
name: 'Brake Feedback',
icon: 'icon-telemetry',
},
];
Loading

0 comments on commit 5ff2656

Please sign in to comment.