Skip to content
PluginStats

@lexical/eslint-plugin weekly downloads statistics

By lexical · npm · ESLint plugins

Lexical specific linting rules for ESLint

View on npm Stale · Oct 17, 2026

@lexical/eslint-plugin has 6,199 recorded weekly downloads on npm, a decrease of 80.2% over the past 30 days, ranking #1035 of 2,306 tracked listings.

Weekly downloads
6,199
Official API · Oct 18, 2026
7-day growth
-77.4%
-21.3K weekly downloads
30-day growth
-80.2%
-25.1K weekly downloads
90-day growth
-52.3%
-6.8K weekly downloads
Rank
#1035
Among tracked npm listings

About @lexical/eslint-plugin

@lexical/eslint-plugin

This ESLint plugin enforces the Lexical $function convention.

ESLint Compatibility: This plugin supports ESLint 9 and later with the flat config format (eslint.config.js). Support for ESLint 7-8 and the legacy .eslintrc format was removed in v0.51.0.

Installation

Assuming you already have ESLint installed, run:

npm install @lexical/eslint-plugin --save-dev
Configuration

Add the recommended config to your eslint.config.js:

import lexical from '@lexical/eslint-plugin';

export default [
  // ... other configs
  lexical.configs.recommended
];

lexical.configs['flat/recommended'] and lexical.configs['flat/all'] are aliases of recommended and all from when those names were the legacy configs.

Custom Configuration
import lexical from '@lexical/eslint-plugin';

export default [
  {
    plugins: {
      '@lexical': lexical
    },
    rules: {
      '@lexical/rules-of-lexical': 'error'
    }
  }
];
Advanced configuration

Most of the heuristics in @lexical/rules-of-lexical can be extended with additional terms or patterns.

The code example below is shown using the default implementations for each option. When you configure these they are combined with the default implementations using "OR", the default implementations can not be overridden. These terms and patterns are only shown for reference and pasting this example into your project is not useful.

If the string begins with a "^" or "(" then it is treated as a RegExp, otherwise it will be an exact match. A string may also be used instead of an array of strings.

import lexical from '@lexical/eslint-plugin';

export default [
  {
    plugins: {
      '@lexical': lexical
    },
    rules: {
      '@lexical/rules-of-lexical': [
        'error',
        {
          isDollarFunction: ['^\\$[a-z_]'],
          isIgnoredFunction: [],
          isLexicalProvider: [
            'parseEditorState',
            'read',
            'registerCommand',
            'registerNodeTransform',
            'update'
          ],
          isSafeDollarFunction: ['^\\$is']
        }
      ]
    }
  }
];
isDollarFunction

Base case: /^\$[a-z_]/

This defines the $function convention, which by default is any function that starts with a dollar sign followed by a lowercase latin letter. You may have a secondary convention in your codebase, such as non-latin letters, or an internal prefix that you want to consider (e.g. "^INTERNAL_\\$").

isIgnoredFunction

Base case: None

Functions that match these patterns are ignored from analysis, they may call Lexical $functions but are not considered to be a dollar function themselves.

isLexicalProvider

Base case: /^(parseEditorState|read|registerCommand|registerNodeTransform|update)$/

These are functions that allow their function argument to use Lexical $functions.

isSafeDollarFunction

Base case: /^\$is/

These $functions are considered safe to call from anywhere, generally these functions are runtime type checks that do not depend on any other state.

Testing

To verify that the plugin works with different ESLint versions, run the integration tests:

pnpm run test-eslint-integration

This will test:

  • ✓ ESLint 9 with a flat eslint.config.js configuration
  • ✓ ESLint 10 with the same configuration

The tests use pnpm dlx to run different ESLint versions without modifying package.json or pnpm-lock.yaml.

Valid and Invalid Examples

Valid Examples

$functions may be called by other $functions

function $namedCorrectly() {
  return $getRoot();
}

$functions may be called in functions defined when calling the following methods (the heuristic only considers the method name):

  • editor.update
  • editorState.read
  • editor.registerCommand
  • editor.registerNodeTransform
function validUsesEditorOrState(editor) {
  editor.update(() => $getRoot());
  editor.getLatestState().read(() => $getRoot());
}

$functions may be called from class methods

class CustomNode extends ElementNode {
  appendText(string) {
    this.appendChild($createTextNode(string));
  }
}
Invalid Examples
Rename autofix
function invalidFunction() {
  return $getRoot();
}
function $callsInvalidFunction() {
  return invalidFunction();
}

Autofix: The function is renamed with a $ prefix. Any references to this name in this module are also always renamed.

function $invalidFunction() {
  return $getRoot();
}
function $callsInvalidFunction() {
  return $invalidFunction();
}
Rename & deprecate autofix
export function exportedInvalidFunction() {
  return $getRoot();
}

Autofix: The exported function is renamed with a $ prefix. The previous name is also exported and marked deprecated, because automatic renaming of references to that name is limited to the module's scope.

export function $exportedInvalidFunction() {
  return $getRoot();
}
/** @deprecated renamed to {@link $exportedInvalidFunction} by @lexical/eslint-plugin rules-of-lexical */
export const exportedInvalidFunction = $exportedInvalidFunction;
Rename scope conflict
import {$getRoot} from 'lexical';
function InvalidComponent() {
  const [editor] = useLexicalComposerContext();
  const getRoot = useCallback(() => $getRoot(), []);
  return (<button onClick={() => editor.update(() => getRoot())} />);
}

Autofix: The function is renamed with a $ prefix and _ suffix since the suggested name was already in scope.

import {$getRoot} from 'lexical';
function InvalidComponent() {
  const [editor] = useLexicalComposerContext();
  const $getRoot_ = useCallback(() => $getRoot(), []);
  return (<button onClick={() => editor.update(() => $getRoot_())} />);
}

Description from the npm listing.

  • eslint
  • eslint-plugin
  • eslintplugin
  • lexical
  • editor

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

@lexical/eslint-plugin weekly downloads on npm, last 90 days: 6,987 weekly downloads as of Oct 18, 2026, -48.9% over 90 days.@lexical/eslint-pluginWeekly downloads on npm · Last 90 days6,987downloads / week-48.9% over 90 days010K20K30K40K50K60KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
@lexical/eslint-plugin weekly downloads on npm, last 90 days: 6,987 weekly downloads as of Oct 18, 2026, -48.9% over 90 days.

7/30/90-day growth

@lexical/eslint-plugin weekly downloads growth on npm: -75.0% over 7 days, -81.3% over 30 days, -48.9% over 90 days.@lexical/eslint-pluginWeekly downloads growth on npm6,987downloads / week now7-day growth-20,924 weekly downloads-75.0%30-day growth-30,344 weekly downloads-81.3%90-day growth-6,695 weekly downloads-48.9%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@lexical/eslint-plugin weekly downloads growth on npm: -75.0% over 7 days, -81.3% over 30 days, -48.9% over 90 days.

Ranking history

@lexical/eslint-plugin npm ranking history: currently #1035 (by weekly downloads).@lexical/eslint-pluginnpm ranking · by weekly downloads · Last 90 days#1035current rank#1031#1032#1033#1034#1035#1036#1037Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@lexical/eslint-plugin npm ranking history: currently #1035 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,129 shown · page 52, #15 (overall #1,035)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins253 listings · 13 pages · page 13, #9 (overall #249)
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 (122)
Recent weekly downloads observations for @lexical/eslint-plugin
Date (UTC)Weekly downloadsChange vs. previous
6,987+788
6,199-706
6,905+207
6,698-9.2K
15,905-7.5K
23,3600
23,360-4.6K
27,911+453
27,458-1.5K
28,932-6.3K
35,203-1.3K
36,518-1.7K
38,193-7.7K
45,932—

Similar npm ESLint plugins plugins

All 20 @lexical/eslint-plugin alternatives

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/@lexical/eslint-plugin. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.