Skip to content

Commit

Permalink
chore: use short JSDOC type notation in configs (remix-run#3482)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored Jun 21, 2022
1 parent 3c11daa commit a2ce6f7
Show file tree
Hide file tree
Showing 86 changed files with 88 additions and 250 deletions.
10 changes: 3 additions & 7 deletions docs/api/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ A lot of Remix APIs aren't imported from the `"@remix-run/*"` packages, but are
This file has a few build and development configuration options, but does not actually run on your server.

```tsx filename=remix.config.js
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
Expand Down Expand Up @@ -143,10 +141,8 @@ A list of regex patterns that determines if a module is transpiled and included

For example, the `unified` ecosystem is all ESM-only. Let's also say we're using a `@sindresorhus/slugify` which is ESM-only as well. Here's how you would be able to consume those packages in a CJS app without having to use dynamic imports:

```ts filename=remix.config.js lines=[10-15]
/**
* @type {import('@remix-run/dev').AppConfig}
*/
```ts filename=remix.config.js lines=[8-13]
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
Expand Down
1 change: 1 addition & 0 deletions docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ Further configuration is optional, but the following may be helpful to optimize
Every Remix app accepts a `remix.config.js` file in the project root. While its settings are optional, we recommend you include a few of them for clarity's sake. See the [docs on configuration][docs-on-configuration] for more information about all available options.

```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
ignoredRouteFiles: ["**/.*"],
Expand Down
1 change: 1 addition & 0 deletions docs/pages/gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ To fix it, add the ESM package to the `serverDependenciesToBundle` option in you
In our case here we're using the `dot-prop` package, so we would do it like this:

```js filename=remix.config.js
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
serverDependenciesToBundle: ["dot-prop"],
// ...
Expand Down
4 changes: 1 addition & 3 deletions docs/prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('prettier').Options}
*/
/** @type {import('prettier').Options} */
module.exports = {
...require("../prettier.config"),
printWidth: 60,
Expand Down
4 changes: 1 addition & 3 deletions examples/basic/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/blog-tutorial/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
cacheDirectory: "./node_modules/.cache/remix",
ignoredRouteFiles: ["**/.*", "**/*.css", "**/*.test.{js,jsx,ts,tsx}"],
Expand Down
4 changes: 1 addition & 3 deletions examples/bullmq-task-queue/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev/config').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
appDirectory: "app",
browserBuildDirectory: "public/build",
Expand Down
4 changes: 1 addition & 3 deletions examples/catch-boundary/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/chakra-ui/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/client-only-components/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/client-side-validation/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/collected-notes/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/combobox-resource-route/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/dark-mode/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/dataloader/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
serverBuildDirectory: "server/build",
Expand Down
4 changes: 1 addition & 3 deletions examples/emotion/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/file-and-cloudinary-upload/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/firebase-auth-firestore/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/form-to-notion-db/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/framer-motion/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/framer-route-animation/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/gdpr-cookie-consent/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/google-analytics/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/graphql-api/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/image-resize/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/infinite-scrolling/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/io-ts-formdata-decoding/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/ioredis/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/jokes/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/mantine/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/msw/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/multiple-forms/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/multiple-params/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/newsletter-signup/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/nprogress/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/on-demand-hydration/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/outlet-form-rerender/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/pathless-routes/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/pm-app/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/quirrel/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/react-spring/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/redis-upstash-session/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/remix-auth-auth0/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/remix-auth-form/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/remix-auth-github/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/remix-auth-supabase-github/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/remix-auth-supabase/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
4 changes: 1 addition & 3 deletions examples/route-modal/remix.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @type {import('@remix-run/dev').AppConfig}
*/
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*"],
// appDirectory: "app",
Expand Down
Loading

0 comments on commit a2ce6f7

Please sign in to comment.