eslint-plugin-ext
raw JSON → 0.1.0 verified Sat Apr 25 auth: no javascript
eslint-plugin-ext is an ESLint plugin (version 0.1.0) that provides additional lint rules, starting with 'lines-between-object-properties' which enforces blank lines between object properties, based on eslint's built-in 'lines-between-class-members'. The rule allows standard options plus an extra 'exceptBetweenSingleLines' option. The package is minimal and likely low maintenance; it is not part of a broader ecosystem and has no recent updates. It differentiates by offering a specific rule for object literals that is missing from core ESLint.
Common errors
error Error: Failed to load plugin 'ext' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-ext' ↓
cause Package not installed, or wrong plugin name in ESLint config.
fix
Run 'npm install eslint-plugin-ext --save-dev' and ensure 'plugins' array uses 'ext' (without prefix).
error Configuration for rule 'ext/lines-between-object-properties' is invalid: Unknown option 'exceptBetweenSingleLines' ↓
cause The option was misspelled or placed at wrong level.
fix
Use 'exceptBetweenSingleLines' (note: 'single' not 'single'). Option must be inside an object as third element of the array.
error ESLint couldn't find the plugin 'eslint-plugin-ext' in the configuration. ↓
cause Using full package name in plugins array.
fix
Change 'plugins' to ["ext"] (omit 'eslint-plugin-' prefix).
Warnings
gotcha Plugin must be configured in ESLint's 'plugins' array, not 'extends' or 'rules' directly. ↓
fix Add 'plugins: ["ext"]' to your ESLint configuration.
gotcha Rule name must be prefixed with 'ext/'. Using just 'lines-between-object-properties' will not work. ↓
fix Use 'ext/lines-between-object-properties' as the rule key.
gotcha The 'exceptBetweenSingleLines' option is specific to this plugin and not available in ESLint core. ↓
fix Ensure this option is only used with this plugin's rule.
deprecated ESLint flat config (eslint.config.js) does not support the legacy 'plugins' array format. This plugin may not be compatible with flat config. ↓
fix Use legacy .eslintrc format or check plugin documentation for flat config support.
Install
npm install eslint-plugin-ext yarn add eslint-plugin-ext pnpm add eslint-plugin-ext Imports
- eslint-plugin-ext (plugin) wrong
plugins: ['eslint-plugin-ext']correctplugins: ['ext'] - lines-between-object-properties rule wrong
"lines-between-object-properties": "error"correct"ext/lines-between-object-properties": ["error", "always", { "exceptBetweenSingleLines": true }] - ESLint config (JSON) wrong
{ "plugins": ["eslint-plugin-ext"], "rules": { "lines-between-object-properties": "error" } }correct{ "plugins": ["ext"], "rules": { "ext/lines-between-object-properties": ["error", "always"] } }
Quickstart
// .eslintrc.json
{
"plugins": ["ext"],
"rules": {
"ext/lines-between-object-properties": ["error", "always", { "exceptBetweenSingleLines": true }]
}
}
// Example object (bad): no blank lines between properties
export const bad = {
a: 1,
b: 2,
c() {}
}
// Example object (good): blank lines between logical groups
export const good = {
a: 1,
b: 2,
c() {}
}