diff --git a/infra/workers/.prettierrc.json b/infra/workers/.prettierrc.json index 0a02bcefda..8af31cded5 100644 --- a/infra/workers/.prettierrc.json +++ b/infra/workers/.prettierrc.json @@ -1,3 +1,4 @@ { - "tabWidth": 4 + "tabWidth": 4, + "proseWrap": "always" } diff --git a/infra/workers/README.md b/infra/workers/README.md index 7862045da1..b2ce2d7267 100644 --- a/infra/workers/README.md +++ b/infra/workers/README.md @@ -1,23 +1,23 @@ # Cloudflare Workers -Source code for our [Cloudflare -Workers](https://developers.cloudflare.com/workers/). +Source code for our +[Cloudflare Workers](https://developers.cloudflare.com/workers/). Each worker is a self contained directory with its each `package.json`. ## Deploying -* Switch to a worker directory, e.g. `cd github-discord-notifier`. +- Switch to a worker directory, e.g. `cd github-discord-notifier`. -* Install dependencies (if needed) with `yarn` +- Install dependencies (if needed) with `yarn` -* Login into wrangler (if needed) using `yarn wrangler login` +- Login into wrangler (if needed) using `yarn wrangler login` -* Deploy! `yarn wrangler deploy` +- Deploy! `yarn wrangler deploy` Wrangler is the CLI provided by Cloudflare to manage workers. Apart from -deploying, it also allows us to stream logs from running workers by using `yarn -wrangler tail`. +deploying, it also allows us to stream logs from running workers by using +`yarn wrangler tail`. ## Creating a new worker diff --git a/infra/workers/cast-albums/tsconfig.json b/infra/workers/cast-albums/tsconfig.json index 70c70a35da..a65b752070 100644 --- a/infra/workers/cast-albums/tsconfig.json +++ b/infra/workers/cast-albums/tsconfig.json @@ -1 +1 @@ -{ "extends": "../tsconfig.base.json", "include": ["src/**/*.ts"] } +{ "extends": "../tsconfig.base.json", "include": ["src"] } diff --git a/infra/workers/github-discord-notifier/tsconfig.json b/infra/workers/github-discord-notifier/tsconfig.json index 70c70a35da..a65b752070 100644 --- a/infra/workers/github-discord-notifier/tsconfig.json +++ b/infra/workers/github-discord-notifier/tsconfig.json @@ -1 +1 @@ -{ "extends": "../tsconfig.base.json", "include": ["src/**/*.ts"] } +{ "extends": "../tsconfig.base.json", "include": ["src"] } diff --git a/infra/workers/tsconfig.base.json b/infra/workers/tsconfig.base.json index f330c4ca50..97b0a32a03 100644 --- a/infra/workers/tsconfig.base.json +++ b/infra/workers/tsconfig.base.json @@ -3,30 +3,30 @@ /* TSConfig docs: https://aka.ms/tsconfig.json */ "compilerOptions": { /* tsc is used for by us for type checking, not compilation (the - Cloudflare workers runtime natively supports TypeScript) */ + Cloudflare workers runtime natively supports TypeScript). */ "noEmit": true, - /* The Workers runtime supports the latest and greatest */ + /* The Workers runtime supports the latest and greatest. */ /* https://developers.cloudflare.com/workers/reference/languages/#javascript--typescript */ "lib": ["esnext"], "target": "esnext", "module": "esnext", - /* Types that are implicitly available */ + /* Types that are implicitly available. */ /* https://www.npmjs.com/package/@cloudflare/workers-types */ "types": ["@cloudflare/workers-types"], - /* Tell TypeScript how to lookup the file for a given import */ + /* Tell TypeScript how to lookup the file for a given import. */ "moduleResolution": "node", - /* Speed things up by not type checking `node_modules` */ + /* Speed things up by not type checking `node_modules`. */ "skipLibCheck": true, - /* Require the `type` modifier when importing types */ + /* Require the `type` modifier when importing types. */ "verbatimModuleSyntax": true, - /* Enable importing .json files */ + /* Enable importing .json files. */ "resolveJsonModule": true, - /* strict and then some */ + /* strict, and then some. */ "strict": true, "noImplicitReturns": true, "noUnusedParameters": true,