Skip to content
PluginStats

eslint-plugin-prefer-arrow-functions weekly downloads statistics

By JamieMason · npm · ESLint plugins

Convert functions to arrow functions

View on npm Fresh · Dec 6, 2026

eslint-plugin-prefer-arrow-functions has 597,661 recorded weekly downloads on npm, an increase of 25.3% over the past 30 days, ranking #352 of 3,247 tracked listings.

Weekly downloads
597,661
Official API · Dec 5, 2026
7-day growth
+19.6%
+98.1K weekly downloads
30-day growth
+25.3%
+120.8K weekly downloads
90-day growth
+105%
+306.4K weekly downloads
Rank
#352
▲ 34 in 7 days

About eslint-plugin-prefer-arrow-functions

eslint-plugin-prefer-arrow-functions

An ESLint Plugin to Lint and auto-fix plain Functions into Arrow Functions, in all cases where conversion would result in the same behaviour (Arrow Functions do not support this, arguments, or new.target for example).

Installation

npm install --save-dev eslint eslint-plugin-prefer-arrow-functions

Configuration

Flat

For ESLint 9 and above, use the shared config all in eslint.config.mjs:

import pluginJs from '@eslint/js';
import preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions';

export default [
  pluginJs.configs.all,
  preferArrowFunctions.configs.all,
];

Or configure the rule(s) on your own:

import pluginJs from '@eslint/js';
import preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions';

export default [
  pluginJs.configs.all,
  {
    plugins: {
      'prefer-arrow-functions': preferArrowFunctions
    },
    rules: {
      'prefer-arrow-functions/prefer-arrow-functions': [
        'warn',
        {
          allowedNames: [],
          allowNamedFunctions: false,
          allowObjectProperties: false,
          classPropertiesAllowed: false,
          disallowPrototype: false,
          returnStyle: 'unchanged',
          singleReturnOnly: false,
        },
      ],
    },
  },
];
Legacy

For ESLint 8 (8.57.0 or newer).

Add the plugin to the plugins section and the rule to the rules section in your .eslintrc. The default values for options are listed in this example.

{
  "plugins": ["prefer-arrow-functions"],
  "rules": {
    "prefer-arrow-functions/prefer-arrow-functions": [
      "warn",
      {
        "allowedNames": [],
        "allowNamedFunctions": false,
        "allowObjectProperties": false,
        "classPropertiesAllowed": false,
        "disallowPrototype": false,
        "returnStyle": "unchanged",
        "singleReturnOnly": false
      }
    ]
  }
}

Options

allowedNames

An optional array of function names to ignore. When set, the rule won't report named functions such as function foo() {} whose name is identical to a member of this array.

For compatibility with @angular-eslint/require-lifecycle-on-prototype, you can do:

import { ASTUtils } from "@angular-eslint/utils"

// ...
  {
    rules: {
      'prefer-arrow-functions/prefer-arrow-functions': [
        'warn',
        {
          // ...
          allowedNames: [...ASTUtils.ANGULAR_LIFECYCLE_METHODS],
        },
      ],
    },
  },
allowNamedFunctions

Controls how named functions are handled:

  • When true, the rule won't report any named functions such as function foo() {}. Anonymous functions such as const foo = function() {} will still be reported.
  • When "only-expressions", the rule will allow named function expressions (like callback(function namedFn() {})) but will still transform named function declarations (like function foo() {}).
  • When false (default), all functions will be transformed to arrow functions when safe to do so.
allowObjectProperties

If set to true, the rule won't report named methods such as

const myObj = {
  hello() {},
};
classPropertiesAllowed

When true, functions defined as class instance fields will be converted to arrow functions when doing so would not alter or break their behaviour.

disallowPrototype

When true, functions assigned to a prototype will be converted to arrow functions when doing so would not alter or break their behaviour.

returnStyle
  • When "implicit", arrow functions such as x => { return x; } will be converted to x => x.
  • When "explicit", arrow functions such as x => x will be converted to x => { return x; }.
  • When "unchanged" or not set, arrow functions will be left as they were.
singleReturnOnly

When true, only function declarations which only contain a return statement will be converted. Functions containing block statements will be ignored.

This option works well in conjunction with ESLint's built-in arrow-body-style set to as-needed.

Credits

This project is a fork of https://github.com/TristonJ/eslint-plugin-prefer-arrow by Triston Jones.

Badges

  • support on ko-fi
  • NPM version
  • NPM downloads
  • Build Status

Description from the npm listing.

  • es6
  • eslint
  • eslint-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-prefer-arrow-functions weekly downloads on npm, last 90 days: 597,661 weekly downloads as of Dec 5, 2026, +105% over 90 days.eslint-plugin-prefer-arrow-functionsWeekly downloads on npm · Last 90 days597,661downloads / week+105% over 90 days0100K200K300K400K500K600K700KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
eslint-plugin-prefer-arrow-functions weekly downloads on npm, last 90 days: 597,661 weekly downloads as of Dec 5, 2026, +105% over 90 days.

7/30/90-day growth

eslint-plugin-prefer-arrow-functions weekly downloads growth on npm: +19.6% over 7 days, +25.3% over 30 days, +105% over 90 days.eslint-plugin-prefer-arrow-functionsWeekly downloads growth on npm597,661downloads / week now7-day growth+98,148 weekly downloads+19.6%30-day growth+120,843 weekly downloads+25.3%90-day growth+306,388 weekly downloads+105%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-prefer-arrow-functions weekly downloads growth on npm: +19.6% over 7 days, +25.3% over 30 days, +105% over 90 days.

Ranking history

eslint-plugin-prefer-arrow-functions npm ranking history: currently #352 (by weekly downloads).eslint-plugin-prefer-arrow-functionsnpm ranking · by weekly downloads · Last 90 days#352current rank#150#200#250#300#350#400#450Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-prefer-arrow-functions npm ranking history: currently #352 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 18, #12 (overall #352)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins290 listings · 15 pages · page 5, #2 (overall #82)
ESLint plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (591)
Recent weekly downloads observations for eslint-plugin-prefer-arrow-functions
Date (UTC)Weekly downloadsChange vs. previous
597,661+9.5K
588,128+39.3K
548,875+41.2K
507,717+28.6K
479,138-10.1K
489,232-7K
496,183-3.3K
499,513-7.6K
507,132-29K
536,123-36K
572,120-27.3K
599,434-4.3K
603,705-19.4K
623,120—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.