动态菜单和动态路由的 antd pro

.eslintrc.js 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. module.exports = {
  2. parser: 'babel-eslint',
  3. extends: ['airbnb', 'prettier'],
  4. env: {
  5. browser: true,
  6. node: true,
  7. es6: true,
  8. mocha: true,
  9. jest: true,
  10. jasmine: true,
  11. },
  12. rules: {
  13. 'generator-star-spacing': [0],
  14. 'consistent-return': [0],
  15. 'react/forbid-prop-types': [0],
  16. 'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
  17. 'global-require': [1],
  18. 'import/prefer-default-export': [0],
  19. 'react/jsx-no-bind': [0],
  20. 'react/prop-types': [0],
  21. 'react/prefer-stateless-function': [0],
  22. 'react/jsx-wrap-multilines': [
  23. 'error',
  24. {
  25. declaration: 'parens-new-line',
  26. assignment: 'parens-new-line',
  27. return: 'parens-new-line',
  28. arrow: 'parens-new-line',
  29. condition: 'parens-new-line',
  30. logical: 'parens-new-line',
  31. prop: 'ignore',
  32. },
  33. ],
  34. 'no-else-return': [0],
  35. 'no-restricted-syntax': [0],
  36. 'import/no-extraneous-dependencies': [0],
  37. 'no-use-before-define': [0],
  38. 'jsx-a11y/no-static-element-interactions': [0],
  39. 'jsx-a11y/no-noninteractive-element-interactions': [0],
  40. 'jsx-a11y/click-events-have-key-events': [0],
  41. 'jsx-a11y/anchor-is-valid': [0],
  42. 'no-nested-ternary': [0],
  43. 'arrow-body-style': [0],
  44. 'import/extensions': [0],
  45. 'no-bitwise': [0],
  46. 'no-cond-assign': [0],
  47. 'import/no-unresolved': [0],
  48. 'comma-dangle': [
  49. 'error',
  50. {
  51. arrays: 'always-multiline',
  52. objects: 'always-multiline',
  53. imports: 'always-multiline',
  54. exports: 'always-multiline',
  55. functions: 'ignore',
  56. },
  57. ],
  58. 'object-curly-newline': [0],
  59. 'function-paren-newline': [0],
  60. 'no-restricted-globals': [0],
  61. 'require-yield': [1],
  62. },
  63. parserOptions: {
  64. ecmaFeatures: {
  65. experimentalObjectRestSpread: true,
  66. },
  67. },
  68. settings: {
  69. polyfills: ['fetch', 'promises'],
  70. },
  71. };