You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Disable djLint formatting, use lint-only mode
The previous commit applied djLint formatting which broke generated
code syntax. This commit reverts all template formatting and configures
djLint for linting only.
## Changes
- Reverted all template file formatting (back to original state)
- Updated pyproject.toml to lint-only mode with clear warnings
- Removed format commands from composer.json (only kept lint-twig)
- Updated GitHub Actions workflow to only run linting
- Added more ignore rules for template-specific issues
- Updated README to clarify formatting is disabled
## Why Lint-Only?
djLint's HTML formatting breaks Twig templates that generate code:
- Splits TypeScript/JavaScript function signatures across lines
- Adds unwanted indentation in code generation blocks
- Breaks syntax of generated files
Linting still provides value by catching:
- Template syntax errors
- Missing closing tags
- Basic HTML structure issues
## Usage
```bash
composer lint-twig # Lint templates for syntax issues
```
This project uses [djLint](https://djlint.com/) to lint and format Twig template files.
75
+
This project uses [djLint](https://djlint.com/) to lint Twig template files for syntax and common issues.
76
76
77
-
**Available commands:**
77
+
**Note:** Formatting is disabled as it breaks code generation syntax. Only linting is used.
78
+
79
+
**Available command:**
78
80
```bash
79
-
composer lint-twig # Check for linting errors
80
-
composer format-twig # Auto-format all Twig files
81
-
composer format-twig-check # Check formatting without changes
81
+
composer lint-twig # Check for linting errors
82
82
```
83
83
84
84
Requires [uv](https://github.com/astral-sh/uv) to be installed. Configuration is in `pyproject.toml`. The linter runs automatically on pull requests via GitHub Actions.
0 commit comments