Giter VIP home page Giter VIP logo

tslint-config-airbnb's Introduction

TSLint Config Airbnb

NPM version Downloads

A TSLint config for Airbnb JavaScript Style Guide


This package is deprecated

Migrate to eslint

  1. Remove tslint.json

  2. Remove lines from tsconfig.json if included

    "plugins": [
      {
        "name": "typescript-tslint-plugin"
      }
    ],
  1. Replace packages
$ npm uninstall tslint tslint-config-airbnb
$ npm uninstall typescript-tslint-plugin
$ npm install --dev eslint @typescript-eslint/eslint-plugin eslint-config-airbnb
$ npx install-peerdeps --dev eslint-config-airbnb
  1. Create .eslintrc.json
{
  "extends": ["airbnb"],
  "plugins": ["@typescript-eslint"],
  "parser": "@typescript-eslint/parser",
  "rules": {
    "import/no-unresolved": 0,
    "react/jsx-filename-extension": {
      "extensions": [
        ".jsx",
        ".tsx"
      ]
    }
  }
}

With webpack

{
  :
  "rules": {
    :
    "import/extensions": [".js", ".json", ".jsx", ".ts", ".tsx"],
    :
  },
  "settings": {
    "import/resolver": {
      "webpack": {
        "config": "webpack.config.js"
      }
    }
  }
  :
}
  1. if you are using Visual Studio Code, add to vscode's settings.json
{
  "[typescript]": {
    "editor.formatOnSave": false,
  },
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    { "language": "typescript", "autoFix": true },
    { "language": "typescriptreact", "autoFix": true }
  ]
}

Installation

npm install tslint-config-airbnb --save-dev

Usage

In tslint.json:

{
  "extends": "tslint-config-airbnb"
}

Rules

Versioning

+----- Major version is synchronize with tslint's major version.
| +--- Minor version has BREAKING CHANGE and feat.
| | +- Patch version has patch.
| | |
x.x.x

License

Apache 2.0

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.