.eslintrc.json 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. "parser": "babel-eslint",
  3. "extends": ["standard", "standard-jsx"],
  4. "env": {
  5. "browser": true,
  6. "node": true,
  7. "jest": true
  8. },
  9. "globals": {
  10. "window": true,
  11. "hexo": true
  12. },
  13. "plugins": ["jest", "compat", "jsdoc"],
  14. "rules": {
  15. "jsx-quotes": ["error", "prefer-double"],
  16. "compat/compat": ["error"],
  17. "react/jsx-handler-names": ["warn"], // maybe we want to do this in the future?
  18. "no-unused-vars": ["off"], // Buggy: wrongly flags `i` in `for (const i in iterator)`—reenable ASAP
  19. "jsdoc/check-alignment": ["warn"],
  20. "jsdoc/check-examples": ["warn"],
  21. "jsdoc/check-param-names": ["warn"],
  22. "jsdoc/check-syntax": ["warn"],
  23. "jsdoc/check-tag-names": ["warn"],
  24. "jsdoc/check-types": ["warn"],
  25. "jsdoc/newline-after-description": ["warn"],
  26. "jsdoc/valid-types": ["warn"],
  27. "jsdoc/check-indentation": ["off"]
  28. },
  29. "settings": {
  30. "react": {
  31. "pragma": "h"
  32. },
  33. "polyfills": [
  34. "Promise",
  35. "fetch",
  36. "Object.assign"
  37. ]
  38. },
  39. "overrides": [{
  40. "files": [
  41. "*.test.js",
  42. "test/endtoend/*.js",
  43. "website/*.js",
  44. "bin/*.js"
  45. ],
  46. "rules": {
  47. "compat/compat": "off"
  48. }
  49. },{
  50. "files": [
  51. "packages/@uppy/locales/src/*.js",
  52. "packages/@uppy/locales/template.js"
  53. ],
  54. "rules": {
  55. "camelcase": "off",
  56. "quote-props": "off"
  57. }
  58. }]
  59. }