javascript - Prevent old style function declaration -


i want forbid old style function declarations , non-binding method declarations:

function f1() { ... } const f2 = function() { ... } class c {   f3() { ... } } 

instead arrow-style constants , fields must used:

const f1 = () => { ... }; class c {   f3 = () => { ... }; } 

is possible eslint or plugin?

check this out, there prefer-arrow-callback rule.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -