Skip to content

Instantly share code, notes, and snippets.

@tsheaff
Created May 19, 2017 19:34
Show Gist options
  • Save tsheaff/003685ca6a163fb467a29fb7c70fbf10 to your computer and use it in GitHub Desktop.
Save tsheaff/003685ca6a163fb467a29fb7c70fbf10 to your computer and use it in GitHub Desktop.
Minimal test reproducing eslint crash
module.exports = {
'parser': 'babel-eslint',
'extends': 'airbnb', /* see https://github.com/airbnb/javascript */
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class Buy extends Component {
static propTypes = {
prop: PropTypes.string.isRequired,
};
onClickButton() {
// do something
}
render() {
return (
<div id="test">
<a target="_blank" href={this.props.prop} className="buy-button button" onClick={::this.onClickButton} />
</div>
);
}
}
{
"name": "bind-failure",
"version": "1.0.0",
"description": "bind failure repro https://github.com/babel/babel-eslint/issues/472",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.1",
"eslint-plugin-react": "^7.0.1"
},
"scripts": {
"lint": "eslint index.js"
},
"engines": {
"node": "7.9.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment