Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
16e037e
feat: add vite, eslint, prettier, husky, vitest
AliQuickC Sep 5, 2025
26b7f46
feat: add pages and routing
AliQuickC Sep 6, 2025
74af80f
feat: add redux
AliQuickC Sep 6, 2025
e92615f
fix: husky
AliQuickC Sep 6, 2025
c1f1af9
fix: test
AliQuickC Sep 6, 2025
f8d4f46
feat: replace favicon
AliQuickC Sep 6, 2025
de5035f
feat: add package-lock.json
AliQuickC Sep 8, 2025
b8d5ace
fix: index.html
AliQuickC Sep 8, 2025
5052084
fix: clean comments
AliQuickC Sep 8, 2025
61e1453
Merge pull request #1 from AliQuickC/base-structure
AliQuickC Sep 8, 2025
db06890
chore: add Mantine dependencies
SashAwl Sep 8, 2025
71f4311
Merge pull request #2 from AliQuickC/mantine-setup
SashAwl Sep 8, 2025
615b969
feat: add react-intl
AliQuickC Sep 9, 2025
d67b8de
fix: delete demo request
AliQuickC Sep 9, 2025
3d96d85
feat: merge from mantine-setup branch
AliQuickC Sep 9, 2025
a1b5cd3
Merge pull request #3 from AliQuickC/internationalization
AliQuickC Sep 10, 2025
f2eaf6d
feat: add response slice
AliQuickC Sep 13, 2025
370450f
feat: add rest client
AliQuickC Sep 14, 2025
fb29c4e
feat: add variables support
AliQuickC Sep 15, 2025
dedbbef
fix: build config
AliQuickC Sep 16, 2025
890c721
fix: submit handler
AliQuickC Sep 18, 2025
6343947
refactor: encode url
AliQuickC Sep 18, 2025
630173a
feat: add error handlers
AliQuickC Sep 18, 2025
f49e716
feat: add rest client internationalization
AliQuickC Sep 18, 2025
f6a6401
fix: styles
AliQuickC Sep 18, 2025
f2f8a7b
fix: label attribute
AliQuickC Sep 18, 2025
b35e12c
Merge pull request #7 from AliQuickC/restful-client
AliQuickC Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

build
*.lnk
coverage
.editorconfig

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run test
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
# rest-client-app
# 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([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// 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,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
]);
```

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([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
]);
```
1 change: 1 addition & 0 deletions __tests__/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
48 changes: 48 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import react from 'eslint-plugin-react';
import tseslint from 'typescript-eslint';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import reactCompiler from 'eslint-plugin-react-compiler';

export default tseslint.config(
{
ignores: ['dist', 'coverage', '**/owid-co2-data.json'],
},
{
extends: [
js.configs.recommended,
...tseslint.configs.strict,
eslintPluginPrettier,
],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'react-compiler': reactCompiler,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-compiler/react-compiler': 'error',
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
'@typescript-eslint/no-non-null-assertion': 'off',
},
settings: {
react: {
version: 'detect',
},
},
}
);
Loading