Socket
Socket
Sign inDemoInstall

eslint-config-xo-typescript

Package Overview
Dependencies
126
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-xo-typescript

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


Version published
Weekly downloads
88K
decreased by-3.68%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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"
		}
	}
}

Keywords

FAQs

Last updated on 08 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc