Releases: johnsoncodehk/tsslint
Releases · johnsoncodehk/tsslint
v3.0.0
🚀 Features & Compatibility
- TSL Linter Compatibility Layer: The TSL(https://github.com/ArnaudBarre/tsl) compatibility layer has been consolidated for efficient and unified handling of TypeScript linting rules.
- ESLint Integration: We've re-introduced
@tsslint/compat-eslintas a separate package and updated the overall integration logic for interoperability with the existing ESLint ecosystem. - TSLint Migration: The new
importTSLintRulesfeature allows direct import of legacy TSLint rules into your configuration, simplifying the migration path from TSLint.
⚙️ Developer Experience & Efficiency
- Reduced Dependency Footprint (No esbuild):
- Removed
esbuilddependency for runtime operations. - Native
.tsImport: We now leverage Node.js's native support to import.tsfiles, reducing build complexity and improving startup speed.
- Removed
- Documentation Tooling:
tsslint-docgenIntroduced: A new tool for automated rule documentation generation.- JSDoc Improvements: Based on
tsslint-docgen, the JSDoc fordefineRuleshas been updated, providing clearer API documentation for rule developers.
- CLI Caching:
- Cleaner Projects: The CLI cache is now stored in the OS temporary directory, preventing cache files from polluting your project folders.
- Error Reporting: The core
ReporterAPI has been updated to provide more accurate error location tracing (viaReporter.atand chainable methods), which aids rule development and debugging. - Node.js Support: Compatibility with Node.js 22.6.0 and newer versions is confirmed.
⚠️ Breaking Changes & Migration Guide
- CLI Parameter Renaming:
- Old:
--projects - New:
--project - Action Required: Update your CLI scripts to use the singular form
--project.
- Old:
- ESLint Plugin Renaming:
- Old:
createDisableNextLinePlugin - New:
createIgnorePlugin - Action Required: Update your ESLint configurations to use
createIgnorePlugin.
- Old:
- Removal of
--threads(Resource Efficiency Rationale):- Reasoning: Due to Node.js's memory-sharing limitations, multi-threading in TypeScript projects often leads to poor resource utilization. Benchmarks showed that multi-threading could consume 2x the energy for only a 1.5x speed increase (with performance degrading further with more threads).
- Decision: As a project committed to system resource efficiency, we are deprecating this inefficient mode of operation.
- Future Plan: We plan to introduce a more rational and resource-efficient multi-threading solution in a future release to provide performance gains for large projects without sacrificing system resources.
- Action Required: Please update your automation scripts or CI/CD configurations.
- Core Refactoring: This release includes significant underlying refactoring and API adjustments. Please check the latest README to understand the latest API usage and configuration details.
- Deprecated Feature Removal: Support for the deprecated
--projectsCLI flag and the olddisableNextLineESLint plugin has been removed.
v1.4.0
@tsslint/cli
- CLI output information readability improved
-
Linting results for rules that do not use semantic information can now be cached (#29)
-
Add parallel support (disabled by default)
-
New CLI options
--force: Disable caching--threads: Number of parallel threads
@tsslint/config
- New
createIgnorePluginAPI
Directive comments like @ts-ignore, @ts-expect-error can now be implemented through the built-in createIgnorePlugin API.
import { defineConfig, createIgnorePlugin } from '@tsslint/config';
export default defineConfig({
plugins: [
createIgnorePlugin('@tsslint-ignore', false),
createIgnorePlugin('@tsslint-expect-error', true),
createIgnorePlugin('eslint-disable-next-line', false),
],
// ...- built-in auto-completion support for
createIgnorePlugin(#30)
Ignore directive completion in comment.
Rule id completion with the ignore directive.
- built-in quick fix support for
createIgnorePlugin
@tsslint/eslint
-
New
createShowDocsActionPluginAPI (#13) -
The
loadPluginRulesAPI has been renamed toconvertConfig
@tsslint/typescript-plugin
- Source mapping in the IDE no longer jumps to non-existent .ts files
