Enable more linting rules#52
Merged
Merged
Conversation
Turn on @typescript-eslint/no-unused-vars (warn) with underscore-ignore patterns for args, vars, and caught errors, so intentionally-unused identifiers can be prefixed with `_`. Fix the resulting warnings: - Remove unused imports (LSP, Parser, Point, url, logger, ModelicaDocument) - Remove unused GLOBAL_DECLARATION_LEAF_NODE_TYPES constant - Prefix unused caught error with `_` - Drop unused parser binding in server test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Turn on @typescript-eslint/no-explicit-any (warn). Replace `any[]` with `unknown[]` in Logger.log and the debug/info/ warn/error helpers. The logger already narrows values at runtime (instanceof Error, typeof checks) and joins the rest with a string, so unknown is both sufficient and safer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Turn on @typescript-eslint/explicit-module-boundary-types (warn) and annotate the return types of all exported/public boundary functions in the client and server. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Turn on @typescript-eslint/no-non-null-assertion (warn) and replace all non-null assertions with explicit handling: - Add a requireFieldName() helper in tree-sitter that throws a descriptive error for grammar-guaranteed fields, and use it in tree-sitter and resolveReference - Return null from Analyzer.getReferenceAt when no IDENT node is found, matching the existing fallback path - Check parser.parse() results for null in ModelicaDocument and throw on failure - Guard the extension lookup in the test helper - Replace assertions in tests with assert.ok() checks Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The field was assigned in the constructor but never read. Drop it along with the constructor parameter and the capabilities value destructured from InitializeParams. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsconfig.tsbuildinfo is machine-generated incremental-build cache, not source. Add *.tsbuildinfo to .gitignore and remove the tracked client/ and server/ copies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes