Giter Site home page Giter Site logo

semabigcorp / tslint-config-prettier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prettier/tslint-config-prettier

0.0 0.0 0.0 1.65 MB

Use TSLint with Prettier without any conflict

License: MIT License

JavaScript 0.77% TypeScript 99.23%

tslint-config-prettier's Introduction

tslint-config-prettier

npm Travis downloads dependencies Status devDependencies Status

๐Ÿ‘ฎ TSLint + ๐Ÿ’… Prettier = ๐Ÿ˜

Do you want to use TSLint and Prettier without conflicts? tslint-config-prettier disables all conflicting rules that may cause such problems. Prettier takes care of the formatting whereas tslint takes care of all the other things.

Check how it works in this tutorial.

Get started

yarn add --dev tslint-config-prettier
# or
npm install --save-dev tslint-config-prettier

Make sure you've already set up TSLint and Prettier.

Then, extend your tslint.json, and make sure tslint-config-prettier is at the end:

{
  "extends": [
    "tslint:latest",
    "tslint-config-prettier"
  ]
}

More configuration

tslint-config-prettier also turns off formatting rules from the following rulesets, so you can use them safely.

{
  "extends": [
    "tslint:latest",
    "tslint-react",
    "tslint-eslint-rules",
    "tslint-config-prettier"
  ]
}

CLI helper tool

tslint-config-prettier is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier. (require tslint installed)

In order to execute the CLI tool, first add a script for it to package.json:

{
  "scripts": {
    "tslint-check": "tslint-config-prettier-check ./tslint.json"
  }
}

Then run yarn tslint-check or npm run tslint-check.

Or simply run npx tslint-config-prettier-check ./tslint.json.

Tutorials

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Related

  • tslint-plugin-prettier - Runs Prettier as a TSLint rule and reports differences as individual TSLint issues.

Credits

Made with โค๏ธ by @alexjoverm and all its contributors

tslint-config-prettier's People

Contributors

akalitenya avatar alexjoverm avatar astorije avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar drashti4 avatar eps1lon avatar greenkeeper[bot] avatar greenkeeperio-bot avatar ikatyang avatar lipis avatar mischah avatar omahlama avatar rowhitswami avatar tabs16 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.