christianalfoni / webpack-bin

A webpack code sandbox
http://www.webpackbin.com
MIT License
710 stars 75 forks source link

static declarations give linting errors even if the code works #143

Open bebraw opened 8 years ago

bebraw commented 8 years ago

Example:

import React from 'react';

export default class SawCat extends React.Component {
  static propTypes = {
    amount: React.PropTypes.number.isRequired,
    onClick: React.PropTypes.func
  }
  static defaultProps = {
    onClick: () => {}
  }
  render() {
    return <div>foo</div>;
  }
}

Bin.

When using custom features, ESLint needs to be hooked up with [https://www.npmjs.com/package/babel-eslint) parser to work. Otherwise you get errors like this.

christianalfoni commented 8 years ago

Have to research this linting stuff, really annoying to create in browser linting due to a lot of plugins and stuff that is not prepared to run in the browser

bebraw commented 8 years ago

Yup. It's not an easy problem. Fortunately the ESLint team is responsive. 👍