'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);

function getESLintImportSettings(options) {
  return {
    'import/resolver': {
      node: {
        extensions: ['.mjs', '.ts', '.tsx', '.js', '.jsx', '.json', '.vue']
      },
      alias: {
        map: [['src', './src']].concat(_toConsumableArray__default["default"]((options === null || options === void 0 ? void 0 : options.aliasMap) || [])),
        // 告诉 resolver-alias 有哪些后缀的文件要解析
        extensions: ['.mjs', '.ts', '.tsx', '.js', '.jsx', '.json', '.vue']
      }
    },
    'import/ignore': ['node_modules']
  };
}

exports.getESLintImportSettings = getESLintImportSettings;
