Skip to content

Commit

Permalink
tgui v5: react port (#964)
Browse files Browse the repository at this point in the history
* camel case

* most imports

* storeprovider

* cleanup

* docs

* pch removal

* almost there

* some

* swc swap

* removes multiline - unneeded

* more multiline

* mostly constructor props

* still chat panel issue

* fixed chat

* typescript fixes

* react icons

* ts cleanup: box

* cleanup

* doh
  • Loading branch information
jlsnow301 authored Jun 4, 2024
1 parent 504ce04 commit 159be1f
Show file tree
Hide file tree
Showing 207 changed files with 1,443 additions and 2,685 deletions.
2 changes: 1 addition & 1 deletion tgui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/**/*.bundle.*
/**/*.chunk.*
/**/*.hot-update.*
/packages/inferno/**
/public
4 changes: 2 additions & 2 deletions tgui/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins:
- unused-imports
settings:
react:
version: '16.10'
version: '18.3.1'
rules:
## Possible Errors
## ----------------------------------------
Expand Down Expand Up @@ -649,7 +649,7 @@ rules:
## Enforce ES5 or ES6 class for React Components
react/prefer-es6-class: error
## Enforce that props are read-only
react/prefer-read-only-props: error
react/prefer-read-only-props: off
## Enforce stateless React Components to be written as a pure function
react/prefer-stateless-function: error
## Prevent missing props validation in a React component definition
Expand Down
15 changes: 15 additions & 0 deletions tgui/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"loose": true,
"parser": {
"syntax": "typescript",
"tsx": true
},
"transform": {
"react": {
"runtime": "automatic"
}
}
}
}
5 changes: 2 additions & 3 deletions tgui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ If you are completely new to frontend and prefer to **learn by doing**, start wi

### Guides

This project uses **Inferno** - a very fast UI rendering engine with a similar API to React. Take your time to read these guides:
This project uses React. Take your time to read the guide:

- [React guide](https://reactjs.org/docs/hello-world.html)
- [Inferno documentation](https://infernojs.org/docs/guides/components) - highlights differences with React.
- [React guide](https://react.dev/learn)

If you were already familiar with an older, Ractive-based tgui, and want to translate concepts between old and new tgui, read this [interface conversion guide](docs/converting-old-tgui-interfaces.md).

Expand Down
52 changes: 0 additions & 52 deletions tgui/babel.config.js

This file was deleted.

Loading

0 comments on commit 159be1f

Please sign in to comment.