diff --git a/lib/rules/fixer-return.js b/lib/rules/fixer-return.js index 40dfa5df..787dfecb 100644 --- a/lib/rules/fixer-return.js +++ b/lib/rules/fixer-return.js @@ -21,7 +21,7 @@ module.exports = { type: 'problem', docs: { description: 'require fixer functions to return a fix', - category: 'Possible Errors', + category: 'Rules', recommended: true, }, fixable: null, diff --git a/tests/lib/rule-setup.js b/tests/lib/rule-setup.js index 856f4a57..c52c7831 100644 --- a/tests/lib/rule-setup.js +++ b/tests/lib/rule-setup.js @@ -37,6 +37,18 @@ describe('rule setup is correct', () => { ); }); + describe('rule files', () => { + for (const ruleName of RULE_NAMES) { + const rule = plugin.rules[ruleName]; + describe(ruleName, () => { + it('has the right properties', () => { + const ALLOWED_CATEGORIES = ['Rules', 'Tests']; + assert.ok(ALLOWED_CATEGORIES.includes(rule.meta.docs.category), 'has an allowed category'); + }); + }); + } + }); + it('should have tests for all rules', () => { const filePath = path.join(__dirname, 'rules'); const files = readdirSync(filePath);