TXO TypeScript ESLint Configuration

7.4.114 · active · verified Tue Apr 21

eslint-config-txo-typescript provides a comprehensive, opinionated ESLint configuration specifically designed for TypeScript projects. It is maintained by Technology Studio and is currently at a stable version, `7.4.114`. The package maintains a frequent release cadence, often updating to reflect changes and improvements in its underlying dependencies, particularly `typescript-eslint`. A key differentiator of this configuration is its focus on "separation of concerns," allowing for incremental migration and tailored settings based on project patterns. This approach aims to reduce friction when integrating or updating linting rules across diverse TypeScript codebases, ensuring consistency and adherence to modern best practices in a modular fashion. It leverages established ESLint plugins to enforce robust code quality and style standards.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates a basic `.eslintrc.json` file to extend the `eslint-config-txo-typescript` configuration. It sets up the TypeScript parser and explicitly defines `parserOptions` for project-wide type-aware linting, which is crucial for many advanced TypeScript rules. It also includes an example of how to override or add specific rules.

{
  "root": true,
  "env": {
    "node": true
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json",
    "tsconfigRootDir": __dirname,
    "ecmaVersion": 2022,
    "sourceType": "module"
  },
  "extends": "eslint-config-txo-typescript",
  "rules": {
    // Override or add custom rules here if needed
    "no-console": "warn",
    "@typescript-eslint/explicit-function-return-type": "off"
  }
}

view raw JSON →