A linter that runs inside tsserver. No separate process, no re-parsing, no ESTree conversion. It uses the TypeChecker your editor already has.
Zero built-in rules. You write what you need with the full TypeScript compiler API.
ESLint works, but it runs separately and sets up its own type-checking. On large projects, "Auto Fix on Save" gets laggy.
TSSLint avoids this by running as a tsserver plugin. It reuses the existing TypeChecker, works on native TypeScript AST, and skips the parser conversion layer.
npm install @tsslint/config --save-devCreate tsslint.config.ts:
import { defineConfig } from '@tsslint/config';
export default defineConfig({
rules: {
// your rules here
},
});VSCode: Install the TSSLint extension.
Other editors: Add the plugin to tsconfig.json:
{
"compilerOptions": {
"plugins": [{ "name": "@tsslint/typescript-plugin" }]
}
}import { defineRule } from '@tsslint/config';
export default defineRule(({ typescript: ts, file, report }) => {
ts.forEachChild(file, function cb(node) {
if (node.kind === ts.SyntaxKind.DebuggerStatement) {
report('Debugger statement is not allowed.', node.getStart(file), node.getEnd());
}
ts.forEachChild(node, cb);
});
});For a real-world example, see vuejs/language-tools tsslint.config.ts.
Diagnostics are cached by default. The cache invalidates automatically when:
- A rule accesses
RuleContext.program(type-aware rules) - A rule calls
report().withoutCache()
Every report() captures a stack trace. Click the diagnostic in your editor to jump to the exact line in your rule that triggered it.
npx tsslint --project tsconfig.json
npx tsslint --project tsconfig.json --fix
npx tsslint --project packages/*/tsconfig.jsonRun npx tsslint --help for all options.
TSSLint only does diagnostics and fixes. Run Prettier or dprint after --fix.
TSSLint works with Vue, MDX, Astro, and anything else that plugs into tsserver. These tools virtualize their files as TypeScript for tsserver. TSSLint just sees and lints that TypeScript.
You can load rules from ESLint and TSLint through compatibility layers.
npm install @tsslint/compat-eslint --save-dev
npm install eslint --save-dev # optional, for built-in rules
npx tsslint-docgen # generates JSDoc for IDE supportimport { defineConfig, importESLintRules } from '@tsslint/config';
export default defineConfig({
rules: {
...await importESLintRules({
'no-unused-vars': true,
'@typescript-eslint/no-explicit-any': true,
}),
},
});npm install tslint --save-dev # optional, for built-in rules
npx tsslint-docgenimport { defineConfig, importTSLintRules } from '@tsslint/config';
export default defineConfig({
rules: {
...await importTSLintRules({
'no-console': true,
}),
},
});npm install tsl --save-devimport { defineConfig, fromTSLRules } from '@tsslint/config';
import { core } from 'tsl';
export default defineConfig({
rules: fromTSLRules(core.all()),
});import { defineConfig, createIgnorePlugin } from '@tsslint/config';
export default defineConfig({
rules: { ... },
plugins: [createIgnorePlugin('tsslint-ignore', true)],
});Then use // tsslint-ignore comments in your code.
- Requires Node.js 22.6.0+
- Not compatible with typescript-go (v7) - it doesn't support Language Service Plugins



