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

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin