TristonJ / eslint-plugin-prefer-arrow

ESLint plugin to prefer arrow functions
MIT License
54 stars 10 forks source link

Does not allow getters. #10

Closed DylanVann closed 5 years ago

DylanVann commented 5 years ago

This is considered an arrow:

const myObject = {
    get myVal() {
      return something()
    },
}

The fix will convert it to:

const myObject = {
    get myVal: () => something(),
}

Which is not valid.

TristonJ commented 5 years ago

Thanks for the report! This has been fixed in https://github.com/TristonJ/eslint-plugin-prefer-arrow/commit/384bc9db8452e52a8613b2675f6706184b976e5b and pushed to npm as a patch.

DylanVann commented 5 years ago

Awesome, thank you @TristonJ !