export default class Autowhatever extends Component {
static propTypes = { // <--- error points to this line
I expected babel-eslint
to support class properties out of the box.
What am I missing?
Here is my eslint config:
"env": {
"es6": true,
"node": true,
"browser": true
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
I get this error on eslint
2.7, 2.9 and 2.10 on windows, using either babel-eslint
5.0.4 or 6.0.4.
On OSX it seems to work for 2.7 with babel-eslint 5.0.4 for me.
For some reason the error hasn't gone away for me yet: https://travis-ci.org/perrin4869/react-onenterkeydown/jobs/130315342
Anyone got a clue why? https://github.com/perrin4869/react-onenterkeydown/
Edit: ok, this seems to be a gulp-eslint
issue
I've gone back and forth, uninstalled everything concerning eslint locally and globally, then went back and tried installing 2.9.0
locally which @hzoo reported should work. I'm glad that version 2.9.0
works for me on windows after all. I must've tried too many things at once when I was testing different versions.
I'll just use 2.9.0
until a better patch is released. Thanks @hzoo
"extends": ["eslint:recommended", "plugin:react/recommended"],
"rules": {
"comma-dangle": 0,
"react/jsx-uses-vars": 1,
"react/display-name": 1,
"no-unused-vars": "warn",
"no-console": 1,
"no-unexpected-multiline": "warn"
"settings": {
"react": {
"pragma": "React",
"version": "15.6.1"
xingqiyi, luchopintado, OrencioRodolfo, ogerami, radeklat, Tom2277, 593273894, antonputra, demeralde, bastyen, and 238 more reacted with thumbs up emoji
channprj, Philip803, rodrigooler, devjmetivier, rhiroyuki, SafouraBahrami, amirrezam, maicolsantos, andfelzapata, linconkusunoki, and 22 more reacted with laugh emoji
natioskar, wsfuller, phatnguyenbg, imtmh, zhouzhongyuan, sudazzle, eatonphil, CharlieFan, liketurbo, phsantiago, and 57 more reacted with hooray emoji
prmdsngh reacted with confused emoji
christ776, veegee, Tomekmularczyk, Chryseis, xclidongbo, ronzalo, xingqiyi, skynyrd, Stmol, phatnguyenbg, and 62 more reacted with heart emoji
igor-shyrnin, albertcito, kaladivo, adamboxman, prmdsngh, and taicen reacted with rocket emoji
0xAnon101, Mohcka, and sagar-gavhane reacted with eyes emoji
All reactions