.eslintrc.json 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. "parser": "@babel/eslint-parser",
  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", "@babel/eslint-plugin"],
  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. "react/react-in-jsx-scope": ["error"],
  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. "document.querySelector"
  38. ]
  39. },
  40. "overrides": [{
  41. "files": [
  42. "*.test.js",
  43. "test/endtoend/*.js",
  44. "website/*.js",
  45. "bin/*.js"
  46. ],
  47. "rules": {
  48. "compat/compat": "off"
  49. }
  50. },{
  51. "files": [
  52. "packages/@uppy/locales/src/*.js",
  53. "packages/@uppy/locales/template.js"
  54. ],
  55. "rules": {
  56. "camelcase": "off",
  57. "quote-props": "off"
  58. }
  59. }]
  60. }