Skip to content

Commit

Permalink
Remove all mentioned jsconfig (#8818)
Browse files Browse the repository at this point in the history
* Remove all mentioned  `jsconfig`

* revert some line

Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Paul Valladares <[email protected]>
  • Loading branch information
3 people authored Jul 17, 2024
1 parent 0fefa63 commit 8267745
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ import logoUrl from '../../assets/logo.png?url';

In this example, a developer would need to understand the tree relationship between `src/pages/about/company.astro`, `src/components/controls/Button.astro`, and `src/assets/logo.png`. And then, if the `company.astro` file were to be moved, these imports would also need to be updated.

You can add import aliases from either `tsconfig.json` or `jsconfig.json`.
You can add import aliases in `tsconfig.json`.

```json title="tsconfig.json" ins={5-6}
{
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ You can configure TypeScript to enforce type imports in your `tsconfig.json` fil

## Import Aliases

Astro supports [import aliases](/en/guides/imports/#aliases) that you define in your `tsconfig.json` & `jsconfig.json` `paths` configuration. [Read our guide](/en/guides/imports/#aliases) to learn more.
Astro supports [import aliases](/en/guides/imports/#aliases) that you define in your `tsconfig.json` `paths` configuration. [Read our guide](/en/guides/imports/#aliases) to learn more.


```astro title="src/pages/about/nate.astro" "@components" "@layouts"
Expand Down
4 changes: 1 addition & 3 deletions src/content/docs/en/guides/upgrade-to/v1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ In prior releases, these were configured with `snowpackPlugin` or `snowpackPlugi

### Aliasing

In Astro v0.21+, import aliases can be added from `tsconfig.json` or `jsconfig.json`.
In Astro v0.21+, import aliases can be added in `tsconfig.json`.

```json add={4-6}
{
Expand All @@ -592,8 +592,6 @@ In Astro v0.21+, import aliases can be added from `tsconfig.json` or `jsconfig.j
}
```

_These aliases are integrated automatically into [VSCode](https://code.visualstudio.com/docs/languages/jsconfig) and other editors._

### File Extensions in Imports

In Astro v0.21+, files need to be referenced by their actual extension, exactly as it is on disk. In this example, `Div.tsx` would need to be referenced as `Div.tsx`, not `Div.jsx`.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Specifies a different root directory to check. Uses the current working director

#### `--tsconfig <path-to-file>`

Specifies a `tsconfig.json` or `jsconfig.json` file to use manually. If not provided, Astro will attempt to find a config, or infer the project's config automatically.
Specifies a `tsconfig.json` file to use manually. If not provided, Astro will attempt to find a config, or infer the project's config automatically.

#### `--minimumFailingSeverity <error|warning|hint>`

Expand Down

0 comments on commit 8267745

Please sign in to comment.