Rules
A practical rule catalog by family. Each rule maps to an ESLint name where one exists. Severity in lint.config.ts is one of "error" (fails the build), "warning" (prints, exit code 0), "off" (skipped).
Authoritative source: rule typings live under
packages/lint/src/structures/rules/.Each family interface (
ITtscLintCoreRules,ITtscLintReactRules, …) owns its own rule keys.
ITtscLintRules.tsis the union accepted byITtscLintConfig.rules.The per-family pages below document what each rule does and when to keep it on.
Rule families and config types
Rule IDs use ESLint-style kebab-case with slash namespaces.
The exported ITtscLintRules type is an intersection of family-specific interfaces, so a complete rules object and smaller family objects share the same checked property names and option tuples.
| Family | Type | Rules | Namespace |
|---|---|---|---|
| Core (ESLint-compatible) | ITtscLintCoreRules | 149 | none |
| TypeScript | ITtscLintTypeScriptRules | 98 | typescript/* |
| React | ITtscLintReactRules | 29 | react/* |
| React performance | ITtscLintReactPerfRules | 4 | react-perf/* |
| JSX accessibility | ITtscLintJsxA11yRules | 37 | jsx-a11y/* |
| Next.js | ITtscLintNextjsRules | 21 | nextjs/* |
| Solid | ITtscLintSolidRules | 21 | solid/* |
| Unicorn | ITtscLintUnicornRules | 146 | unicorn/* |
| Jest | ITtscLintJestRules | 19 | jest/* |
| Vitest | ITtscLintVitestRules | 13 | vitest/* |
| Testing Library | ITtscLintTestingLibraryRules | 29 | testing-library/* |
| Playwright | ITtscLintPlaywrightRules | 31 | playwright/* |
| Cypress | ITtscLintCypressRules | 13 | cypress/* |
| Storybook | ITtscLintStorybookRules | 16 | storybook/* |
| TanStack Query | ITtscLintTanstackQueryRules | 8 | tanstack-query/* |
| Promise | ITtscLintPromiseRules | 17 | promise/* |
| Regular expressions | ITtscLintRegexpRules | 22 | regexp/* |
| Security | ITtscLintSecurityRules | 14 | security/* |
| JSDoc | ITtscLintJsdocRules | 13 | jsdoc/* |
| Functional | ITtscLintFunctionalRules | 20 | functional/* |
| Architecture boundaries | ITtscLintBoundariesRules | 6 | boundaries/* |
| Contributor plugins | ITtscLintContributorRules | user-defined | <namespace>/* |
Claim ownership
To the maintainers of the upstream rule families behind these namespaces: the in-tree rules are Go ports for the TypeScript-Go Checker.
I implemented them first so ttsc projects can use the rules without running a separate ESLint process. That is a convenience layer, not a claim over your rule family.
If you want to develop and maintain your family inside the @ttsc/lint ecosystem yourself, publish it as a contributor plugin.
You may reuse the in-tree Go rule sources under packages/lint/linthost.
The checked fixtures live under tests/test-lint/src/cases. Use both as a starting point.
Open an issue at samchon/ttsc when the package is ready. I will retire the matching in-tree port and point this catalog at your package.
Partial ownership is fine: name the subset you want to maintain, and I will remove just those rules.
The contributor-plugin path is documented in the @ttsc/lint development guide.
import type { ITtscLintConfig, ITtscLintReactRules } from "@ttsc/lint";
const reactRules = {
"react/jsx-key": "error",
"react/no-danger": "warning",
} satisfies ITtscLintReactRules;
export default {
rules: {
"no-var": "error",
...reactRules,
},
} satisfies ITtscLintConfig;A common starter set
Most projects start here. Add and remove as you go.
// lint.config.ts
import type { ITtscLintConfig } from "@ttsc/lint";
export default {
rules: {
// Variables
"no-var": "error",
"prefer-const": "error",
// Comparison
eqeqeq: "error",
"no-self-compare": "error",
// Suggestions
"typescript/no-explicit-any": "warning",
"typescript/prefer-as-const": "error",
"object-shorthand": "error",
"no-useless-rename": "error",
// Imports
"typescript/no-import-type-side-effects": "error",
"typescript/consistent-type-imports": "error",
// Misc safety
"no-debugger": "error",
"no-throw-literal": "error",
"typescript/await-thenable": "error",
},
} satisfies ITtscLintConfig;Formatter behavior is configured separately through the top-level format block (typed as ITtscLintFormat). See Format rules.
Autofix coverage at a glance
ttsc fix autofixes a subset. Native fixers cover:
no-var, single-declarationprefer-const, ESLint-safeeqeqeqtypescript/no-wrapper-object-types(primitives only;Objectis detection-only)typescript/prefer-as-const,no-useless-rename,object-shorthand,typescript/no-extra-non-null-assertiontypescript/no-unnecessary-type-constraint,typescript/prefer-namespace-keyword,no-useless-escapetypescript/no-import-type-side-effects(hoists inlinetypemodifiers)typescript/await-thenable(type-aware: dropsawaiton non-thenable operands)- Every format rule