UNPKG

668 BJavaScriptView Raw
1/**
2 * @fileoverview Default config options
3 * @author Teddy Katz
4 */
5
6"use strict";
7
8/**
9 * Freezes an object and all its nested properties
10 * @param {Object} obj The object to deeply freeze
11 * @returns {Object} `obj` after freezing it
12 */
13function deepFreeze(obj) {
14 if (obj === null || typeof obj !== "object") {
15 return obj;
16 }
17
18 Object.keys(obj).map(key => obj[key]).forEach(deepFreeze);
19 return Object.freeze(obj);
20}
21
22module.exports = deepFreeze({
23 env: {},
24 globals: {},
25 rules: {},
26 settings: {},
27 parser: "espree",
28 parserOptions: {
29 ecmaVersion: 5,
30 sourceType: "script",
31 ecmaFeatures: {}
32 }
33});