Giter VIP home page Giter VIP logo

tslint-to-eslint-config's Introduction

tslint-to-eslint-config

Code Style: Prettier Coverage: 100% TypeScript: Strict NPM version Circle CI Join the chat at https://gitter.im/tslint-to-eslint-config/community Code Style: Prettier

Converts your TSLint configuration to the closest reasonable ESLint equivalent.

๐Ÿ‘‰ Did you know TSLint is deprecated? Hooray! Use tslint-to-eslint-config to expedite migrating your project onto ESLint.

Consider taking a peek at the relevant documentation: ๐Ÿค”

Usage

npx tslint-to-eslint-config

โšก (wow, so simple!) โšก

The tslint-to-eslint-config command reads in any existing linter, TypeScript, and package configuration files, then creates an .eslintrc.js result based on them.

For any TSLint rules with corresponding ESLint equivalents, those equivalents will be used in the new configuration. TSLint rules without ESLint equivalents will be wrapped with eslint-plugin-tslint.

Requires Node 10+ (LTS) and TSLint 5.18+

FAQs

We strongly advise reading docs/FAQs.md before planning your conversion from ESLint to TSLint.

CLI Flags

Each of these flags is optional:

  • config: Path to print the generated ESLint configuration file to.
  • editor: Path to an editor configuration file to convert linter settings within.
  • eslint: Path to an ESLint configuration file to read settings from.
  • package: Path to a package.json file to read dependencies from.
  • tslint: Path to a TSLint configuration file to read settings from.
  • typescript: Path to a TypeScript configuration file to read TypeScript compiler options from.

config

npx tslint-to-eslint-config --config .eslintrc.json

Default: .eslintrc.js

Path to print the generated ESLint configuration file to.

The file extension of this path will be used to determine the format of the created file:

  • .js file paths will be written module.exports = ... JavaScript
  • Other file paths will default to JSON

editor

npx tslint-to-eslint-config --editor ./path/to/.vscode/settings.json

Default: .vscode/settings.json

Path to an editor configuration file to convert settings settings within. Any VS Code style editor settings for TSLint will be converted to their ESLint equivalents.

eslint

npx tslint-to-eslint-config --eslint ./path/to/eslintrc.js

Default: --config's value

Path to an ESLint configuration file to read settings from. The generated ESLint configuration file will include any settings imported from this file.

package

npx tslint-to-eslint-config --package ./path/to/package.json

Default: package.json

Path to a package.json file to read dependencies from. This will help inform the generated ESLint configuration file's env settings.

tslint

npx tslint-to-eslint-config --tslint ./path/to/tslint.json

Default: tslint.json

Path to a TSLint configuration file to read settings from. This file is piped into TSLint's --print-config to generate the list of rules to enable in the generated ESLint configuration file.

typescript

npx tslint-to-eslint-config --typescript ./path/to/tsconfig.json

Default: tsconfig.json

Path to a TypeScript configuration file to read TypeScript compiler options from. This will help inform the generated ESLint configuration file's env settings.

Development

See the Code of Conduct and general development docs. ๐Ÿ’–

tslint-to-eslint-config's People

Contributors

adamazing avatar afonsojramos avatar akx avatar alejo90 avatar asponda avatar beenotung avatar bmeverett avatar bouzuya avatar bpallares avatar cthompson527 avatar cy6erskunk avatar da-snap avatar deerawan avatar dependabot[bot] avatar dimabory avatar eranshabi avatar gzuzmark avatar holgerjeromin avatar jeremyyap avatar joshuakgoldberg avatar kingdarboja avatar kleeut avatar matthiaskunnen avatar mauricetmeyer avatar melbarch avatar moznion avatar mrcube42 avatar renovate[bot] avatar yashdalfthegray avatar zip753 avatar

Watchers

 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.