.eslintrc.json 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {
  2. "root": true,
  3. "env": {
  4. "browser": true,
  5. "node": true,
  6. "es2018": true
  7. },
  8. "parserOptions": {
  9. "ecmaVersion": 2018,
  10. "sourceType": "module"
  11. },
  12. "extends": [
  13. "mdcs",
  14. "plugin:compat/recommended"
  15. ],
  16. "plugins": [
  17. "html",
  18. "import"
  19. ],
  20. "settings": {
  21. "polyfills": [
  22. "WebGL2RenderingContext"
  23. ]
  24. },
  25. "globals": {
  26. "__THREE_DEVTOOLS__": "readonly",
  27. "potpack": "readonly",
  28. "fflate": "readonly",
  29. "Stats": "readonly",
  30. "XRWebGLBinding": "readonly",
  31. "XRWebGLLayer": "readonly",
  32. "GPUShaderStage": "readonly",
  33. "GPUBufferUsage": "readonly",
  34. "GPUTextureUsage": "readonly",
  35. "GPUTexture": "readonly",
  36. "GPUMapMode": "readonly",
  37. "QUnit": "readonly",
  38. "Ammo": "readonly",
  39. "XRRigidTransform": "readonly",
  40. "XRMediaBinding": "readonly",
  41. "CodeMirror": "readonly",
  42. "esprima": "readonly",
  43. "jsonlint": "readonly",
  44. "VideoFrame": "readonly"
  45. },
  46. "rules": {
  47. "no-throw-literal": [
  48. "error"
  49. ],
  50. "quotes": [
  51. "error",
  52. "single"
  53. ],
  54. "prefer-const": [
  55. "error",
  56. {
  57. "destructuring": "any",
  58. "ignoreReadBeforeAssign": false
  59. }
  60. ],
  61. "no-irregular-whitespace": [
  62. "error"
  63. ],
  64. "no-duplicate-imports": [
  65. "error"
  66. ],
  67. "valid-jsdoc": [
  68. "error",
  69. {
  70. "requireReturn": false,
  71. "requireReturnType": true,
  72. "requireParamDescription": false,
  73. "requireReturnDescription": false,
  74. "requireParamType": true
  75. }
  76. ]
  77. }
  78. }
粤ICP备19079148号