Skip to content

Commit c201bb1

Browse files
feat(ls): add AsyncAPI 3 validation for new keywords (#5104)
1 parent 2c0d3c6 commit c201bb1

File tree

172 files changed

+4570
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+4570
-486
lines changed

.commitlintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": ["@commitlint/config-conventional"],
3+
"defaultIgnores": true,
34
"rules": {
45
"header-max-length": [2, "always", 75],
56
"scope-case": [

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules/
55
.vscode/settings.json
66
isolate-*.log
77
.log*
8+
.DS_Store

CLAUDE.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,73 @@ docker exec -it apidom-dev npm run test
217217
- Always use `.ts` extension in imports (enforced): `import foo from './foo.ts'`
218218
- Import ordering: builtin/external/internal, then parent/sibling/index with newlines between groups
219219

220+
### Git Commit Conventions
221+
222+
**⚠️ CRITICAL**: All commits MUST follow the Conventional Commits specification (commitlint).
223+
224+
**Commit Message Format:**
225+
```
226+
<type>(<scope>): <subject>
227+
228+
[optional body]
229+
230+
[optional footer]
231+
```
232+
233+
**Allowed Types:**
234+
- `feat`: New feature
235+
- `fix`: Bug fix
236+
- `docs`: Documentation changes
237+
- `style`: Code style changes (formatting, missing semicolons, etc.)
238+
- `refactor`: Code refactoring (neither fixes a bug nor adds a feature)
239+
- `perf`: Performance improvements
240+
- `test`: Adding or updating tests
241+
- `build`: Changes to build system or dependencies
242+
- `ci`: Changes to CI configuration
243+
- `chore`: Other changes that don't modify src or test files
244+
- `revert`: Reverts a previous commit
245+
246+
**Scope Examples:**
247+
- Package names: `core`, `ls`, `parser`, `reference`
248+
- Spec namespaces: `openapi`, `asyncapi`, `arazzo`
249+
- Feature areas: `validation`, `refractor`, `visitor`
250+
251+
**Subject Guidelines:**
252+
- Use imperative mood: "add feature" not "added feature"
253+
- No capitalization of first letter
254+
- No period at the end
255+
- Keep header (type + scope + subject) under 75 characters
256+
257+
**Commit Body Restrictions:**
258+
- **MUST** have a blank line between subject and body
259+
- Each body line should wrap at 100 characters maximum
260+
- Body is optional but recommended for complex changes
261+
- Explain the "why" and "what", not the "how"
262+
- Use present tense: "change" not "changed"
263+
- Reference issues/PRs when applicable: "Fixes #123", "Related to #456"
264+
265+
**Examples:**
266+
```bash
267+
# Simple commit (no body needed)
268+
feat(ls): add validation rules for AsyncAPI 3.0 Operation object
269+
270+
# Complex commit with body
271+
fix(core): correct element traversal in nested structures
272+
273+
The previous traversal algorithm incorrectly skipped intermediate nodes
274+
when dealing with deeply nested ApiDOM elements. This fix ensures all
275+
nodes are visited in the correct order.
276+
277+
Fixes #1234
278+
279+
# With Co-Authored-By footer
280+
docs(readme): update installation instructions
281+
282+
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
283+
```
284+
285+
**When creating commits through git commands, ALWAYS follow this format. Commitlint hooks will reject non-compliant commit messages.**
286+
220287
### WASM Builds
221288
The `prebuild` script builds WASM directly inside `node_modules` for tree-sitter packages. This happens before the main build.
222289

@@ -233,3 +300,9 @@ Packages follow a dependency hierarchy:
233300
- Language service depends on reference
234301

235302
When modifying core packages, expect cascading build requirements in dependent packages.
303+
304+
## Package-Specific Documentation
305+
306+
Some packages have additional documentation in their own CLAUDE.md files:
307+
308+
- **apidom-ls** (`packages/apidom-ls/CLAUDE.md`): Comprehensive guidelines for implementing lint validation rules, with lessons learned from PR reviews and real-world examples.

packages/apidom-ls/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/types
66
/NOTICE
77
/swagger-api-apidom-ls-*.tgz
8+
.DS_Store

0 commit comments

Comments
 (0)