Skip to content

Instantly share code, notes, and snippets.

@Kcin1993
Last active October 4, 2017 08:29
Show Gist options
  • Save Kcin1993/2dbd35bc9ec6805aad5107c0ffd0dc05 to your computer and use it in GitHub Desktop.
Save Kcin1993/2dbd35bc9ec6805aad5107c0ffd0dc05 to your computer and use it in GitHub Desktop.
React-redux-typescript-airbnbEslint.md

Brief

This note is about yosgo dashboard project install and use airbnb eslint. Also known as TSlint


Resources


In package(react typescript project)

1. Install tslint

# Install the global CLI and its peer dependency
yarn global add tslint typescript

# Navigate to to your sources folder
cd path/to/project

# Generate a basic configuration file
tslint --init

2. Use tslint-config-airbnb

# Install package
yarn add tslint-config-airbnb -D

# Setting in tslint.json
{
  "extends": "tslint-config-airbnb"
}

3. Add script

"scripts": {
  ...
  "tslint": "tslint -c tslint.json 'src/**/*.ts'"
}

In VS code Editor

Install this extension on VScode

If the folder has the tslint.json this extension will work automatically.


Customize Rule

variable-name --> false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment