Skip to content
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

Bump deps, add ci (lint, formatting checks) and fix linting and formatting issues #227

Merged
merged 12 commits into from
Sep 26, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: CI

on:
pull_request:
workflow_dispatch:

jobs:
ci:
name: CI
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"

- name: Install dependencies
run: npm ci

- name: Run Prettier
run: npm run prettier:check

- name: Run ESLint
run: npm run lint

- name: Run stylelint
run: npm run stylelint

- name: Test build
run: npm run build
3 changes: 2 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Deploy site to Pages

on:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version-file: ".node-version"
cache: npm
- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.17.0
12 changes: 0 additions & 12 deletions .prettierrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-tailwindcss"],
trailingComma: "es5",
tabWidth: 2,
useTabs: true,
singleQuote: false,
semi: true,
bracketSameLine: false,
bracketSpacing: true,
jsxSingleQuote: false,
quoteProps: "as-needed",
endOfLine: "lf",
};
11 changes: 11 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-html/html"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind"]
}
]
}
}
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions babel.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
presets: ["@docusaurus/core/lib/babel/preset"],
};
2 changes: 2 additions & 0 deletions blog/2024-06-11-UI-Should-Not-Be-The-Bottleneck/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tags: [release, v0.3.3]
---

WIP

<!--truncate-->
2 changes: 1 addition & 1 deletion docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Everything you need to run Open WebUI, including your data, remains within your

#### **Q: I tried to login and couldn't, made a new account and now I'm being told my account needs to be activated by an admin.**

**A:** This situation occurs when you forget the password for the initial admin account created during the first setup. The first account is automatically designated as the admin account. Creating a new account without access to the admin account will result in the need for admin activation. Avoiding the loss of the initial admin account credentials is crucial for seamless access and management of Open WebUI. See the [Resetting the Admin Password](troubleshooting#reset-admin-password) guide for instructions on recovering the admin account.
**A:** This situation occurs when you forget the password for the initial admin account created during the first setup. The first account is automatically designated as the admin account. Creating a new account without access to the admin account will result in the need for admin activation. Avoiding the loss of the initial admin account credentials is crucial for seamless access and management of Open WebUI. See the [Resetting the Admin Password](troubleshooting/password-reset) guide for instructions on recovering the admin account.

#### **Q: Why does the WebUI project can't be started with ssl error?**

Expand Down
2 changes: 1 addition & 1 deletion docs/pipelines/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "⚡ Pipelines",
"position": 700
}
}
15 changes: 1 addition & 14 deletions docs/troubleshooting/network-diagrams.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ title: "🕸️ Network Diagrams"

Here, we provide clear and structured diagrams to help you understand how various components of the network interact within different setups. This documentation is designed to assist both macOS/Windows and Linux users. Each scenario is illustrated using Mermaid diagrams to show how the interactions are set up depending on the different system configurations and deployment strategies.

## Table of Contents
tjbck marked this conversation as resolved.
Show resolved Hide resolved
1. [Mac OS/Windows Setup Options](#macoswindows-setup-options)
- [Ollama on Host, Open WebUI in Container](#ollama-on-host-open-webui-in-container)
- [Ollama and Open WebUI in Compose Stack](#ollama-and-open-webui-in-compose-stack)
- [Ollama and Open WebUI, Separate Networks](#ollama-and-open-webui-separate-networks)
- [Open WebUI in Host Network](#open-webui-in-host-network)
2. [Linux Setup Options](#linux-setup-options)
- [Ollama on Host, Open WebUI in Container](#ollama-on-host-open-webui-in-container-linux)
- [Ollama and Open WebUI in Compose Stack](#ollama-and-open-webui-in-compose-stack-linux)
- [Ollama and Open WebUI, Separate Networks](#ollama-and-open-webui-separate-networks-linux)
- [Open WebUI in Host Network, Ollama on Host](#open-webui-in-host-network-ollama-on-host)


## Mac OS/Windows Setup Options 🖥️

### Ollama on Host, Open WebUI in Container
Expand Down Expand Up @@ -173,4 +160,4 @@ Rel(user, openwebui, "Makes requests via listening port", "http://localhost:8080
UpdateRelStyle(user, openwebui, $offsetX="-100", $offsetY="-50")
```

Each setup addresses different deployment strategies and networking configurations to help you choose the best layout for your requirements.
Each setup addresses different deployment strategies and networking configurations to help you choose the best layout for your requirements.
2 changes: 1 addition & 1 deletion docs/tutorials/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"link": {
"type": "generated-index"
}
}
}
4 changes: 2 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ const config: Config = {
href: "https://discord.gg/5rJgQTnV4s",
},
{
label: "Twitter",
href: "https://twitter.com/OpenWebUI",
label: "𝕏",
href: "https://x.com/OpenWebUI",
},
],
},
Expand Down
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
// import docusaurus from '@docusaurus/eslint-plugin'; // https://github.com/facebook/docusaurus/issues/10490

export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
// docusaurus.configs.recommended, // https://github.com/facebook/docusaurus/issues/10490
{
files: ["*.ts", "*.tsx", "*.js", "*.mjs", "*.cjs"],
ignores: [],
rules: {},
},
];
Loading