diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..97178c3 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +node_modules +dist + +**/node_modules +**/dist \ No newline at end of file diff --git a/docs/api.md b/docs/api.md index b4fb290..0262c15 100644 --- a/docs/api.md +++ b/docs/api.md @@ -13,8 +13,8 @@ Create a new Tsky instance. ```ts import { Tsky } from 'tsky' -const app = new AppBskyNS(); // TODO -const tsky = new Tsky(app); +const app = new AppBskyNS() // TODO +const tsky = new Tsky(app) ``` ### `tsky.profile(did: string): Promise` @@ -22,7 +22,7 @@ const tsky = new Tsky(app); Get a profile by DID. ```ts -const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd'); +const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd') -console.log(profile.handle); +console.log(profile.handle) ``` diff --git a/docs/examples.md b/docs/examples.md index 02ea2e7..7045f03 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -4,4 +4,4 @@ outline: deep # Examples -TODO: Add examples here \ No newline at end of file +TODO: Add examples here diff --git a/docs/getting-started.md b/docs/getting-started.md index 06a291a..e8c59a7 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -26,17 +26,15 @@ $ bun add -D tsky ::: - ## Usage ```ts import { Tsky } from 'tsky' +const app = new AppBskyNS() // TODO +const tsky = new Tsky(app) -const app = new AppBskyNS(); // TODO -const tsky = new Tsky(app); - -const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd'); +const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd') -console.log(profile.handle); +console.log(profile.handle) ``` diff --git a/docs/index.md b/docs/index.md index 6e37cf5..bcbaa07 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,4 +28,3 @@ features: icon: ☁️ details: Like a walk on the clouds --- - diff --git a/packages/core/eslint.config.mjs b/eslint.config.mjs similarity index 100% rename from packages/core/eslint.config.mjs rename to eslint.config.mjs diff --git a/package.json b/package.json index 10670ea..f842e00 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,21 @@ "docs:preview": "pnpm run --filter tsky-docs preview", "format": "biome check --write .", "format:check": "biome check", - "lint": "pnpm --filter tsky run lint", - "lint:fix": "pnpm --filter tsky run lint:fix" + "lint": "eslint ./packages ./docs", + "lint:fix": "eslint . --fix" }, "devDependencies": { - "@biomejs/biome": "^1.9.4" + "@antfu/eslint-config": "^3.11.2", + "@biomejs/biome": "^1.9.4", + "@eslint/js": "^9.15.0", + "eslint": "^8.57.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", + "eslint-plugin-promise": "^6.0.0", + "nano-staged": "^0.8.0", + "typescript-eslint": "^8.16.0" + }, + "nano-staged": { + "*.{js,ts,cjs,mjs}": ["biome check --write --"] } } diff --git a/packages/core/package.json b/packages/core/package.json index 29641d2..ce84737 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,16 +9,9 @@ "test:typescript": "tsc --noEmit" }, "devDependencies": { - "@antfu/eslint-config": "^3.11.2", "@atproto/api": "^0.13.18", - "@eslint/js": "^9.15.0", - "eslint": "^8.57.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", - "eslint-plugin-promise": "^6.0.0", "globals": "^15.12.0", "tsx": "^4.19.2", - "typescript": "^5.7.2", - "typescript-eslint": "^8.16.0" + "typescript": "^5.7.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49ef604..3155e3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,25 +7,13 @@ settings: importers: .: - devDependencies: - '@biomejs/biome': - specifier: ^1.9.4 - version: 1.9.4 - - docs: - devDependencies: - vitepress: - specifier: ^1.5.0 - version: 1.5.0(@algolia/client-search@5.15.0)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2) - - packages/core: devDependencies: '@antfu/eslint-config': specifier: ^3.11.2 version: 3.11.2(@typescript-eslint/utils@8.16.0(eslint@8.57.1)(typescript@5.7.2))(@vue/compiler-sfc@3.5.13)(eslint@8.57.1)(typescript@5.7.2) - '@atproto/api': - specifier: ^0.13.18 - version: 0.13.18 + '@biomejs/biome': + specifier: ^1.9.4 + version: 1.9.4 '@eslint/js': specifier: ^9.15.0 version: 9.15.0 @@ -41,6 +29,24 @@ importers: eslint-plugin-promise: specifier: ^6.0.0 version: 6.6.0(eslint@8.57.1) + nano-staged: + specifier: ^0.8.0 + version: 0.8.0 + typescript-eslint: + specifier: ^8.16.0 + version: 8.16.0(eslint@8.57.1)(typescript@5.7.2) + + docs: + devDependencies: + vitepress: + specifier: ^1.5.0 + version: 1.5.0(@algolia/client-search@5.15.0)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2) + + packages/core: + devDependencies: + '@atproto/api': + specifier: ^0.13.18 + version: 0.13.18 globals: specifier: ^15.12.0 version: 15.12.0 @@ -50,9 +56,6 @@ importers: typescript: specifier: ^5.7.2 version: 5.7.2 - typescript-eslint: - specifier: ^8.16.0 - version: 8.16.0(eslint@8.57.1)(typescript@5.7.2) packages: @@ -2071,6 +2074,11 @@ packages: multiformats@9.9.0: resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} + nano-staged@0.8.0: + resolution: {integrity: sha512-QSEqPGTCJbkHU2yLvfY6huqYPjdBrOaTMKatO1F8nCSrkQGXeKwtCiCnsdxnuMhbg3DTVywKaeWLGCE5oJpq0g==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + nanoid@3.3.8: resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5024,6 +5032,10 @@ snapshots: multiformats@9.9.0: {} + nano-staged@0.8.0: + dependencies: + picocolors: 1.1.1 + nanoid@3.3.8: {} natural-compare@1.4.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4667dcd..94ac265 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,3 @@ packages: - packages/* - docs/ -