How to use the eslint/lib/config/config-ops.merge function in eslint

To help you get started, we’ve selected a few eslint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codeclimate / codeclimate-eslint / lib / config_upgrader.js View on Github external
upgrade(originalConfig) {
    if (typeof originalConfig === "undefined" || originalConfig === null) {
      return {};
    }

    let config = merge({}, originalConfig);

    this._report = [];

    let report = upgradeEcmaFeatures(config);
    this._report = this._report.concat(report);
    if (Reflect.has(config, "rules")) {
      report = upgradeRules(config.rules);
      this._report = this._report.concat(report);
    }

    return config;
  }
github codeclimate / codeclimate-eslint / lib / rule_blocklist.js View on Github external
filter(originalConfig) {
    if (typeof originalConfig === "undefined" || originalConfig === null) {
      return {};
    }

    let config = merge({}, originalConfig);

    this._report = [];

    if (Reflect.has(config, "rules")) {
      let report = filterRules(config.rules);
      this._report = this._report.concat(report);
    }

    return config;
  }
github beemojs / beemo / packages / rocket-engine-eslint / src / ESLintEngine.js View on Github external
mergeConfig(prev: Object, next: Object): Object {
    return ConfigOps.merge(prev, next);
  }
}