GithubHelp home page GithubHelp logo

matthargett / eslint-config-callstack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from callstack/eslint-config-callstack

0.0 3.0 0.0 318 KB

ESLint preset extending Flow, Prettier and Jest

License: MIT License

JavaScript 87.62% TypeScript 12.38%

eslint-config-callstack's Introduction

eslint-config-callstack

Greenkeeper badge

Callstack ESLint config utilizing Flow/TypeScript, Prettier, Jest, React and React Native.

Plugins and configs used:

Additionally, it sets these environments:

Default config:

{
  "env": {
    "browser": true,
    "es6": true,
    "node": true,
    "react-native/react-native": true
  }
}

Node config:

{
  "env": {
    "browser": true,
    "es6": true,
    "node": true
  }
}

Installation

yarn add --dev eslint @callstack/eslint-config

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

Usage

Add to your ESLint config (.eslintrc, or eslintConfig field in package.json):

{
    "extends": "@callstack"
}

or

{
    "extends": "@callstack/eslint-config/node"
}

Example of extending the configuration

{
    "extends": "@callstack",
    "rules": {
        "global-require": 0,
        "prefer-destructuring": 0
    }
}

TypeScript

In order to use this config in TypeScript project make sure you have installed following dependencies:

Then when running ESLint add --ext '.js,.ts' (you might need also .jsx, .tsx) option, for example:

yarn eslint --ext '.js,.ts' ./src

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.