eslint-plugin-no-multiple-returns
Version:
An ESLint plugin to enforce a single `return` statement per function, encouraging clearer and more maintainable code.
16 lines (13 loc) • 523 B
JavaScript
// Test importing the ESM build
import plugin from '../dist/index.es.js';
console.log('ESM import successful!');
console.log('Plugin rules:', Object.keys(plugin.rules));
console.log('Rule type:', typeof plugin.rules['no-multiple-returns']);
// Test that the rule is properly structured
const rule = plugin.rules['no-multiple-returns'];
if (rule && rule.meta && rule.create) {
console.log('✅ Rule structure is valid');
console.log('Rule meta:', rule.meta);
} else {
console.log('❌ Rule structure is invalid');
}