Repository: eslint/eslint
File: lib/rules/no-restricted-exports.js (JavaScript)

Code before:
                {
                    type: "object",
                    properties: {
                        restrictedNamedExports: {
                            type: "array",
                            items: {
                                type: "string"
                            },
                            uniqueItems: true
                        }
                    },
                    additionalProperties: false
                },
                {
                    type: "object",
                    properties: {
                        restrictedNamedExportsPattern: {
                            type: "array",
                            items: {
                                type: "string"
                            },
                            uniqueItems: true
                        }
                    },
                    additionalProperties: false
                },
                {
                    type: "object",
                    properties: {
                        restrictedNamedExports: {
                            type: "array",
                            items: {
                                type: "string",
                                pattern: "^(?!default$)"
                            },
                            uniqueItems: true
                        },
                        restrictDefaultExports: {
                            type: "object",
                            properties: {

                                // Allow/Disallow `export default foo; export default 42; export default function foo() {}` format
                                direct: {
                                    type: "boolean"
                                },

                                // Allow/Disallow `export { foo as default };` declarations
                                named: {
                                    type: "boolean"
                                },


Review comment (suggestion):
as discussed in the issue this option would be along with `restrictedNamedExports`, here it is in `anyOf` means only one can be used. can you change this.
```js
{
                    type: "object",
                    properties: {
                        restrictedNamedExports: {
                            type: "array",
                            items: {
                                type: "string"
                            },
                            uniqueItems: true
                        },
                       restrictedNamedExportsPattern: {
                            type: "string"
                       }

                    },
                    additionalProperties: false
                },
```

Code after:
                    properties: {
                        restrictedNamedExports: {
                            type: "array",
                            items: {
                                type: "string"
                            },
                            uniqueItems: true
                        },
                        restrictedNamedExportsPattern: { type: "string" }
                    },
                    additionalProperties: false
                },
                {
                    type: "object",
                    properties: {
                        restrictedNamedExports: {
                            type: "array",
                            items: {
                                type: "string",
                                pattern: "^(?!default$)"
                            },
                            uniqueItems: true
                        },
                        restrictedNamedExportsPattern: { type: "string" },
                        restrictDefaultExports: {
                            type: "object",
                            properties: {

                                // Allow/Disallow `export default foo; export default 42; export default function foo() {}` format
                                direct: {
                                    type: "boolean"
                                },

                                // Allow/Disallow `export { foo as default };` declarations
                                named: {
                                    type: "boolean"
                                },

                                //  Allow/Disallow `export { default } from "mod"; export { default as default } from "mod";` declarations
                                defaultFrom: {
                                    type: "boolean"
                                },

                                //  Allow/Disallow `export { foo as default } from "mod";` declarations
                                namedFrom: {
                                    type: "boolean"
                                },

                                //  Allow/Disallow `export * as default from "mod"`; declarations
                                namespaceFrom: {
                                    type: "boolean"