.eslintrc.js 837 Bytes
Newer Older
陈帅's avatar
陈帅 committed
1 2
const fabric = require('@umijs/fabric');

jim's avatar
jim committed
3
module.exports = {
陈帅's avatar
陈帅 committed
4 5 6
  ...fabric.default,
  rules: {
    ...fabric.default.rules,
duanledexianxianxian's avatar
duanledexianxianxian committed
7 8 9 10 11 12 13
    'import/no-extraneous-dependencies': [
      2,
      {
        optionalDependencies: true,
        devDependencies: ['**/tests/**.js', '/mock/**/**.js', '**/**.test.js', '**/**._mock.js'],
      },
    ],
duanledexianxianxian's avatar
duanledexianxianxian committed
14 15 16 17 18 19 20 21 22 23 24 25
    'import/no-named-as-default': 0,
  },
  settings: {
    ...fabric.default.settings,
    // support import modules from TypeScript files in JavaScript files
    'import/resolver': {
      node: { extensions: ['.js', '.ts', '.tsx'] },
      alias: {
        map: [['@', './src'], ['utils', './src/utils'], ['config', './config']],
        extensions: ['.ts', '.js', '.jsx', '.json'],
      },
    },
jim's avatar
jim committed
26
  },
27
  globals: {
陈帅's avatar
陈帅 committed
28
    ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
陈帅's avatar
陈帅 committed
29
    page: true,
jim's avatar
jim committed
30 31
  },
};