Socket
Socket
Sign inDemoInstall

tslint-config-airbnb

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-config-airbnb

A TSLint config for Airbnb JavaScript Style


Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 19 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc