summaryrefslogtreecommitdiff
path: root/tools/eslint/conf/default-config-options.js
blob: 96fe25ce6f16ff8cc9744f1818ae3f73bd9186cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * @fileoverview Default config options
 * @author Teddy Katz
 */

"use strict";

/**
 * Freezes an object and all its nested properties
 * @param {Object} obj The object to deeply freeze
 * @returns {Object} `obj` after freezing it
 */
function deepFreeze(obj) {
    if (obj === null || typeof obj !== "object") {
        return obj;
    }

    Object.keys(obj).map(key => obj[key]).forEach(deepFreeze);
    return Object.freeze(obj);
}

module.exports = deepFreeze({
    env: {},
    globals: {},
    rules: {},
    settings: {},
    parser: "espree",
    parserOptions: {}
});