diff --git a/docs/rules/meta-property-ordering.md b/docs/rules/meta-property-ordering.md index bef88673..01b2ee9d 100644 --- a/docs/rules/meta-property-ordering.md +++ b/docs/rules/meta-property-ordering.md @@ -10,7 +10,7 @@ This rule enforces that meta properties of a rule are placed in a consistent ord This rule has an array option: -* `['type', 'docs', 'fixable', 'schema', 'messages', 'deprecated', 'replacedBy']` (default): The order that the properties of `meta` should be placed in. +* `['type', 'docs', 'fixable', 'hasSuggestions', 'schema', 'messages', 'deprecated', 'replacedBy']` (default): The order that the properties of `meta` should be placed in. Examples of **incorrect** code for this rule: diff --git a/lib/rules/meta-property-ordering.js b/lib/rules/meta-property-ordering.js index 0c4a46d6..40a6791a 100644 --- a/lib/rules/meta-property-ordering.js +++ b/lib/rules/meta-property-ordering.js @@ -32,7 +32,7 @@ module.exports = { const sourceCode = context.getSourceCode(); const info = getRuleInfo(sourceCode); - const order = context.options[0] || ['type', 'docs', 'fixable', 'schema', 'messages']; + const order = context.options[0] || ['type', 'docs', 'fixable', 'hasSuggestions', 'schema', 'messages']; const orderMap = new Map(order.map((name, i) => [name, i])); diff --git a/lib/rules/no-only-tests.js b/lib/rules/no-only-tests.js index 78f0c6d6..59b9edbf 100644 --- a/lib/rules/no-only-tests.js +++ b/lib/rules/no-only-tests.js @@ -11,13 +11,13 @@ module.exports = { category: 'Tests', recommended: false, }, + hasSuggestions: true, schema: [], messages: { foundOnly: 'The test case property `only` can be used during development, but should not be checked-in, since it prevents all the tests from running.', removeOnly: 'Remove `only`.', }, - hasSuggestions: true, }, create (context) { diff --git a/lib/rules/require-meta-schema.js b/lib/rules/require-meta-schema.js index 976aea37..29727e04 100644 --- a/lib/rules/require-meta-schema.js +++ b/lib/rules/require-meta-schema.js @@ -15,6 +15,7 @@ module.exports = { category: 'Rules', recommended: false, // TODO: enable it in a major release. }, + hasSuggestions: true, schema: [ { type: 'object', @@ -33,7 +34,6 @@ module.exports = { missing: '`meta.schema` is required (use [] if rule has no schema).', wrongType: '`meta.schema` should be an array or object (use [] if rule has no schema).', }, - hasSuggestions: true, }, create (context) { diff --git a/tests/lib/rules/meta-property-ordering.js b/tests/lib/rules/meta-property-ordering.js index 3d5f0947..39dd5d15 100644 --- a/tests/lib/rules/meta-property-ordering.js +++ b/tests/lib/rules/meta-property-ordering.js @@ -42,6 +42,7 @@ ruleTester.run('test-case-property-ordering', rule, { type: 'problem', docs: {}, fixable: 'code', + hasSuggestions: true, schema: [], messages: {} },