Socket
Socket
Sign inDemoInstall

prettier-tslint

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-tslint

Formats your TypeScript using Prettier followed by tslint --fix


Version published
Weekly downloads
4.3K
increased by0.68%
Maintainers
1
Weekly downloads
 
Created
Source

prettier-tslint

Formats your TypeScript using prettier followed by tslint --fix.

Travis Prettier npm semantic-release License

Install

With npm:

npm install --save-dev prettier-tslint

Or with yarn:

yarn add --dev prettier-tslint

prettier-tslint allows you to install your own version of prettier and typescript, so make sure you've installed them, too.

Configuration

prettier-tslint find and will respect:

  • prettier's .prettierrc, or any other config file such as package.json.
  • prettier's .prettierignore file.
  • tslint's tslint.json.

prettier-tslint has no additional configuration.

CLI

Commands:
  fix    Fix one or more files
  check  List files that aren't formatted

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Examples:
  prettier-tslint fix file1.ts file2.ts  Fix provided files
  prettier-tslint fix '**/*.ts'          Fix all TypeScript files
  prettier-tslint check '**/*.ts'        List all unformatted TypeScript files

API

import { fix, check } from "prettier-tslint";

check("file.ts"); // -> false
fix("file.ts");
check("file.ts"); // -> true

Currently the fix function will write to disk and not return anything. This behavior may change in a minor release before 1.0.0 is released.

Contributing

See CONTRIBUTING.md

FAQs

Package last updated on 03 Jan 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc