From 1e28a259ed34996a85b287abcae5789abd2198bd Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 18 Dec 2024 13:54:12 +0100 Subject: [PATCH] chore: lint --- .github/workflows/autofix.yml | 6 +++--- .prettierignore | 7 +++++++ docs/1.guide/1.index.md | 6 +++--- package.json | 14 +++++++------- renovate.json | 4 +--- tsconfig.json | 5 +---- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 5b815ce..fc52df9 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -1,9 +1,9 @@ -name: autofix.ci # needed to securely identify the workflow +name: autofix.ci # needed to securely identify the workflow on: pull_request: push: - branches: [ "main" ] + branches: ["main"] permissions: contents: read @@ -23,4 +23,4 @@ jobs: run: pnpm run lint:fix - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c with: - commit-message: 'chore: apply automated lint fixes' + commit-message: "chore: apply automated lint fixes" diff --git a/.prettierignore b/.prettierignore index 43c5cf4..7bc1981 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,8 @@ test/drivers/tmp +dist +node_modules +.output +.nuxt +CHANGELOG.md +pnpm-lock.yaml +docs/2.drivers/0.index.md diff --git a/docs/1.guide/1.index.md b/docs/1.guide/1.index.md index 010c767..2ea7925 100644 --- a/docs/1.guide/1.index.md +++ b/docs/1.guide/1.index.md @@ -356,11 +356,11 @@ type StorageDefinition = { items: { foo: string; baz: number; - } -} + }; +}; const storage = createStorage(); -await storage.has("foo");// Ts will prompt you that there are two optional keys: "foo" or "baz" +await storage.has("foo"); // Ts will prompt you that there are two optional keys: "foo" or "baz" await storage.getItem("baz"); // => string await storage.setItem("foo", 12); // TS error: is not compatible with await storage.setItem("foo", "val"); // Check ok diff --git a/package.json b/package.json index b8b9432..6482dc0 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "bench": "jiti test/server.bench.ts", "build": "unbuild", "dev": "vitest", - "lint": "eslint . && prettier -c src test", - "lint:fix": "eslint . --fix && prettier -w src test", + "lint": "eslint . && prettier -c .", + "lint:fix": "eslint . --fix && prettier -w .", "prepack": "pnpm build", "release": "pnpm test && changelogen --release && git push --follow-tags && pnpm publish", "test": "pnpm lint && pnpm test:types && vitest run --coverage", @@ -108,6 +108,7 @@ "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3", + "@deno/kv": ">=0.8.4", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", @@ -115,8 +116,7 @@ "@vercel/kv": "^1.0.1", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", - "ioredis": "^5.4.1", - "@deno/kv": ">=0.8.4" + "ioredis": "^5.4.1" }, "peerDependenciesMeta": { "@azure/app-configuration": { @@ -140,6 +140,9 @@ "@capacitor/preferences": { "optional": true }, + "@deno/kv": { + "optional": true + }, "@netlify/blobs": { "optional": true }, @@ -163,9 +166,6 @@ }, "ioredis": { "optional": true - }, - "@deno/kv": { - "optional": true } }, "packageManager": "pnpm@9.15.0" diff --git a/renovate.json b/renovate.json index a9971c8..57fe916 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,3 @@ { - "extends": [ - "github>unjs/renovate-config" - ] + "extends": ["github>unjs/renovate-config"] } diff --git a/tsconfig.json b/tsconfig.json index 035811d..af35df3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,9 +16,6 @@ "noEmit": true, "allowImportingTsExtensions": true, "skipLibCheck": true, - "types": [ - "node", - "deno" - ], + "types": ["node", "deno"] } }