@clausehq/eslint-config
Reuseable eslint config. Created by Clause.io
Last updated 2 years ago by dselman .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @clausehq/eslint-config 
SYNC missed versions from official npm registry.

A set of reuseable eslint linting rules used by Clause.io. Feel free to use these for your own projects.

Usage

Install this package and it's peer dependencies

yarn add -D @clausehq/eslint-config
yarn add -D eslint eslint-config-airbnb eslint-config-loopback eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-promise eslint-plugin-react eslint-plugin-react-hooks

Create a file in the root of your repo called .eslintrc with the contents

{
  "extends": ["@clausehq/eslint-config"]
}

Although for serverless functions, where logs are aggregated directly from CloudWatch, you may want this config:

{
  "extends": ["@clausehq/eslint-config"],
  "rules": {
    "no-console": "off"
  }
}

Loopback 3 projects may want to add this rule for remote method declaration which by convention breaks this rule:

    "no-param-reassign": 0 

For React apps, use the following config:

{
  "extends": ["@clausehq/eslint-config"],
  "parser": "babel-eslint",
  "settings": {
    "import/resolver": {
      "node": {
        "paths": ["src"],
        "extensions": [".js", ".jsx", ".ts", ".tsx"]
      }
    },
    "react": {
      "version": "detect"
    }
  }
}

Optionally add a file called .eslintignore, here are some suggested contents

coverage
node_modules

Current Tags

  • 0.2.2                                ...           latest (5 months ago)

14 Versions

  • 0.2.2                                ...           5 months ago
  • 0.2.1                                ...           5 months ago
  • 0.2.0                                ...           5 months ago
  • 0.1.8                                ...           a year ago
  • 0.1.7                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |