{ "type": "object", "properties": { "add": { "$ref": "#/$defs/stringOrStringArray", "description": "Add an extra package to the list of packages to be installed." }, "all": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Operate on all workspaces. The root workspace is omitted unless `includeRoot` is `true`." }, "bail": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Fail on first script failure." }, "includeRoot": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Operate on the root workspace. Only has an effect if `all` is `true`." }, "json": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Output JSON only." }, "linger": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Do not delete temp directories after completion." }, "verbose": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "Verbose logging." }, "workspace": { "$ref": "#/$defs/stringOrStringArray", "description": "One or more workspaces to run scripts in." }, "pm": { "$ref": "#/$defs/stringOrStringArray", "default": "npm@latest", "description": "Package manager(s) to use." }, "script": { "$ref": "#/$defs/stringOrStringArray", "description": "Script(s) to run. Alias of `scripts`." }, "scripts": { "$ref": "#/$defs/stringOrStringArray", "description": "Script(s) to run. Alias of `script`." }, "loose": { "$ref": "#/$defs/defaultFalse", "default": false, "description": "If `true`, fail if a workspace is missing a script." }, "checks": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "If `false`, run no builtin checks." }, "rules": { "type": "object", "properties": { "no-banned-files": { "anyOf": [ { "$ref": "#/$defs/severity", "default": "error", "description": "Severity of a rule. `off` disables the rule, `warn` will warn on violations, and `error` will error on violations." }, { "type": "object", "properties": { "allow": { "$ref": "#/$defs/arrayOfNonEmptyStrings", "default": [], "description": "Allow these banned files" }, "deny": { "$ref": "#/$defs/arrayOfNonEmptyStrings", "default": [], "description": "Deny these additional files" } }, "additionalProperties": false }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "$ref": "#/properties/rules/properties/no-banned-files/anyOf/1" }, { "$ref": "#/properties/rules/properties/no-banned-files/anyOf/0" } ] } ] }, "no-missing-pkg-files": { "anyOf": [ { "$ref": "#/$defs/severity", "default": "error", "description": "Severity of a rule. `off` disables the rule, `warn` will warn on violations, and `error` will error on violations." }, { "type": "object", "properties": { "bin": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Check the \"bin\" field (if it exists)" }, "browser": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Check the \"browser\" field (if it exists)" }, "types": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Check the \"types\" field (if it exists)" }, "unpkg": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Check the \"unpkg\" field (if it exists)" }, "module": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Check the \"module\" field (if it exists)" }, "fields": { "$ref": "#/$defs/arrayOfNonEmptyStrings", "default": [], "description": "Check files referenced by these additional top-level fields" } }, "additionalProperties": false }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "$ref": "#/properties/rules/properties/no-missing-pkg-files/anyOf/1" }, { "$ref": "#/properties/rules/properties/no-missing-pkg-files/anyOf/0" } ] } ] }, "no-missing-entry-point": { "anyOf": [ { "$ref": "#/$defs/severity", "default": "error", "description": "Severity of a rule. `off` disables the rule, `warn` will warn on violations, and `error` will error on violations." }, {}, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "$ref": "#/properties/rules/properties/no-missing-entry-point/anyOf/1" }, { "$ref": "#/properties/rules/properties/no-missing-entry-point/anyOf/0" } ] } ] }, "no-missing-exports": { "anyOf": [ { "$ref": "#/$defs/severity", "default": "error", "description": "Severity of a rule. `off` disables the rule, `warn` will warn on violations, and `error` will error on violations." }, { "type": "object", "properties": { "types": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Assert a \"types\" conditional export matches a file with a .d.ts extension" }, "require": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Assert a \"require\" conditional export matches a CJS script" }, "import": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Assert an \"import\" conditional export matches a ESM module" }, "order": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Assert conditional export \"default\", if present, is the last export" }, "glob": { "$ref": "#/$defs/defaultTrue", "default": true, "description": "Allow glob patterns in subpath exports" } }, "additionalProperties": false }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "$ref": "#/properties/rules/properties/no-missing-exports/anyOf/1" }, { "$ref": "#/properties/rules/properties/no-missing-exports/anyOf/0" } ] } ] } }, "additionalProperties": false, "default": { "no-missing-pkg-files": { "bin": true, "browser": true, "types": true, "unpkg": true, "module": true, "fields": [] }, "no-banned-files": { "allow": [], "deny": [] }, "no-missing-entry-point": {}, "no-missing-exports": { "types": true, "require": true, "import": true, "order": true, "glob": true } }, "description": "Rule configuration for checks" } }, "additionalProperties": false, "description": "midnight-smoker options schema", "$defs": { "defaultTrue": { "type": "boolean", "default": true }, "defaultFalse": { "type": "boolean", "default": false }, "stringOrStringArray": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "array", "items": { "$ref": "#/$defs/stringOrStringArray/anyOf/0" } } ], "default": [] }, "arrayOfNonEmptyStrings": { "type": "array", "items": { "$ref": "#/$defs/stringOrStringArray/anyOf/0" }, "default": [] }, "severity": { "type": "string", "enum": ["off", "warn", "error"], "description": "Severity of a rule. `off` disables the rule, `warn` will warn on violations, and `error` will error on violations.", "default": "error" } }, "$schema": "http://json-schema.org/draft-07/schema#" }