.eslintrc.js 1.22 KB
Newer Older
jim's avatar
jim committed
1
module.exports = {
2
  parser: 'babel-eslint',
afc163's avatar
afc163 committed
3
  extends: ['airbnb', 'prettier', 'plugin:compat/recommended'],
jim's avatar
jim committed
4 5 6 7 8 9 10 11
  env: {
    browser: true,
    node: true,
    es6: true,
    mocha: true,
    jest: true,
    jasmine: true,
  },
12
  globals: {
13
    ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, // preview.pro.ant.design only do not use in your production ; preview.pro.ant.design ไธ“็”จ็Žฏๅขƒๅ˜้‡๏ผŒ่ฏทไธ่ฆๅœจไฝ ็š„้กน็›ฎไธญไฝฟ็”จๅฎƒใ€‚
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
14
    page: true,
15
  },
jim's avatar
jim committed
16
  rules: {
17 18 19 20 21
    'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
    'react/jsx-wrap-multilines': 0,
    'react/prop-types': 0,
    'react/forbid-prop-types': 0,
    'react/jsx-one-expression-per-line': 0,
afc163's avatar
afc163 committed
22
    'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }],
23 24
    'import/no-extraneous-dependencies': [
      2,
25 26
      {
        optionalDependencies: true,
27
        devDependencies: ['**/tests/**.js', '/mock/**/**.js', '**/**.test.js'],
28
      },
29
    ],
ๆ„š้“'s avatar
ๆ„š้“ committed
30 31 32 33
    'jsx-a11y/no-noninteractive-element-interactions': 0,
    'jsx-a11y/click-events-have-key-events': 0,
    'jsx-a11y/no-static-element-interactions': 0,
    'jsx-a11y/anchor-is-valid': 0,
34
    'linebreak-style': 0,
jim's avatar
jim committed
35 36
  },
  settings: {
chen shuai's avatar
chen shuai committed
37
    polyfills: ['fetch', 'promises', 'url', 'object-assign'],
jim's avatar
jim committed
38 39
  },
};