.eslintrc.js 1.03 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 13
  globals: {
    APP_TYPE: true,
ι™ˆεΈ…'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', 'Promise', 'url', 'object-assign'],
jim's avatar
jim committed
38 39
  },
};