Socket
Book a DemoInstallSign in
Socket

@lockerstock/react-tsconfig

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lockerstock/react-tsconfig

A TypeScript config basis. Includes, tsconfig, tslint, tslint.commit, and prettier configurations.

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

@lockerstock/react-tsconfig

A TypeScript config basis. Includes, tsconfig, tslint, tslint.commit, and prettier configurations.

Installation

npm install --save-dev @lockerstock/react-tsconfig
yarn add @lockerstock/react-tsconfig --dev

This tool has peer dependencies and will download them as needed.

Usage

Reference it in package.json using the prettier property:

{
	"name": "my-projects-name",
	"prettier": "@lockerstock/react-tsconfig",
	"devDependencies": {
		"@lockerstock/react-tsconfig": "^1.0.0",
		"husky": "^4.3.0",
		"lint-staged": "^10.3.0",
		"prettier": "^2.1.1"
	},
	"scripts": {
		"lint": "tslint --project tsconfig.json -c tslint.commit.json --fix"
	},
	"lint-staged": {
		"src/**/*.{ts,tsx}": ["yarn lint", "prettier --write"]
	},
	"husky": {
		"hooks": {
			"pre-commit": "lint-staged"
		}
	}
}

Extend the config in tsconfig.json

{
	"extends": "@lockerstock/react-tsconfig/tslint.json"
}

Extend the config in tslint.json

{
	"extends": "@alehechlockerstockka/react-tsconfig/tslint.json"
}

Extend the config in tslint.commit.json

{
	"extends": ["@lockerstock/react-tsconfig/tslint.commit.json"]
}

If you're using VS Code, turn on the formatOnSave feature by adding .vscode/settings.json:

{
	"editor.formatOnSave": true
}

Keywords

eslint

FAQs

Package last updated on 11 Sep 2020

Did you know?

Socket

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