Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
prettier-tslint
Advanced tools
Formats your TypeScript using prettier
followed by tslint --fix
.
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.
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.
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
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.
See CONTRIBUTING.md
FAQs
Formats your TypeScript using Prettier followed by tslint --fix
The npm package prettier-tslint receives a total of 4,108 weekly downloads. As such, prettier-tslint popularity was classified as popular.
We found that prettier-tslint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.