Skip to content

Releases: johnsoncodehk/tsslint

v3.0.0

18 Jan 16:34

Choose a tag to compare

🚀 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-eslint as a separate package and updated the overall integration logic for interoperability with the existing ESLint ecosystem.
  • TSLint Migration: The new importTSLintRules feature 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 esbuild dependency for runtime operations.
    • Native .ts Import: We now leverage Node.js's native support to import .ts files, reducing build complexity and improving startup speed.
  • Documentation Tooling:
    • tsslint-docgen Introduced: A new tool for automated rule documentation generation.
    • JSDoc Improvements: Based on tsslint-docgen, the JSDoc for defineRules has 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 Reporter API has been updated to provide more accurate error location tracing (via Reporter.at and 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.
  • ESLint Plugin Renaming:
    • Old: createDisableNextLinePlugin
    • New: createIgnorePlugin
    • Action Required: Update your ESLint configurations to use createIgnorePlugin.
  • 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 --projects CLI flag and the old disableNextLine ESLint plugin has been removed.

v1.4.0

10 Dec 22:51

Choose a tag to compare

@tsslint/cli

  1. CLI output information readability improved

ezgif-6-f25f7833a5

  1. Linting results for rules that do not use semantic information can now be cached (#29)

  2. Add parallel support (disabled by default)

  3. New CLI options

  • --force: Disable caching
  • --threads: Number of parallel threads

@tsslint/config

  1. New createIgnorePlugin API

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),
	],
	// ...
  1. built-in auto-completion support for createIgnorePlugin (#30)

Ignore directive completion in comment.

image

Rule id completion with the ignore directive.

image
  1. built-in quick fix support for createIgnorePlugin
image

@tsslint/eslint

  1. New createShowDocsActionPlugin API (#13)

  2. The loadPluginRules API has been renamed to convertConfig

@tsslint/typescript-plugin

  1. Source mapping in the IDE no longer jumps to non-existent .ts files

v1.0.0

08 Jun 20:04

Choose a tag to compare

This is the first official release, please refer to README.md for details. 👋