Skip to content

consenlabs/eslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-consenlabs

This is the eslint configuration used by Organization Consenlabs.

You can extend and inherit from it, please initiate an issue for any detailed changes.

Guide

JavaScript

Please make sure you have installed eslint and version 5 or higher.

  1. Install package: yarn add @consenlabs-fe/eslint-config -D

  2. Add the following code to the in-configuration file (.eslintrc):

    { "extends": "@consenlabs-fe/eslint-config" }
    

    OR, if you are using the .yml:

    extends:
      - '@consenlabs-fe/eslint-config'
  3. If you are using xo, please refer to the following configuration:

    "xo": {
      "extends": [
        "@consenlabs-fe/eslint-config"
      ]
    },
    

TypeScript & React

We always recommend that you use @typescript-eslint instead of tslint, as tslint is now out of maintenance, please at least make sure that you have the following dependencies installed:

  • eslint > 5.0

For more information on this please read the following links:

So naturally, we need to install dependencies before we begin:

  1. Install package: yarn add @consenlabs-fe/eslint-config-ts -D

  2. Adding configuration to the .eslintrc file:

    "extends": ["@consenlabs-fe/eslint-config-ts"],
    "parserOptions": {
      "project": "./tsconfig.json"
    }

For React:

{
  "extends": [
    "@consenlabs-fe/eslint-config-ts",
    "@consenlabs-fe/eslint-config-react"
  ],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

LICENSE

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published