• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code ➡️ prettier ➡️ tslint --fix ➡️ Formatted Code ✨

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

More Repositories

1

styled-css-grid

🍱 A tiny CSS grid layout for React
JavaScript
624
star
2

jest-runner-tsc

🃏A Jest runner for the TypeScript compiler
JavaScript
177
star
3

eslint-plugin-monorepo

ESLint Plugin for monorepos
JavaScript
74
star
4

prettier-config

My personal Prettier configuration
56
star
5

prettier-plugin-bash

Bash plugin for Prettier
JavaScript
38
star
6

prettier-transform

Perform AST transforms before running prettier
JavaScript
24
star
7

vscode-csproj

📕 Visual Studio Code extension to keep your csproj files up to date.
TypeScript
21
star
8

get-monorepo-packages

Get a list of packages from a monorepo
JavaScript
19
star
9

haloapi.js

🎮 Halo 5 API JavaScript client written in TypeScript.
JavaScript
19
star
10

eslint-plugin-mdx

ESLint Plugin for MDX
JavaScript
19
star
11

ast-grep

🔍 Like grep, but more powerful than you can possibly imagine
JavaScript
16
star
12

vscode-levels

🎎 JavaScript scope-based syntax highlighting
TypeScript
13
star
13

monorepo-experiments

Experimenting with rollup and monorepos for front-end apps.
JavaScript
9
star
14

reddit-place-wallpaper

Set reddit.com/r/place as your wallpaper, auto updates
JavaScript
8
star
15

es-function-partial-curry

🚀 Partial application and function currying for EcmaScript.
JavaScript
6
star
16

bob-ross

🎨 Bob Ross Color Palette
JavaScript
6
star
17

lerna-get-packages

Get a list of packages from a lerna repository
JavaScript
4
star
18

jest-magic-mock

JavaScript
4
star
19

generator-npm-package

📦 An opinionated npm package bootstrapper
JavaScript
3
star
20

up-api-google-sheets

Prototype for using the Up Banking API in Google Sheets
JavaScript
3
star
21

ioc-ts

TypeScript Dependency Injection
TypeScript
2
star
22

bingo

Bingo web app
JavaScript
2
star
23

hyperdash

A dashboard for hyperlinks
JavaScript
2
star
24

dailyflag.now.sh

Flag of the Day
JavaScript
2
star
25

minesweeper

Simple minesweeper web app built to learn Knockout.js
TypeScript
2
star
26

simple-text-editor

(really) simple command-line text editor
JavaScript
2
star
27

up-sankey

Sankey Diagrams for Up Accounts
TypeScript
2
star
28

haloapi-schema

JSON-schemas for validating the structure of JSON responses of the Halo 5 Developer's API
2
star
29

concept-lang

The Concept Programming Language
C
1
star
30

world-flags

A simple game to learn world flags
JavaScript
1
star
31

ansible-winrm-kerberos

Ansible docker image with Kerberos and WinRM installed on Ubuntu
Dockerfile
1
star
32

blokuz

Blokuz
JavaScript
1
star
33

fierier

guy fieri
JavaScript
1
star
34

tetris

Java
1
star
35

around-the-world

Simple to use ICU localization library built for MessageFormat
JavaScript
1
star
36

types-b-gone

Convert TypeScript Code to JavaScript in-place
JavaScript
1
star
37

docker-node-git

Node.js Alpine Docker Image with git installed
1
star
38

how-far-lucas-go

Ruby
1
star
39

duck-magic

Utilities for Ducks - Modular Redux
JavaScript
1
star
40

prettier-python-lambda

Lambda function for parsing Python code into a JSON AST
Python
1
star