GithubHelp home page GithubHelp logo

interactivethings / eslint-config-interactivethings Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 23 KB

The Interactive Things ESLint config

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%

eslint-config-interactivethings's People

Contributors

bldng avatar jstcki avatar tpreusse avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-interactivethings's Issues

Add a ES5 config

Currently, it's not possible to use this config with ES5 (e.g. Node) code because it complains about too many things.

Upgrade peer dependencies

  • eslint v2
  • eslint-plugin-react v4
  • babel-eslint v6
  • React v15

Make sure they all work nicely together.

Problem with Flow type annotations

Mostly lints fine with Flow annotations, but for some reason this doesn't:

/* @flow */

export default class Foo {
  bar(): object {
    return {};
  }
}

ESLint complains:

error  "object" used outside of binding context  block-scoped-var
error  "object" is not defined                   no-undef

Other types (e.g. string) lint fine.

Should we use React component method sort order?

Seems a bit over-pedantic but maybe it's useful. I've just included the sort order like it's defined in the AirBnB config. Should we keep it?

{
    // ...
    'react/sort-comp': [2, {
      'order': [
        'displayName',
        'mixins',
        'statics',
        'propTypes',
        'getDefaultProps',
        'getInitialState',
        'componentWillMount',
        'componentDidMount',
        'componentWillReceiveProps',
        'shouldComponentUpdate',
        'componentWillUpdate',
        'componentWillUnmount',
        '/^on.+$/',
        '/^get.+$/',
        '/^render.+$/',
        'render'
      ]
}

v3.0 Tracking

  • Bump eslint to v2
  • Bump eslint-plugin-react to v4
  • Bump babel-eslint to v6 (once it works with eslint v2)
  • Add eslint-plugin-immutable (see #7)

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.