Repository: eslint-community/eslint-plugin-eslint-plugin
Pull request #510 (2024-12-18 05:53:30)

chore: update dependency mocha to v11
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mocha](https://mochajs.org/) ([source](https://redirect.github.com/mochajs/mocha)) | [`^10.4.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/mocha/10.8.2/11.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/mocha/11.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mocha/11.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mocha/10.8.2/11.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mocha/10.8.2/11.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>mochajs/mocha (mocha)</summary>

### [`v11.0.1`](https://redirect.github.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#1101-2024-12-02)

[Compare Source](https://redirect.github.com/mochajs/mocha/compare/v11.0.0...v11.0.1)

##### 🌟 Features

-   bumped glob dependency from 8 to 10 ([#&#8203;5250](https://redirect.github.com/mochajs/mocha/issues/5250)) ([43c3157](https://redirect.github.com/mochajs/mocha/commit/43c3157c6ef4f2d4bfecf3ad3a42479fd64187b8))

##### 📚 Documentation

-   fix examples for `linkPartialObjects` methods ([#&#8203;5255](https://redirect.github.com/mochajs/mocha/issues/5255)) ([34e0e52](https://redirect.github.com/mochajs/mocha/commit/34e0e52e047a9119aeae9cb5b660a8438656a1e0))

### [`v11.0.0`](https://redirect.github.com/mochajs/mocha/blob/HEAD/CHANGELOG.md#1100-2024-11-11)

[Compare Source](https://redirect.github.com/mochajs/mocha/compare/v10.8.2...v11.0.0)

##### ⚠ BREAKING CHANGES

-   adapt new engine range for Mocha 11 ([#&#8203;5216](https://redirect.github.com/mochajs/mocha/issues/5216))

##### 🌟 Features

-   allow calling hook methods ([#&#8203;5231](https://redirect.github.com/mochajs/mocha/issues/5231)) ([e3da641](https://redirect.github.com/mochajs/mocha/commit/e3da641b08bed20f12df524fc64cb9579f980c1e))

##### 🩹 Fixes

-   adapt new engine range for Mocha 11 ([#&#8203;5216](https://redirect.github.com/mochajs/mocha/issues/5216)) ([80da25a](https://redirect.github.com/mochajs/mocha/commit/80da25a4132ca50d3ad35087cb62c9b0f8fc946a))

##### 📚 Documentation

-   downgrade example/tests chai to 4.5.0 ([#&#8203;5245](https://redirect.github.com/mochajs/mocha/issues/5245)) ([eac87e1](https://redirect.github.com/mochajs/mocha/commit/eac87e10f49207a9b388f87d77d198583c6f889a))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/eslint-community/eslint-plugin-eslint-plugin).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi4yIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwiZGVwczpucG0iXX0=-->



Patch:
diff --git a/README.md b/README.md
index 3645418..fb1035c 100644
--- a/README.md
+++ b/README.md
@@ -97,6 +97,7 @@ module.exports = [
 | [prefer-placeholders](docs/rules/prefer-placeholders.md)                         | require using placeholders for dynamic report messages                                     |     |     |     |     |
 | [prefer-replace-text](docs/rules/prefer-replace-text.md)                         | require using `replaceText()` instead of `replaceTextRange()`                              |     |     |     |     |
 | [report-message-format](docs/rules/report-message-format.md)                     | enforce a consistent format for rule report messages                                       |     |     |     |     |
+| [require-meta-default-options](docs/rules/require-meta-default-options.md)       | require only rules with options to implement a `meta.defaultOptions` property              |     | 🔧  |     |     |
 | [require-meta-docs-description](docs/rules/require-meta-docs-description.md)     | require rules to implement a `meta.docs.description` property with the correct format      |     |     |     |     |
 | [require-meta-docs-recommended](docs/rules/require-meta-docs-recommended.md)     | require rules to implement a `meta.docs.recommended` property                              |     |     | 💡  |     |
 | [require-meta-docs-url](docs/rules/require-meta-docs-url.md)                     | require rules to implement a `meta.docs.url` property                                      |     | 🔧  |     |     |
diff --git a/docs/rules/require-meta-default-options.md b/docs/rules/require-meta-default-options.md
new file mode 100644
index 0000000..70dab8e
--- /dev/null
+++ b/docs/rules/require-meta-default-options.md
@@ -0,0 +1,108 @@
+# Require only rules with options to implement a `meta.defaultOptions` property (`eslint-plugin/require-meta-default-options`)
+
+🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
+
+<!-- end auto-generated rule header -->
+
+Defining default options declaratively in a rule's `meta.defaultOptions` property enables ESLint v9.15.0+ to merge any user-provided options with the default options, simplifying the rule's implementation. It can also be useful for other tools like [eslint-doc-generator](https://github.com/bmish/eslint-doc-generator) to generate documentation for the rule's options.
+
+## Rule Details
+
+This rule requires ESLint rules to have a valid `meta.defaultOptions` property if and only if the rule has options defined in its `meta.schema` property.
+
+Examples of **incorrect** code for this rule:
+
+```js
+/* eslint eslint-plugin/require-meta-default-options: error */
+
+module.exports = {
+  meta: {
+    schema: [
+      {
+        type: 'object',
+        /* ... */
+      },
+    ],
+    // defaultOptions is missing
+  },
+  create(context) {
+    /* ... */
+  },
+};
+
+module.exports = {
+  meta: {
+    schema: [],
+    defaultOptions: [{}], // defaultOptions is not needed when schema is empty
+  },
+  create(context) {
+    /* ... */
+  },
+};
+
+module.exports = {
+  meta: {
+    schema: [
+      {
+        /* ... */
+      },
+    ],
+    defaultOptions: {}, // defaultOptions should be an array
+  },
+  create(context) {
+    /* ... */
+  },
+};
+
+module.exports = {
+  meta: {
+    schema: [
+      {
+        /* ... */
+      },
+    ],
+    defaultOptions: [], // defaultOptions should not be empty
+  },
+  create(context) {
+    /* ... */
+  },
+};
+```
+
+Examples of **correct** code for this rule:
+
+```js
+/* eslint eslint-plugin/require-meta-default-options: error */
+
+module.exports = {
+  meta: { schema: [] }, // no defaultOptions needed when schema is empty
+  create(context) {
+    /* ... */
+  },
+};
+
+module.exports = {
+  meta: {
+    schema: [
+      {
+        type: 'object',
+        properties: {
+          exceptRange: {
+            type: 'boolean',
+          },
+        },
+        additionalProperties: false,
+      },
+    ],
+    defaultOptions: [{ exceptRange: false }],
+  },
+  create(context) {
+    /* ... */
+  },
+};
+```
+
+## Further Reading
+
+- [ESLint rule docs: Option Defaults](https://eslint.org/docs/latest/extend/custom-rules#option-defaults)
+- [RFC introducing `meta.defaultOptions`](https://github.com/eslint/rfcs/blob/main/designs/2023-rule-options-defaults/README.md)
diff --git a/lib/rules/consistent-output.js b/lib/rules/consistent-output.js
index 57beac6..42cbf3a 100644
--- a/lib/rules/consistent-output.js
+++ b/lib/rules/consistent-output.js
@@ -32,6 +32,7 @@ module.exports = {
         default: 'consistent',
       },
     ],
+    defaultOptions: ['consistent'],
     messages: {
       missingOutput: 'This test case should have an output assertion.',
     },
diff --git a/lib/rules/meta-property-ordering.js b/lib/rules/meta-property-ordering.js
index e3de8cf..0414223 100644
--- a/lib/rules/meta-property-ordering.js
+++ b/lib/rules/meta-property-ordering.js
@@ -6,6 +6,18 @@
 
 const { getKeyName, getRuleInfo } = require('../utils');
 
+const defaultOrder = [
+  'type',
+  'docs',
+  'fixable',
+  'hasSuggestions',
+  'deprecated',
+  'replacedBy',
+  'schema',
+  'defaultOptions', // https://github.com/eslint/rfcs/tree/main/designs/2023-rule-options-defaults
+  'messages',
+];
+
 // ------------------------------------------------------------------------------
 // Rule Definition
 // ------------------------------------------------------------------------------
@@ -28,6 +40,7 @@ module.exports = {
         elements: { type: 'string' },
       },
     ],
+    defaultOptions: [defaultOrder],
     messages: {
       inconsistentOrder:
         'The meta properties should be placed in a consistent order: [{{order}}].',
@@ -41,17 +54,7 @@ module.exports = {
       return {};
     }
 
-    const order = context.options[0] || [
-      'type',
-      'docs',
-      'fixable',
-      'hasSuggestions',
-      'deprecated',
-      'replacedBy',
-      'schema',
-      'defaultOptions', // https://github.com/eslint/rfcs/tree/main/designs/2023-rule-options-defaults
-      'messages',
-    ];
+    const order = context.options[0] || defaultOrder;
 
     const orderMap = new Map(order.map((name, i) => [name, i]));
 
diff --git a/lib/rules/no-property-in-node.js b/lib/rules/no-property-in-node.js
index 1f6563f..ace2088 100644
--- a/lib/rules/no-property-in-node.js
+++ b/lib/rules/no-property-in-node.js
@@ -70,6 +70,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{ additionalNodeTypeFiles: [] }],
     messages: {
       in: 'Prefer checking specific node properties instead of a broad `in`.',
     },
diff --git a/lib/rules/report-message-format.js b/lib/rules/report-message-format.js
index 4d9d09c..d6d308f 100644
--- a/lib/rules/report-message-format.js
+++ b/lib/rules/report-message-format.js
@@ -29,6 +29,7 @@ module.exports = {
         type: 'string',
       },
     ],
+    defaultOptions: [''],
     messages: {
       noMatch: "Report message does not match the pattern '{{pattern}}'.",
     },
diff --git a/lib/rules/require-meta-default-options.js b/lib/rules/require-meta-default-options.js
new file mode 100644
index 0000000..e1166b0
--- /dev/null
+++ b/lib/rules/require-meta-default-options.js
@@ -0,0 +1,104 @@
+'use strict';
+
+const utils = require('../utils');
+
+/** @type {import('eslint').Rule.RuleModule} */
+module.exports = {
+  meta: {
+    type: 'suggestion',
+    docs: {
+      description:
+        'require only rules with options to implement a `meta.defaultOptions` property',
+      category: 'Rules',
+      recommended: false,
+      url: 'https://github.com/eslint-community/eslint-plugin-eslint-plugin/tree/HEAD/docs/rules/require-meta-default-options.md',
+    },
+    fixable: 'code',
+    schema: [],
+    messages: {
+      missingDefaultOptions:
+        'Rule with non-empty schema is missing a `meta.defaultOptions` property.',
+      unnecessaryDefaultOptions:
+        'Rule with empty schema should not have a `meta.defaultOptions` property.',
+      defaultOptionsMustBeArray: 'Default options must be an array.',
+      defaultOptionsMustNotBeEmpty: 'Default options must not be empty.',
+    },
+  },
+
+  create(context) {
+    const sourceCode = context.sourceCode || context.getSourceCode(); // TODO: just use context.sourceCode when dropping eslint < v9
+    const { scopeManager } = sourceCode;
+    const ruleInfo = utils.getRuleInfo(sourceCode);
+    if (!ruleInfo) {
+      return {};
+    }
+
+    const metaNode = ruleInfo.meta;
+
+    const schemaNode = utils.getMetaSchemaNode(metaNode, scopeManager);
+    const schemaProperty = utils.getMetaSchemaNodeProperty(
+      schemaNode,
+      scopeManager,
+    );
+    if (!schemaProperty) {
+      return {};
+    }
+
+    const metaDefaultOptions = utils
+      .evaluateObjectProperties(metaNode, scopeManager)
+      .find(
+        (p) =>
+          p.type === 'Property' && utils.getKeyName(p) === 'defaultOptions',
+      );
+
+    if (
+      schemaProperty.type === 'ArrayExpression' &&
+      schemaProperty.elements.length === 0
+    ) {
+      if (metaDefaultOptions) {
+        context.report({
+          node: metaDefaultOptions,
+          messageId: 'unnecessaryDefaultOptions',
+          fix(fixer) {
+            return fixer.remove(metaDefaultOptions);
+          },
+        });
+      }
+      return {};
+    }
+
+    if (!metaDefaultOptions) {
+      context.report({
+        node: metaNode,
+        messageId: 'missingDefaultOptions',
+        fix(fixer) {
+          return fixer.insertTextAfter(schemaProperty, ', defaultOptions: []');
+        },
+      });
+      return {};
+    }
+
+    if (metaDefaultOptions.value.type !== 'ArrayExpression') {
+      context.report({
+        node: metaDefaultOptions.value,
+        messageId: 'defaultOptionsMustBeArray',
+      });
+      return {};
+    }
+
+    const isArrayRootSchema =
+      schemaProperty.type === 'ObjectExpression' &&
+      schemaProperty.properties.find((property) => property.key.name === 'type')
+        ?.value.value === 'array';
+
+    if (metaDefaultOptions.value.elements.length === 0 && !isArrayRootSchema) {
+      context.report({
+        node: metaDefaultOptions.value,
+        messageId: 'defaultOptionsMustNotBeEmpty',
+      });
+      return {};
+    }
+
+    return {};
+  },
+};
diff --git a/lib/rules/require-meta-docs-description.js b/lib/rules/require-meta-docs-description.js
index 52918e1..0ff4ac3 100644
--- a/lib/rules/require-meta-docs-description.js
+++ b/lib/rules/require-meta-docs-description.js
@@ -35,6 +35,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{ pattern: '^(enforce|require|disallow)' }],
     messages: {
       extraWhitespace:
         '`meta.docs.description` must not have leading nor trailing whitespace.',
diff --git a/lib/rules/require-meta-docs-recommended.js b/lib/rules/require-meta-docs-recommended.js
index c4b1afb..b4ae768 100644
--- a/lib/rules/require-meta-docs-recommended.js
+++ b/lib/rules/require-meta-docs-recommended.js
@@ -47,6 +47,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{ allowNonBoolean: false }],
     messages: {
       incorrect: '`meta.docs.recommended` is required to be a boolean.',
       missing: '`meta.docs.recommended` is required.',
diff --git a/lib/rules/require-meta-docs-url.js b/lib/rules/require-meta-docs-url.js
index d5039ee..9065062 100644
--- a/lib/rules/require-meta-docs-url.js
+++ b/lib/rules/require-meta-docs-url.js
@@ -40,6 +40,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{}],
     messages: {
       mismatch: '`meta.docs.url` property must be `{{expectedUrl}}`.',
       missing: '`meta.docs.url` property is missing.',
diff --git a/lib/rules/require-meta-fixable.js b/lib/rules/require-meta-fixable.js
index 8e275f6..76ab603 100644
--- a/lib/rules/require-meta-fixable.js
+++ b/lib/rules/require-meta-fixable.js
@@ -36,6 +36,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{ catchNoFixerButFixableProperty: false }],
     messages: {
       invalid: '`meta.fixable` must be either `code`, `whitespace`, or `null`.',
       missing:
diff --git a/lib/rules/require-meta-schema.js b/lib/rules/require-meta-schema.js
index 61f956b..f885aa4 100644
--- a/lib/rules/require-meta-schema.js
+++ b/lib/rules/require-meta-schema.js
@@ -31,6 +31,7 @@ module.exports = {
         additionalProperties: false,
       },
     ],
+    defaultOptions: [{ requireSchemaPropertyWhenOptionless: true }],
     messages: {
       addEmptySchema: 'Add empty schema indicating the rule has no options.',
       foundOptionsUsage:
diff --git a/package.json b/package.json
index b4d17e6..529f058 100644
--- a/package.json
+++ b/package.json
@@ -77,7 +77,7 @@
     "husky": "^9.1.7",
     "lodash": "^4.17.21",
     "markdownlint-cli": "^0.43.0",
-    "mocha": "^10.4.0",
+    "mocha": "^11.0.0",
     "npm-package-json-lint": "^8.0.0",
     "npm-run-all2": "^7.0.1",
     "nyc": "^17.1.0",


Test patch:
diff --git a/lib/rules/test-case-property-ordering.js b/lib/rules/test-case-property-ordering.js
index 8ffe133..6bf7a4a 100644
--- a/lib/rules/test-case-property-ordering.js
+++ b/lib/rules/test-case-property-ordering.js
@@ -7,6 +7,19 @@
 
 const utils = require('../utils');
 
+const defaultOrder = [
+  'filename',
+  'code',
+  'output',
+  'options',
+  'parser',
+  'languageOptions', // flat-mode only
+  'parserOptions', // eslintrc-mode only
+  'globals', // eslintrc-mode only
+  'env', // eslintrc-mode only
+  'errors',
+];
+
 // ------------------------------------------------------------------------------
 // Rule Definition
 // ------------------------------------------------------------------------------
@@ -30,6 +43,7 @@ module.exports = {
         elements: { type: 'string' },
       },
     ],
+    defaultOptions: [defaultOrder],
     messages: {
       inconsistentOrder:
         'The properties of a test case should be placed in a consistent order: [{{order}}].',
@@ -40,18 +54,7 @@ module.exports = {
     // ----------------------------------------------------------------------
     // Public
     // ----------------------------------------------------------------------
-    const order = context.options[0] || [
-      'filename',
-      'code',
-      'output',
-      'options',
-      'parser',
-      'languageOptions', // flat-mode only
-      'parserOptions', // eslintrc-mode only
-      'globals', // eslintrc-mode only
-      'env', // eslintrc-mode only
-      'errors',
-    ];
+    const order = context.options[0] || defaultOrder;
     const sourceCode = context.sourceCode || context.getSourceCode(); // TODO: just use context.sourceCode when dropping eslint < v9
 
     return {
diff --git a/lib/rules/test-case-shorthand-strings.js b/lib/rules/test-case-shorthand-strings.js
index 432d474..68e813e 100644
--- a/lib/rules/test-case-shorthand-strings.js
+++ b/lib/rules/test-case-shorthand-strings.js
@@ -30,6 +30,7 @@ module.exports = {
         enum: ['as-needed', 'never', 'consistent', 'consistent-as-needed'],
       },
     ],
+    defaultOptions: ['as-needed'],
     messages: {
       useShorthand:
         'Use {{preferred}} for this test case instead of {{actual}}.',
diff --git a/tests/lib/rules/require-meta-default-options.js b/tests/lib/rules/require-meta-default-options.js
new file mode 100644
index 0000000..da2b420
--- /dev/null
+++ b/tests/lib/rules/require-meta-default-options.js
@@ -0,0 +1,185 @@
+'use strict';
+
+const rule = require('../../../lib/rules/require-meta-default-options');
+const RuleTester = require('../eslint-rule-tester').RuleTester;
+
+const ruleTester = new RuleTester({
+  languageOptions: { sourceType: 'commonjs' },
+});
+
+ruleTester.run('require-meta-default-options', rule, {
+  valid: [
+    'foo()',
+    'module.exports = {};',
+    `
+      module.exports = {
+        meta: {},
+        create(context) {}
+      };
+    `,
+    `
+      module.exports = {
+        meta: { schema: [] },
+        create(context) {}
+      };
+    `,
+    {
+      code: `
+        export default {
+          meta: { schema: [] },
+          create(context) {}
+        };
+      `,
+      languageOptions: { sourceType: 'module' },
+    },
+    `
+      const mySchema = [];
+      module.exports = {
+        meta: { docs: { schema: mySchema } },
+        create(context) {}
+      };
+    `,
+    `
+      const meta = { schema: [] };
+      module.exports = {
+        meta,
+        create(context) {}
+      };
+    `,
+    `
+      module.exports = {
+        meta: { schema: [{}], defaultOptions: [1] },
+        create(context) {}
+      };
+    `,
+    `
+      module.exports = {
+        meta: { schema: [{}, {}], defaultOptions: [1] },
+        create(context) {}
+      };
+    `,
+    `
+      module.exports = {
+        meta: { schema: {}, defaultOptions: [1] },
+        create(context) {}
+      };
+    `,
+    `
+      module.exports = {
+        meta: {
+          schema: {
+            type: 'array'
+          },
+          defaultOptions: []
+        },
+        create(context) {}
+      };
+    `,
+  ],
+
+  invalid: [
+    {
+      code: `
+        module.exports = {
+          meta: { schema: [], defaultOptions: [1] },
+          create(context) {}
+        };
+      `,
+      output: `
+        module.exports = {
+          meta: { schema: [],  },
+          create(context) {}
+        };
+      `,
+      errors: [{ messageId: 'unnecessaryDefaultOptions', type: 'Property' }],
+    },
+    {
+      code: `
+        module.exports = {
+          meta: { schema: [{}] },
+          create(context) {}
+        };
+      `,
+      output: `
+        module.exports = {
+          meta: { schema: [{}], defaultOptions: [] },
+          create(context) {}
+        };
+      `,
+      errors: [
+        { messageId: 'missingDefaultOptions', type: 'ObjectExpression' },
+      ],
+    },
+    {
+      code: `
+        module.exports = {
+          meta: { schema: [{}], defaultOptions: {} },
+          create(context) {}
+        };
+      `,
+      output: null,
+      errors: [
+        { messageId: 'defaultOptionsMustBeArray', type: 'ObjectExpression' },
+      ],
+    },
+    {
+      code: `
+        module.exports = {
+          meta: { schema: [{}], defaultOptions: undefined },
+          create(context) {}
+        };
+      `,
+      output: null,
+      errors: [{ messageId: 'defaultOptionsMustBeArray', type: 'Identifier' }],
+    },
+    {
+      code: `
+        module.exports = {
+          meta: { schema: [{}], defaultOptions: [] },
+          create(context) {}
+        };
+      `,
+      output: null,
+      errors: [
+        { messageId: 'defaultOptionsMustNotBeEmpty', type: 'ArrayExpression' },
+      ],
+    },
+  ],
+});
+
+const ruleTesterTypeScript = new RuleTester({
+  languageOptions: {
+    parser: require('@typescript-eslint/parser'),
+    parserOptions: { sourceType: 'module' },
+  },
+});
+
+ruleTesterTypeScript.run('require-meta-default-options (TypeScript)', rule, {
+  valid: [
+    `
+      export default createESLintRule<Options, MessageIds>({
+        meta: { schema: [] },
+        create(context) {}
+      });
+    `,
+  ],
+  invalid: [
+    {
+      code: `
+        export default createESLintRule<Options, MessageIds>({
+          meta: { schema: [{}] },
+          create(context) {}
+        });
+      `,
+      output: `
+        export default createESLintRule<Options, MessageIds>({
+          meta: { schema: [{}], defaultOptions: [] },
+          create(context) {}
+        });
+      `,
+      errors: [
+        { messageId: 'missingDefaultOptions', type: 'ObjectExpression' },
+      ],
+    },
+  ],
+});