All Projects → typescript-eslint → Tslint To Eslint Config

typescript-eslint / Tslint To Eslint Config

Licence: mit
Converts your TSLint configuration to the closest possible ESLint equivalent. 🚀

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Tslint To Eslint Config

Typescript Eslint
✨ Monorepo for all the tooling which enables ESLint to support TypeScript
Stars: ✭ 10,831 (+1492.79%)
Mutual labels:  eslint, tslint, hacktoberfest
Eslint Plugin Mocha
ESLint rules for mocha
Stars: ✭ 249 (-63.38%)
Mutual labels:  eslint, hacktoberfest
Eslint Plugin Ava
ESLint rules for AVA
Stars: ✭ 209 (-69.26%)
Mutual labels:  eslint, hacktoberfest
eslint-define-config
Provide a defineConfig function for .eslintrc.js files
Stars: ✭ 61 (-91.03%)
Mutual labels:  config, eslint
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-77.06%)
Mutual labels:  eslint, tslint
Eslint Config Wesbos
No-Sweat™ Eslint and Prettier Setup - with or without VS Code
Stars: ✭ 2,293 (+237.21%)
Mutual labels:  eslint, hacktoberfest
eslint-config-hardcore
The most strict (yet practical) ESLint config. 34 plugins. 1047 rules.
Stars: ✭ 168 (-75.29%)
Mutual labels:  config, eslint
Eslint Plugin Wc
ESLint rules for Web Components
Stars: ✭ 35 (-94.85%)
Mutual labels:  eslint, hacktoberfest
Lint Review
An automated code linting bot that integrates various code lint tools with github pull requests.
Stars: ✭ 279 (-58.97%)
Mutual labels:  eslint, tslint
Tofu
Functional programming toolbox
Stars: ✭ 281 (-58.68%)
Mutual labels:  hacktoberfest, config
Prettier Eslint
Code ➡️ prettier ➡️ eslint --fix ➡️ Formatted Code ✨
Stars: ✭ 3,435 (+405.15%)
Mutual labels:  eslint, hacktoberfest
Tslint Config Standard
A TSLint config for JavaScript Standard Style
Stars: ✭ 358 (-47.35%)
Mutual labels:  eslint, tslint
Gatsby Starter Typescript Deluxe
A Gatsby starter with TypeScript, Storybook, Styled Components, Framer Motion, Jest, and more.
Stars: ✭ 50 (-92.65%)
Mutual labels:  eslint, tslint
Codestyle
JavaScript and TypeScript Style Guide
Stars: ✭ 207 (-69.56%)
Mutual labels:  eslint, tslint
Eslint Config Kit
A collection of useful eslint configs
Stars: ✭ 39 (-94.26%)
Mutual labels:  eslint, config
web-build-tool-demo
比较全面的前端构建工具demo,拿来即练,不定时更新,包含git npm gulp webpack babel typescript husky eslint tslint lint-stage prettier等
Stars: ✭ 42 (-93.82%)
Mutual labels:  eslint, tslint
Tslint Xo
TSLint shareable config for XO
Stars: ✭ 64 (-90.59%)
Mutual labels:  tslint, config
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (+2.35%)
Mutual labels:  eslint, hacktoberfest
eslint-config
An ESLint shareable config that I used in my projects
Stars: ✭ 15 (-97.79%)
Mutual labels:  eslint, tslint
Lsp Mode
Emacs client/library for the Language Server Protocol
Stars: ✭ 3,691 (+442.79%)
Mutual labels:  eslint, hacktoberfest

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

⚠ Coming from Angular? Use angular-eslint instead to coordinate around this tool and others.

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 TSLint to ESLint.

CLI Flags

Each of these flags is optional:

  • comments: TypeScript configuration or file glob path(s) to convert TSLint rule flags to ESLint within.
  • 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.
  • prettier: Add eslint-config-prettier to the plugins list.
  • tslint: Path to a TSLint configuration file to read settings from.
  • typescript: Path to a TypeScript configuration file to read TypeScript compiler options from.

comments

npx tslint-to-eslint-config --comments

Default: none

Indicates to convert from TSLint rule flags to ESLint inline comments. Comments such as // tslint:disable: tslint-rule-name will be converted to equivalents like // eslint-disable eslint-rule-name.

If passed without arguments, respects the excludes, files, and includes in your TypeScript configuration.

If passed a single file path ending with .json, that is treated as a TypeScript configuration file describing with files to convert.

npx tslint-to-eslint-config --comments tsconfig.json

If passed any other arguments, those are treated as glob paths for file paths to convert:

npx tslint-to-eslint-config --comments 'src/**/*.ts'

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.

prettier

npx tslint-to-eslint-config --prettier

Default: false

Add eslint-config-prettier to the list of ESLint plugins. We highly recommend you use Prettier for code formatting.

When --prettier isn't enabled:

  • If the output configuration already doesn't enable any formatting rules, it'll extend from eslint-config-prettier.
  • Otherwise, a CLI message will suggest running with --prettier.

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.

Node API

You can use tslint-to-eslint-config programmatically via its exported functions. See docs/API for details.

import { convertLintConfig } from "tslint-to-eslint-config";

const result = await convertLintConfig();

Development

See the Code of Conduct and general development docs. 💖

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].