Skip to content

Commit 09e1e7b

Browse files
P-8140: Send header including sdk version (#159)
* Include sdk version, remove eslint * Changeset * Remove more packages * Updated test helper * Added additional header * Do not use X- * Typo * Update .changeset/shaggy-turkeys-play.md Co-authored-by: Mathias Vagni <mattvagni@users.noreply.github.com> * Updated biome rule --------- Co-authored-by: Mathias Vagni <mattvagni@users.noreply.github.com>
1 parent 80972e9 commit 09e1e7b

22 files changed

+339
-772
lines changed

.changeset/shaggy-turkeys-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@team-plain/typescript-sdk': patch
3+
---
4+
5+
Include SDK version as header in all requests to our API so we can better debug failures and issues.

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 32 deletions
This file was deleted.

biome.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"formatWithErrors": false,
6+
"indentStyle": "space",
7+
"indentWidth": 2,
8+
"lineEnding": "lf",
9+
"lineWidth": 100,
10+
"attributePosition": "auto"
11+
},
12+
"javascript": {
13+
"formatter": {
14+
"jsxQuoteStyle": "double",
15+
"quoteProperties": "asNeeded",
16+
"trailingCommas": "es5",
17+
"semicolons": "always",
18+
"arrowParentheses": "always",
19+
"bracketSpacing": true,
20+
"bracketSameLine": false,
21+
"quoteStyle": "single",
22+
"attributePosition": "auto"
23+
}
24+
},
25+
"files": {
26+
"include": ["biome.json", "vitest.*.js", "src/**/*.ts", "src/**/*.gql"],
27+
"ignore": [
28+
"dist/**",
29+
"node_modules/**",
30+
"src/graphql/types.ts",
31+
"src/webhooks/webhook-schema.ts"
32+
]
33+
},
34+
"linter": {
35+
"rules": {
36+
"complexity": {
37+
"noBannedTypes": "off",
38+
"noForEach": "off"
39+
},
40+
"suspicious": {
41+
"noAssignInExpressions": "off",
42+
"noConfusingVoidType": "off",
43+
"noExplicitAny": "off",
44+
"noShadowRestrictedNames": "off"
45+
},
46+
"style": {
47+
"noNonNullAssertion": "off",
48+
"noParameterAssign": "off",
49+
"useTemplate": "off"
50+
},
51+
"correctness": {
52+
"noUnusedImports": "error"
53+
},
54+
"performance": {
55+
"noAccumulatingSpread": "off"
56+
}
57+
}
58+
},
59+
"organizeImports": {
60+
"enabled": true
61+
}
62+
}

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
"codegen:graphql": "graphql-codegen",
1313
"codegen:webhooks": "sh ./scripts/codegen-webhooks.sh",
1414
"typecheck": "tsc --noEmit",
15-
"lint": "pnpm run lint:eslint && pnpm run lint:prettier",
16-
"lint:eslint": "eslint 'src/**/*.ts'",
17-
"lint:prettier": "prettier --config=.prettierrc --ignore-path=.prettierignore --check '**/*.{ts,tsx,gql,js}'",
15+
"lint": "biome lint .",
16+
"lint:fix": "biome lint . --fix",
17+
"format": "biome format .",
18+
"format:fix": "biome format --write .",
1819
"test": "vitest",
1920
"changeset": "changeset",
2021
"release": "npm run build && changeset publish"
2122
},
2223
"license": "MIT",
2324
"devDependencies": {
25+
"@biomejs/biome": "1.9.2",
2426
"@changesets/cli": "^2.26.1",
2527
"@graphql-codegen/add": "^4.0.1",
2628
"@graphql-codegen/cli": "^3.3.1",
@@ -29,13 +31,7 @@
2931
"@graphql-codegen/typescript-document-nodes": "^3.0.4",
3032
"@graphql-codegen/typescript-operations": "^3.0.4",
3133
"@rollup/plugin-json": "^6.1.0",
32-
"@typescript-eslint/eslint-plugin": "^5.59.2",
33-
"@typescript-eslint/parser": "^5.59.2",
3434
"esbuild": "^0.17.18",
35-
"eslint": "^8.40.0",
36-
"eslint-plugin-import": "^2.27.5",
37-
"eslint-plugin-simple-import-sort": "^10.0.0",
38-
"eslint-plugin-unused-imports": "^2.0.0",
3935
"json-schema-to-typescript": "^13.1.2",
4036
"rollup": "^3.21.5",
4137
"rollup-plugin-dts": "^5.3.0",
@@ -52,4 +48,4 @@
5248
"graphql": "^16.6.0",
5349
"zod": "3.22.4"
5450
}
55-
}
51+
}

0 commit comments

Comments
 (0)