Contributor
Esther Xiao

Autofix for Spectral Linting Errors: VS Code Extension


Mentors
Pavel Bodiachevskii
Organization
AsyncAPI
Technologies
node.js, typescript, Jacascript
Topics
web, api, developer tools
I propose to enhance the AsyncAPI Preview and Spectral VS Code extension by adding an autofix feature for common Spectral linting errors. This project aims to improve developer efficiency by automating error corrections within AsyncAPI documents. Using VS Code’s APIs, the feature will identify errors, consult a detailed ruleset for applicable fixes, and apply these corrections directly in the editor. Key Deliverables: **Implementation of the Autofix Feature** Automatically corrects predefined linting errors detected by Spectral **Development of a Comprehensive Ruleset** Outlines eligible errors for autofix with specific fix logic. **User Experience Enhancements** Ensures modifications are precise, affecting only relevant lines to prevent structural errors. **Unit Testing for Each Fix Function** Ensures the reliability and accuracy of autofixes through comprehensive unit tests, covering all scenarios to catch potential issues early.