Coder Social home page Coder Social logo

jethrolarson / prettier-tslint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azz/prettier-tslint

0.0 2.0 0.0 124 KB

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

Home Page: https://npm.im/prettier-tslint

License: MIT License

JavaScript 99.03% TypeScript 0.97%

prettier-tslint's Introduction

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

prettier-tslint's People

Contributors

azz avatar

Watchers

Jethro Larson avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.