|
1 | 1 | module.exports = { |
2 | | - extends: [require.resolve('@umijs/fabric/dist/eslint')], |
| 2 | + parser: 'babel-eslint', |
| 3 | + extends: ['airbnb', 'prettier', 'plugin:compat/recommended'], |
| 4 | + env: { |
| 5 | + browser: true, |
| 6 | + node: true, |
| 7 | + es6: true, |
| 8 | + mocha: true, |
| 9 | + jest: true, |
| 10 | + jasmine: true, |
| 11 | + }, |
3 | 12 | globals: { |
| 13 | + APP_TYPE: true, |
4 | 14 | page: true, |
5 | 15 | }, |
| 16 | + rules: { |
| 17 | + 'react/jsx-filename-extension': [1, { extensions: ['.js'] }], |
| 18 | + 'react/jsx-wrap-multilines': 0, |
| 19 | + 'react/prop-types': 0, |
| 20 | + 'react/forbid-prop-types': 0, |
| 21 | + 'react/jsx-one-expression-per-line': 0, |
| 22 | + 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }], |
| 23 | + 'import/no-extraneous-dependencies': [ |
| 24 | + 2, |
| 25 | + { |
| 26 | + optionalDependencies: true, |
| 27 | + devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'], |
| 28 | + }, |
| 29 | + ], |
| 30 | + 'jsx-a11y/no-noninteractive-element-interactions': 0, |
| 31 | + 'jsx-a11y/click-events-have-key-events': 0, |
| 32 | + 'jsx-a11y/no-static-element-interactions': 0, |
| 33 | + 'jsx-a11y/anchor-is-valid': 0, |
| 34 | + 'linebreak-style': 0, |
| 35 | + 'import/extensions': 0, |
| 36 | + 'import/no-extraneous-dependencies': 0, |
| 37 | + }, |
| 38 | + settings: { |
| 39 | + polyfills: ['fetch', 'promises', 'url'], |
| 40 | + }, |
6 | 41 | }; |
0 commit comments