mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
952e685e17
* Fix python-feature-lifecycle skill YAML frontmatter Remove copyright comment that preceded the YAML frontmatter delimiter, which prevented the skill from loading. The --- block must be the very first line of SKILL.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: update broken eslint-react plugin links in devui README The upstream eslint-react repo moved plugins from packages/plugins/ to the top-level plugins/ directory, causing 404 errors detected by linkspector CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
82 lines
2.0 KiB
Markdown
82 lines
2.0 KiB
Markdown
# DevUI Frontend
|
|
|
|
## Build Instructions
|
|
|
|
```bash
|
|
cd frontend
|
|
yarn install
|
|
|
|
# Create .env.local with backend URL
|
|
echo 'VITE_API_BASE_URL=http://localhost:8000' > .env.local
|
|
|
|
# Create .env.production (empty for relative URLs)
|
|
echo '' > .env.production
|
|
|
|
# Development
|
|
yarn dev
|
|
|
|
# Build (copies to backend)
|
|
yarn build
|
|
```
|
|
|
|
## 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/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/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...
|
|
},
|
|
},
|
|
])
|
|
```
|