Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
nimast committed Feb 27, 2024
1 parent ae02808 commit 18f619f
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 64 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Release

on:
workflow_dispatch
on: workflow_dispatch

jobs:
publish:
Expand All @@ -16,4 +15,4 @@ jobs:
- run: npm install -g @gitbook/cli
- run: gitbook publish .
env:
GITBOOK_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
GITBOOK_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
8 changes: 1 addition & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
supportedArchitectures: {
cpu: [
"current",
"x64",
"arm64",
]
}
supportedArchitectures: { cpu: ['current', 'x64', 'arm64'] }
104 changes: 52 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"name": "integration-rudderstack",
"version": "1.0.2",
"private": true,
"dependencies": {
"@gitbook/api": "*",
"@gitbook/runtime": "*",
"crypto-js": "^4.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.23.9",
"@esbuild/darwin-arm64": "^0.20.1",
"@gitbook/cli": "*",
"@gitbook/eslint-config": "*",
"@gitbook/tsconfig": "*",
"@types/crypto-js": "^4.2.2",
"@types/jest": "^29.5.12",
"@types/node": "^18.16.0",
"assert": "^2.0.0",
"babel-jest": "^29.7.0",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "7",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "2",
"eslint-plugin-json": "^3.1.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"test": "^3.2.1",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
},
"scripts": {
"typecheck": "tsc --noEmit",
"publish-integration": "gitbook publish .",
"test": "jest --passWithNoTests",
"lint": "eslint . --max-warnings 0",
"lint:fix": "eslint --fix .",
"prepare": "husky install",
"prettier": "prettier --write .",
"prettier:check": "prettier --check ."
},
"prettier": {
"useTabs": false,
"trailingComma": "none",
"singleQuote": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid"
},
"eslintIgnore": [
"*.test.ts",
".eslintrc.js"
]
"name": "integration-rudderstack",
"version": "1.0.2",
"private": true,
"dependencies": {
"@gitbook/api": "*",
"@gitbook/runtime": "*",
"crypto-js": "^4.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.23.9",
"@esbuild/darwin-arm64": "^0.20.1",
"@gitbook/cli": "*",
"@gitbook/eslint-config": "*",
"@gitbook/tsconfig": "*",
"@types/crypto-js": "^4.2.2",
"@types/jest": "^29.5.12",
"@types/node": "^18.16.0",
"assert": "^2.0.0",
"babel-jest": "^29.7.0",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "7",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "2",
"eslint-plugin-json": "^3.1.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"test": "^3.2.1",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
},
"scripts": {
"typecheck": "tsc --noEmit",
"publish-integration": "gitbook publish .",
"test": "jest --passWithNoTests",
"lint": "eslint . --max-warnings 0",
"lint:fix": "eslint --fix .",
"prepare": "husky install",
"prettier": "prettier --write .",
"prettier:check": "prettier --check ."
},
"prettier": {
"useTabs": false,
"trailingComma": "none",
"singleQuote": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid"
},
"eslintIgnore": [
"*.test.ts",
".eslintrc.js"
]
}
6 changes: 4 additions & 2 deletions src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const RUDDER_ANONYMOUS_ID_COOKIE_NAME = 'rl_anonymous_id';
/**
* Generate the event to track in RudderStack for an actual GitBook event.
*/
export default function generateRudderStackTrackEvent(event: api.SpaceViewEvent) {
export default function generateRudderStackTrackEvent(
event: api.SpaceViewEvent
) {
const { visitor, referrer, url, spaceId, pageId } = event;

const anonymousId = getAnonymousId(event);
Expand Down Expand Up @@ -48,7 +50,7 @@ export default function generateRudderStackTrackEvent(event: api.SpaceViewEvent)
*/
function getAnonymousId(event: api.SpaceViewEvent): string {
const { visitor } = event;
const {cookies} = visitor;
const { cookies } = visitor;

const extractedAnonymousId = extractAnonymousId(cookies);
console.log('extracted anonymous id', extractedAnonymousId);
Expand Down

0 comments on commit 18f619f

Please sign in to comment.