Skip to content

Commit deb29f0

Browse files
committed
feat: migrate eslint and prettier to biome for plugin-hubtype-analytics
1 parent 58bb7c5 commit deb29f0

31 files changed

+107
-59
lines changed

.cursor/plans/BIOME_MIGRATION.plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ todos:
1313
status: completed
1414
- id: phase1-migrate-analytics
1515
content: Migrate botonic-plugin-hubtype-analytics + update pre-commit
16-
status: pending
16+
status: completed
1717
- id: phase1-migrate-kb
1818
content: Migrate botonic-plugin-knowledge-bases + update pre-commit
1919
status: pending
@@ -154,7 +154,7 @@ files: ^(packages/botonic-core/|packages/botonic-plugin-hubtype-analytics/)
154154
### Included packages
155155
156156
1. `botonic-core` (COMPLETED)
157-
2. `botonic-plugin-hubtype-analytics`
157+
2. `botonic-plugin-hubtype-analytics` (COMPLETED)
158158
3. `botonic-plugin-knowledge-bases`
159159
4. `botonic-plugin-ai-agents`
160160
5. `botonic-react`

.github/workflows/botonic-plugin-hubtype-analytics-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ jobs:
1515
PACKAGE_NAME: Botonic plugin hubtype analytics tests
1616
PACKAGE: botonic-plugin-hubtype-analytics
1717
BUILD_COMMAND: 'cd ../botonic-core && npm run build && cd ../botonic-plugin-hubtype-analytics && npm run build'
18+
LINT_COMMAND: npm run lint:check
1819
NEEDS_CODECOV_UPLOAD: 'yes'

.pre-commit-config.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
name: biome-check (Biome)
2222
entry: npx @biomejs/biome check --write
2323
language: system
24-
files: ^packages/botonic-core/
24+
files: ^packages/(botonic-core|botonic-plugin-hubtype-analytics)/
2525
types_or: [javascript, jsx, ts, tsx, json]
2626

2727
- id: cli
@@ -48,12 +48,6 @@ repos:
4848
language: system
4949
files: ^packages/botonic-plugin-flow-builder/
5050

51-
- id: hubtype-analytics
52-
name: hubtype-analytics (ESLint)
53-
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-hubtype-analytics
54-
language: system
55-
files: ^packages/botonic-plugin-hubtype-analytics/
56-
5751
- id: plugin-ai-agents
5852
name: plugin-ai-agents (ESLint)
5953
entry: scripts/qa/old/lint-package.sh packages/botonic-plugin-ai-agents

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Packages migrated to Biome (add more as they are migrated)
22
packages/botonic-core/
3+
packages/botonic-plugin-hubtype-analytics/

packages/botonic-plugin-hubtype-analytics/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"build:watch": "npm run build -- --watch",
1010
"test": "../../node_modules/.bin/jest --coverage",
1111
"prepublishOnly": "rm -rf lib && npm i && npm run build",
12-
"lint": "npm run lint_core -- --fix",
13-
"lint_core": "../../node_modules/.bin/eslint_d --cache --quiet 'src/**/*.ts*'"
12+
"lint": "biome check --write src/ tests/",
13+
"lint:check": "biome check src/ tests/",
14+
"format": "biome format --write src/ tests/"
1415
},
1516
"dependencies": {
1617
"@babel/runtime": "^7.26.0",
@@ -29,10 +30,6 @@
2930
"src/**",
3031
"README.md"
3132
],
32-
"eslintConfig": {
33-
"extends": "../.eslintrc.js",
34-
"root": true
35-
},
3633
"author": "",
3734
"license": "MIT",
3835
"keywords": [

packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-ai-agent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22
import {
33
EventAction,
4-
EventAiAgent,
4+
type EventAiAgent,
55
EventType,
6-
RequestData,
7-
ToolExecution,
6+
type RequestData,
7+
type ToolExecution,
88
} from '../types'
99
import { HtEvent } from './ht-event'
1010

packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-bot-action.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { EventAction, EventBotAction, EventType, RequestData } from '../types'
1+
import {
2+
EventAction,
3+
type EventBotAction,
4+
EventType,
5+
type RequestData,
6+
} from '../types'
27
import { HtEvent } from './ht-event'
38

49
export class HtEventBotAction extends HtEvent {

packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-capture-user-input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
EventAction,
3-
EventCaptureUserInput,
3+
type EventCaptureUserInput,
44
EventType,
5-
RequestData,
5+
type RequestData,
66
} from '../types'
77
import { HtEvent } from './ht-event'
88

packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-conditional-channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
EventAction,
3-
EventConditionalChannel,
3+
type EventConditionalChannel,
44
EventType,
5-
RequestData,
5+
type RequestData,
66
} from '../types'
77
import { HtEvent } from './ht-event'
88

packages/botonic-plugin-hubtype-analytics/src/event-models/ht-event-conditional-country.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
EventAction,
3-
EventConditionalCountry,
3+
type EventConditionalCountry,
44
EventType,
5-
RequestData,
5+
type RequestData,
66
} from '../types'
77
import { HtEvent } from './ht-event'
88

0 commit comments

Comments
 (0)