Open Tzahile opened 2 years ago
Create a .js file in an environment with eslint and eslint-plugin-prefer-arrow-functions create an object with a function as a property:
.js
eslint
eslint-plugin-prefer-arrow-functions
const myObj = { dummyMethod(){ // ... } }
The plugin will mark (warn / error) the function.
In some cases, we'd like to use functions as object properties. In my case, I use Vuejs 2, and each component has this error for the data property:
data
export default { data(){ return {...} } }
It could be great if there's an option to add a rule to the rule-section for prop functions
Description
Create a
.js
file in an environment witheslint
andeslint-plugin-prefer-arrow-functions
create an object with a function as a property:The plugin will mark (warn / error) the function.
In some cases, we'd like to use functions as object properties. In my case, I use Vuejs 2, and each component has this error for the
data
property:Suggested Solution
It could be great if there's an option to add a rule to the rule-section for prop functions