Skip to content

Refactoring/transform typescript #602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
###############################
# Docker compose configuration #
###############################

# Host system port where the live documentation is to be made accessible
COMPOSE_START_PORT=8000

# Host system port where Playwright Component Testing report is to be made accessible
COMPOSE_PLAYWRIGHT_REPORT_PORT=9323

# Ownership of the files created in the container
COMPOSE_UID=1000
COMPOSE_GID=1000
9 changes: 9 additions & 0 deletions .env.playwright.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###########################
# Playwright configuration #
###########################

# Number of workers to use to run Playwright tests
PW_WORKERS=1

# Port used by Playwright Component Testing to serve the test files
PW_CT_PORT=3100
8 changes: 6 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
"browser": true,
"jest": true
},
"ignorePatterns": ["src/docs/_assets/generated"],
"ignorePatterns": [
"src/docs/_assets/generated"
],
"overrides": [
{
"files": ["**/*.md"],
"files": [
"**/*.md"
],
"extends": [
"plugin:markdown/recommended"
]
Expand Down
40 changes: 40 additions & 0 deletions .eslintrc-ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"extends": [
"@visionappscz/eslint-config-visionapps",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:deprecation/recommended",
"plugin:typescript-sort-keys/recommended"
],
"env": {
"browser": true,
"jest": true
},
"overrides": [
{
"files": [
"*.spec.tsx",
"*.story.tsx"
],
"rules": {
"@typescript-eslint/unbound-method": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"projectService": true,
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-exports": ["error"],
"@typescript-eslint/consistent-type-imports": ["error"],
"import/prefer-default-export": "off",
"no-console": ["error"]
}
}
45 changes: 45 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Playwright

on:
pull_request:
schedule:
- cron: '0 6 * * *' # daily at 6:00 UTC (7:00 CET, 8:00 CEST)

jobs:
test:
name: Playwright
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/playwright:v1.50.1-noble
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Print Node.js and npm version
run: node --version && npm --version

- name: Install
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests and generate test report
run: npm run test:playwright-ct:all

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Upload Playwright test report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/coverage
/dist
/node_modules
/playwright-report/
/site
/src/docs/_assets/generated/*
/tests/playwright/.temp/
.env
.env.playwright
statistics.html
!.gitkeep
4 changes: 1 addition & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/site
/src/**/__tests__
/src/docs/
/src/docsCustomProperties.js
/src/docsCustomProperties.ts
/src/index.md
/tests
.browserslistrc
Expand All @@ -19,13 +19,11 @@
.markdownlint.jsonc
babel.config.js
CODEOWNERS
CONTRIBUTING.md
docker-compose.yml
jest.config.js
mkdocs.yml
package-lock.json
postcss.config.js
RELEASING.md
statistics.html
stylelint.config.js
webpack.config.babel.js
178 changes: 0 additions & 178 deletions CONTRIBUTING.md

This file was deleted.

20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ It is possible to run React UI in your app in development mode. This is useful
because:

- In production mode React UI uses non-human-readable class names.
- Runtime check (i.e. PropTypes) are suppressed in production mode.

To enable development mode, add the following code to the `webpack.config.js`
file in your app:
Expand Down Expand Up @@ -110,6 +109,23 @@ We appreciate any contributions you might make. 🙏
Please check out our [Contributing Guide][gh-contributing]. It includes
contribution guidelines and information on how to run and develop the project.

## Testing

All contributions should pass linting and tests before being merged.
Please follow our [Testing Guidelines][gh-testing], which describe
how to properly run all tests (linters, unit tests, visual tests)
in Docker containers to ensure consistency.

## Releasing

React UI uses a fully automated release process.
If you plan to release a new version,
please follow our [Releasing Guide][gh-releasing],
which explains all necessary steps, including version bumping
and changelog management.

[rui-docs]: https://react-ui.io
[RACOM]: https://www.racom.eu
[gh-contributing]: https://github.com/react-ui-org/react-ui/blob/master/CONTRIBUTING.md
[gh-contributing]: ./src/docs/contribute/general-guidelines.md
[gh-testing]: ./src/docs/contribute/testing-guidelines.md
[gh-releasing]: ./src/docs/contribute/releasing.md
Loading
Loading