Ultra-fast linter for ActionScript 3 with VSCode integration.
Built with Rust and Tree-sitter for incremental parsing. Works as a CLI tool and as an LSP server for real-time diagnostics in VSCode-based IDEs.
- Blazing fast - Rust-based with parallel file processing via Rayon
- Incremental parsing - Tree-sitter reuses unchanged AST subtrees
- Auto-fix - Automatic corrections for naming conventions, unused code, and more
- LSP Server - Real-time diagnostics, document symbols, hover definitions and tooltips
- VSCode Extension - Full integration with Antigravity IDE / VSCode (Outline view, Ctrl+Click Go to Definition, Hover details)
- JSON Configuration - Simple
.aslintrc.jsonconfig file - Inline Disables - Ignore specific warnings using code comments like
// aslint-disable-next-line
# From source
cargo install --path crates/aslint-cli
# Or download from releases
# https://github.com/InferPort/aslint/releases- Download the latest
.vsixfrom Releases - Install:
code --install-extension aslint-0.1.0.vsix # or for Antigravity IDE: antigravity-ide --install-extension aslint-0.1.0.vsix --force
# Lint files
aslint lint src/
# Lint with auto-fix
aslint lint --fix src/
# Lint and remove empty if statements matching `if (cond) {}`
aslint lint --remove-empty-ifs src/
# Initialize config
aslint init
# Show resolved config
aslint configOpen any .as file and diagnostics will appear automatically.
- Outline (Contorno): View the structure of class declarations, methods, and variables.
- Go to Definition:
Ctrl+ClickorF12on any symbol to jump to its declaration. - Hover Docs: Hover over a symbol to view its type definition and preceding comments.
- Remove Empty IFs: Add
"aslint.removeEmptyIfs": trueto your VSCode settings to automatically remove emptyif (...) {}blocks on format/save. - Inline Disables: Put
// aslint-disable-next-line <rule-id>or/* aslint-disable */to suppress linter warnings.
| Rule | Severity | Fix | Description |
|---|---|---|---|
no-unused-variables |
warn | Yes | Detects declared but unused variables |
no-unused-imports |
warn | Yes | Detects imported but unused modules |
no-undef |
error | No | Detects references to undefined identifiers |
no-duplicate-variables |
error | No | Detects duplicate variable declarations |
prefer-const |
info | Yes | Suggests const for never-reassigned variables |
| Rule | Severity | Fix | Description |
|---|---|---|---|
naming-class |
warn | Yes | Enforces PascalCase for class names |
naming-function |
warn | Yes | Enforces camelCase for function names |
naming-variable |
warn | Yes | Enforces camelCase for variable names |
naming-constant |
warn | Yes | Enforces SCREAMING_SNAKE_CASE for constants |
| Rule | Severity | Fix | Description |
|---|---|---|---|
no-eval |
error | No | Disallows eval() usage |
no-with-statement |
error | No | Disallows with statement |
no-label |
warn | No | Disallows labels |
no-empty-block |
info | No | Warns on empty code blocks |
no-unreachable-code |
warn | No | Detects code after return/throw/break/continue |
no-toplevel-code |
info | No | Warns on code outside functions/classes |
Create .aslintrc.json in your project root:
{
"rules": {
"no-unused-variables": "warn",
"no-undef": "error",
"naming-class": {
"severity": "warn",
"options": { "style": "PascalCase" }
},
"naming-function": {
"severity": "warn",
"options": { "style": "camelCase" }
},
"naming-variable": {
"severity": "warn",
"options": { "style": "camelCase" }
},
"naming-constant": {
"severity": "warn",
"options": { "style": "SCREAMING_SNAKE_CASE" }
}
},
"fix": true,
"include": ["src/**/*.as"],
"exclude": ["lib/**", "node_modules/**"]
}error- Exits with code 1, blocks CIwarn- Reported but doesn't failinfo- Informational onlyoff- Disabled
aslint/
├── crates/
│ ├── aslint-core/ # Core linting engine (parser, rules, diagnostics)
│ ├── aslint-cli/ # CLI binary
│ └── aslint-lsp/ # LSP server binary
├── editors/
│ └── vscode/ # VSCode extension
└── .github/
└── workflows/ # CI/CD pipelines
- Parser: Tree-sitter with ActionScript 3 grammar
- Rules: Modular rule system with auto-fix support
- Diagnostics: LSP-compatible diagnostic format
- Config: JSON-based configuration with defaults
- Parallel file processing via Rayon
- Multiple output formats (stylish, json, compact)
- Auto-fix with in-place editing
- tower-lsp-server based
- Full text sync and diagnostics
- Document formatting via auto-fix rules
- Code actions for quick fixes
# Build debug
cargo build
# Run tests
cargo test
# Lint the linter
cargo clippy
# Format
cargo fmt
# Build release
cargo build --release
# Package VSCode extension
cd editors/vscode
npm install
npm run compile
npx -y @vscode/vsce package| Metric | Value |
|---|---|
| Parse (1K lines) | ~1ms |
| Lint (1K lines) | ~5ms |
| Lint (10K lines) | ~50ms |
| Binary size | ~3.5MB |
MIT