.eslintrc.js 970 Bytes
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/'] }],
陈帅's avatar
陈帅 committed
23 24 25 26
    'import/no-extraneous-dependencies': [
      2,
      { optionalDependencies: true, devDependencies: false },
    ],
愚道's avatar
愚道 committed
27 28 29 30
    '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,
31
    'linebreak-style': 0,
jim's avatar
jim committed
32 33
  },
  settings: {
afc163's avatar
afc163 committed
34
    polyfills: ['fetch', 'promises', 'url'],
jim's avatar
jim committed
35 36
  },
};