.eslintrc.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. module.exports = {
  2. extends: [require.resolve('@umijs/fabric/dist/eslint')],
  3. globals: {
  4. page: true,
  5. abp: true,
  6. APP_ABP_SIGNALR_CLIENT_JS_URL: true,
  7. REMOTE_SERVICE_BASE_URL: true,
  8. APP_API_MATERIAL_UPLOAD_URL: true,
  9. APP_API_MATERIAL_UPLOAD_PANORAMA_URL: true,
  10. APP_API_MATERIAL_UPLOAD_TOPIC_URL: true,
  11. APP_API_MATERIAL_UPLOAD_VIDEO_URL: true,
  12. APP_AVATAR_IMAGE_URL: true,
  13. APP_BASE_URL: true,
  14. APP_TYPE: true,
  15. BAIDU_MAP_AK: true,
  16. BMap: true,
  17. QQ_MAP_AK: true,
  18. qq: true
  19. },
  20. rules: {
  21. 'no-plusplus': 0,
  22. 'class-methods-use-this': 0,
  23. 'prefer-destructuring': 0,
  24. 'react/require-default-props': 0,
  25. 'no-restricted-syntax': 0, //http://88xml.com/2018/03/16/visual-studio-code%E6%8F%92%E4%BB%B6%E6%8E%A8%E8%8D%90/
  26. 'global-require': 0,
  27. 'no-param-reassign': 0,
  28. 'no-underscore-dangle': 0,
  29. 'no-nested-ternary': 0,
  30. 'no-script-url': 0,
  31. 'no-unused-expressions': 0,
  32. 'no-return-assign': 0,
  33. 'no-multi-assign': 0,
  34. 'react/jsx-props-no-spreading': 0,
  35. 'react/static-property-placement': 0,
  36. 'react/state-in-constructor': 0,
  37. 'eslint-comments/no-unlimited-disable': 0,
  38. 'no-shadow': 0,
  39. 'react/no-danger': 0,
  40. '@typescript-eslint/camelcase': 0,
  41. 'jsx-a11y/label-has-associated-control': 'off',
  42. 'jsx-a11y/label-has-for': 'off',
  43. '@typescript-eslint/no-use-before-define': 0,
  44. 'jsx-quotes': ['error', 'prefer-double']
  45. }
  46. }
  47. // module.exports = {
  48. // parser: 'babel-eslint',
  49. // extends: ['airbnb', 'prettier', 'plugin:compat/recommended'],
  50. // env: {
  51. // browser: true,
  52. // node: true,
  53. // es6: true,
  54. // mocha: true,
  55. // jest: true,
  56. // jasmine: true,
  57. // },
  58. // globals: {
  59. // APP_TYPE: true,
  60. // page: true,
  61. // abp: true,
  62. // APP_ABP_SIGNALR_CLIENT_JS_URL: true,
  63. // REMOTE_SERVICE_BASE_URL: true,
  64. // APP_API_MATERIAL_UPLOAD_URL: true,
  65. // APP_BASE_URL: true,
  66. // APP_TYPE: true,
  67. // },
  68. // rules: {
  69. // 'react/jsx-filename-extension': [1, { extensions: ['.js'] }],
  70. // 'react/jsx-wrap-multilines': 0,
  71. // 'react/prop-types': 0,
  72. // 'react/forbid-prop-types': 0,
  73. // 'react/jsx-one-expression-per-line': 0,
  74. // 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }],
  75. // 'import/no-extraneous-dependencies': [
  76. // 2,
  77. // {
  78. // optionalDependencies: true,
  79. // devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'],
  80. // },
  81. // ],
  82. // 'jsx-a11y/no-noninteractive-element-interactions': 0,
  83. // 'jsx-a11y/click-events-have-key-events': 0,
  84. // 'jsx-a11y/no-static-element-interactions': 0,
  85. // 'jsx-a11y/anchor-is-valid': 0,
  86. // 'linebreak-style': 0,
  87. // 'no-plusplus': 0,
  88. // 'class-methods-use-this': 0,
  89. // 'prefer-destructuring': 0,
  90. // 'react/require-default-props': 0,
  91. // 'no-restricted-syntax': 0, //http://88xml.com/2018/03/16/visual-studio-code%E6%8F%92%E4%BB%B6%E6%8E%A8%E8%8D%90/
  92. // 'global-require': 0,
  93. // 'no-param-reassign': 0,
  94. // 'no-underscore-dangle': 0,
  95. // 'no-nested-ternary': 0,
  96. // 'no-script-url': 0,
  97. // 'no-unused-expressions': 0,
  98. // 'no-return-assign': 0,
  99. // 'no-multi-assign': 0,
  100. // },
  101. // settings: {
  102. // polyfills: ['fetch', 'promises', 'url'],
  103. // },
  104. // };