Added a .gitattributes to enforce consistent line endings (LF for source/docs, CRLF for Windows

scripts) and re-enabled the ESLint linebreak-style rule for LF.

  Details:

  - .gitattributes added at repo root to normalize line endings across platforms.
  - .eslintrc.js set back to ["error", "unix"] for JS linting.
This commit is contained in:
ToniIAPro73 2025-12-27 09:38:43 +01:00
parent 82a973c043
commit ec7751ef36
4 changed files with 50 additions and 2 deletions

15
.gitattributes vendored Normal file
View file

@ -0,0 +1,15 @@
* text=auto
*.js text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.css text eol=lf
*.html text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.py text eol=lf
*.sh text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

33
AGENTS.md Normal file
View file

@ -0,0 +1,33 @@
# Repository Guidelines
## Project Structure & Module Organization
- `modules/` holds core Python runtime, UI, and model plumbing (most edits land here).
- `scripts/` contains optional generation/postprocessing scripts; `extensions-builtin/` and `extensions/` are for bundled and user extensions.
- Frontend assets live in `javascript/`, `html/`, `style.css`, and `script.js`.
- Configuration and model assets are under `configs/`, `models/`, `embeddings/`, and `textual_inversion_templates/`.
- Tests live in `test/` with fixtures and assets in `test/test_files/`.
## Build, Test, and Development Commands
- `webui-user.bat` (Windows) or `./webui.sh` (Linux/macOS) starts the app and manages deps.
- `python launch.py` runs the launcher directly (useful for debugging).
- `npm run lint` runs ESLint for JavaScript; `npm run fix` applies fixes.
- `python -m ruff check .` runs Python linting if Ruff is installed.
## Coding Style & Naming Conventions
- Python follows PEP 8 conventions (4 spaces, `snake_case`), with Ruff configured in `pyproject.toml`.
- JavaScript uses 4-space indentation and ESLint rules from `.eslintrc.js`; prefer `camelCase`.
- Keep new files near their feature area (e.g., UI changes in `modules/ui_*.py`, assets in `javascript/`/`html/`).
## Testing Guidelines
- Tests use `pytest` (`requirements-test.txt`) with `test_*.py` naming.
- API tests assume the web UI is running at `http://127.0.0.1:7860` (see `pyproject.toml`).
- Run all tests with `pytest` from the repo root; add new tests alongside related modules.
## Commit & Pull Request Guidelines
- Recent history uses short, lower-case subjects and includes merge commits (e.g., `update CHANGELOG`).
- Keep commit subjects concise and specific; avoid bundling unrelated changes.
- PRs should describe the user-facing impact, include steps to test, and link relevant issues.
## Configuration & Assets
- Put local launch args in `webui-user.bat` or `webui-user.sh`; avoid committing machine-specific paths.
- Large model files and generated images belong in `models/` and `outputs/`, and should not be committed.

BIN
Captura.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

View file

@ -1,8 +1,8 @@
@echo off
set PYTHON=
set PYTHON=py -3.11
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=
set COMMANDLINE_ARGS=--api
call webui.bat