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
Added a concise section explaining:
- How to lint templates locally (composer lint-twig)
- Requirements (uv for uvx commands)
- Configuration location and approach
- What the linter catches
- Note about discussing false positives in PRs
Check your output files at: /examples/new-lang and make sure the SDK works. When possible, add some unit tests.
124
124
125
+
## Linting Twig Templates
126
+
127
+
We use [djLint](https://djlint.com/) to lint Twig template files for syntax errors and common issues. The linter runs automatically on pull requests.
128
+
129
+
**To lint templates locally:**
130
+
```bash
131
+
composer lint-twig
132
+
```
133
+
134
+
**Requirements:**
135
+
-[uv](https://github.com/astral-sh/uv) must be installed (for running `uvx` commands)
136
+
137
+
**Configuration:**
138
+
- Located in `pyproject.toml`
139
+
- Only linting is enabled (formatting is disabled to avoid breaking code generation)
140
+
- Several rules are ignored as they produce false positives for code generation templates
141
+
142
+
**What the linter catches:**
143
+
- Template syntax errors
144
+
- Missing closing tags
145
+
- Extra blank lines
146
+
- Basic HTML structure issues
147
+
148
+
**Note:** If you encounter linting errors that seem incorrect for code generation templates, please discuss in your PR rather than disabling the linter.
149
+
125
150
## SDK Checklist
126
151
127
152
It is very important for us to create a consistent structure and architecture, as well as a language-native feel for the SDKs we generate.
0 commit comments