Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tslint-config-airbnb

progre163.9kApache-2.05.11.2

A TSLint config for Airbnb JavaScript Style

airbnb, tslint, typescript

readme

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

changelog

5.11.2 (2019-09-19)

5.11.1 (2018-11-15)

Bug Fixes

5.11.0 (2018-09-01)

Bug Fixes

  • remove deprecated rule "no-unused-variable" (5b54968), closes #54

and a PR

Features

5.10.0 (2018-08-18)

Bug Fixes

  • allow-destructuring on no-this-assignment (d80f2f0), closes #47

Features

and some PRs

5.9.0 (2018-05-19)

Features

5.8.0 (2018-03-19)

Features

5.7.0 (2018-02-21)

Features

5.6.0 (2018-02-07)

Bug Fixes

  • resolve interfere with 15.7 (7396b2b)

5.5.0 (2018-01-24)

Features

  • replace no-var-self with no-this-assignment (397e531)
  • add peerDependencies (7b620a5)

5.4.2 (2017-11-15)

Bug Fixes

5.4.1 (2017-11-15)

Features

  • add no-else-after-return for 16.3 (36c678a)

5.3.1 (2017-11-13)

Bug Fixes