Socket
Socket
Sign inDemoInstall

@plato/eslint-config-ts

Package Overview
Dependencies
0
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @plato/eslint-config-ts

Shareable ESLint config for TypeScript at Plato


Version published
Maintainers
10
Install size
5.73 kB
Created

Readme

Source

@plato/eslint-config-ts

A shareable ESLint configuration for TypeScript projects at Plato.

Setup

Configuration

First, install this package, along with ESLint, TypeScript, and associated plugins, as development dependencies:

yarn add @plato/eslint-config-ts eslint typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser --dev

ℹ️ Since the command above can be difficult to visually parse, the required development dependencies are:

Next, add the ESLint configuration (which simply extends @plato/eslint-config-ts) to your project's package.json file:

{
	"eslintConfig": {
		"extends": "@plato/eslint-config-ts"
	}
}

ℹ️ You may also specify the ESLint configuration in a separate .eslintrc.json file.

Run the Linter

To easily run the linter from a shell, add a lint command to the scripts property of your project's package.json file:

{
	"scripts": {
		"lint": "eslint path/to/lint --ext .ts"
	}
}

Now you can run yarn lint to lint the project's code.

Editor Integration

Many editors support ESLint. Here are some common editors and associated ESLint plugins.

Example Configuration

A complete package.json might look similar to the following:

{
	"name": "my-package",
	"version": "0.1.0",
	"scripts": {
		"build": "tsc",
		"lint": "eslint path/to/lint --ext .ts"
	},
	"devDependencies": {
		"@plato/eslint-config-ts": "^0.3.0",
		"@typescript-eslint/eslint-plugin": "^4.13.0",
		"@typescript-eslint/parser": "^4.13.0",
		"eslint": "^7.17.0",
		"typescript": "^4.1.3"
	},
	"eslintConfig": {
		"extends": "@plato/eslint-config-ts"
	}
}

Keywords

FAQs

Last updated on 17 Jun 2022

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc