Skip to main content

Rules

This section documents all rules currently provided by eslint-plugin-jupyter.

Available rules​

Each page includes intent, examples, configuration, and when to apply the rule.

The plugin ships with a recommended configuration that enables all current rules with the following defaults:

RuleLevel
jupyter/plugin-activation-argserror
jupyter/command-described-bywarn
jupyter/command-id-conventionwarn ¹
jupyter/no-untranslated-stringwarn
jupyter/plugin-descriptionwarn
jupyter/plugin-id-conventionwarn ¹
jupyter/no-translation-concatenationerror
jupyter/no-dynamic-translationwarn
jupyter/token-formaterror
jupyter/require-disposable-ownershipwarn
jupyter/require-disposable-transferwarn
jupyter/require-soft-assertions-before-snapshotswarn ²
jupyter/require-signal-cleanupwarn
jupyter/require-signal-this-argerror
jupyter/prefer-signal-this-argwarn
jupyter/galata-prefer-context-menu-helperwarn ²
jupyter/galata-prefer-filebrowser-helperwarn ²
jupyter/galata-prefer-menu-helperwarn ²
jupyter/galata-prefer-notebook-cell-helperwarn ²
jupyter/galata-prefer-sidebar-activity-helperwarn ²
jupyter/no-schema-enumwarn ³
jupyter/no-pageconfig-base-urlwarn
jupyter/incorrect-translator-usagewarn
jupyter/prefer-lazy-importswarn ¹

¹ Turned off for **/*.spec.{ts,js} and **/*.test.{ts,js} files, where mock plugins and commands would otherwise be reported.

² Applied only to **/*.spec.{ts,js} and **/*.test.{ts,js} files.

³ Applied only to **/schema/*.json files.

These defaults are the same in both jupyterPlugin.configs.recommended (flat config) and plugin:@jupyter/eslint-plugin/recommended-legacy.

For guidance on using these recommended rules, see the User Guide.