Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/assets/images/hero-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/images/logo-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/images/logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

98 changes: 44 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,44 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
<!-- markdownlint-disable MD041 -->
<div align="center">
<a href="https://coder.com#gh-light-mode-only">
<img src="./.github/assets/images/logo-black.png" alt="Coder Logo Light" style="width: 128px">
</a>
<a href="https://coder.com#gh-dark-mode-only">
<img src="./.github/assets/images/logo-white.png" alt="Coder Logo Dark" style="width: 128px">
</a>

<h1>
Interactive Template Editor
</h1>

<br>
<br>

[Coder Repo](https://github.com/coder/coder) |
[Docs](https://coder.com/docs) |
[Why Coder](https://coder.com/why) |
[Premium](https://coder.com/pricing#compare-plans)

[![discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9511/badge)](https://www.bestpractices.dev/projects/9511)
[![license](https://img.shields.io/github/license/coder/preview)](./LICENSE)

</div>

<!--Should update this with the new cool form options -->
<p align="center">
<img src="./.github/assets/images/hero-image.png" alt="Coder Hero Image">
</p>

<!-- TODO: Add a usage section that links to coder/coder doc for how to use the `preview` command in coder cli -->

## Support

Do you have a workspace template that has incorrect parameters? Please open
[workspace template behavior issue](https://github.com/coder/preview/issues/new?template=workspace-template-bug-report.md).

For other bugs, feature requests, etc, feel free to
[open an issue](https://github.com/coder/preview/issues/new).

[Join our Discord](https://discord.gg/coder) to provide feedback on in-progress
features and chat with the community using Coder!
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="stylesheet" href="src/index.css" />
</head>

<body class="">
<body class="dark">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down