<commit_before>var getOptions = require("loader-utils").getOptions;
var validateOptions = require("schema-utils");

var schema = {
    type: "object",
    properties: {
        twigOptions: {
            type: "object",
        },
    },
};

module.exports = function(loader) {
    var options = getOptions(loader);
    if (!options) {
        return {};
    }
    validateOptions(schema, options, "twig-loader");
    return options;
};<commit_msg>Use additionalProperties keyword in JSON Schema to avoid invalid loader options<commit_after>var getOptions = require("loader-utils").getOptions;
var validateOptions = require("schema-utils");

var schema = {
    type: "object",
    properties: {
        twigOptions: {
            type: "object",
        },
    },
    additionalProperties: false,
};

module.exports = function (loader) {
    var options = getOptions(loader);
    if (!options) {
        return {};
    }
    validateOptions(schema, options, "twig-loader");
    return options;
};
{'fraction_non_alphanumeric': 0.13453815261044177, 'fraction_numerical': 0.0, 'mean_word_length': 2.9563492063492065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7415320', 'n_tokens_mistral': 277, 'n_tokens_neox': 276, 'n_words': 67}