{
    "additionalProperties": false,
    "description": "replace-in-file options.",
    "properties": {
        "$schema": {
            "type": "string"
        },
        "$tool": {
            "const": "replace-in-file",
            "description": "Must be set to replace-in-file",
            "type": "string"
        },
        "allowEmptyPaths": {
            "description": "Specify if empty/invalid file paths are allowed (defaults to false). If set to true these paths will fail silently and no error will be thrown.",
            "type": "boolean"
        },
        "encoding": {
            "description": "Character encoding for reading/writing files (defaults to utf-8).",
            "type": "string"
        },
        "files": {
            "oneOf": [
                {
                    "description": "File(glob) to proccess.",
                    "type": "string"
                },
                {
                    "description": "Files(glob) to proccess.",
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            ]
        },
        "from": {
            "description": "RegExp(s) to find from files.",
            "oneOf": [
                {
                    "instanceof": "RegExp"
                },
                {
                    "preproccess": "regexp",
                    "type": "string"
                },
                {
                    "items": {
                        "oneOf": [
                            {
                                "instanceof": "RegExp"
                            },
                            {
                                "preproccess": "regexp",
                                "type": "string"
                            }
                        ]
                    },
                    "minItems": 1,
                    "type": "array"
                }
            ]
        },
        "to": {
            "description": "Multiple replacements with same/different strings (replaced sequentially).",
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "items": {
                        "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                }
            ]
        }
    },
    "required": [
        "$tool",
        "files",
        "from",
        "to"
    ],
    "title": "replace-in-file Config",
    "type": "object"
}