1. eslint-config-xo-typescript
ESLint shareable config for TypeScript to be used with eslint-config-xo
eslint-config-xo-typescript
Package: eslint-config-xo-typescript
Created by: xojs
Last modified: Fri, 08 Mar 2024 15:50:47 GMT
Version: 4.0.0
License: MIT
Downloads: 383,902
Repository: https://github.com/xojs/eslint-config-xo-typescript

Install

npm install eslint-config-xo-typescript
yarn add eslint-config-xo-typescript

eslint-config-xo-typescript

ESLint shareable config for TypeScript to be used with eslint-config-xo

This config assumes your project is ESM and that you use a strict config.

Install

 npm install --save-dev eslint-config-xo eslint-config-xo-typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin

Use with XO

XO has built-in support for TypeScript, using this package under the hood, so you do not have to configure anything.

Standalone Usage

Add some ESLint config to your package.json (or .eslintrc):

 {
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": [
			"xo",
			"xo-typescript"
		]
	}
}

Use the space sub-config if you want 2 space indentation instead of tabs:

 {
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": [
			"xo",
			"xo-typescript/space"
		]
	}
}

Note: If your tsconfig.json is not in the same directory as package.json, you will have to set the path yourself:

 {
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": [
			"xo",
			"xo-typescript"
		],
		"parserOptions": {
			"project": "some-path/tsconfig.json"
		}
	}
}

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code