.eslintrc.json 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. "VideoDecoder": "readonly"
  46. },
  47. "rules": {
  48. "no-throw-literal": [
  49. "error"
  50. ],
  51. "quotes": [
  52. "error",
  53. "single"
  54. ],
  55. "prefer-const": [
  56. "error",
  57. {
  58. "destructuring": "any",
  59. "ignoreReadBeforeAssign": false
  60. }
  61. ],
  62. "no-irregular-whitespace": [
  63. "error"
  64. ],
  65. "no-duplicate-imports": [
  66. "error"
  67. ],
  68. "prefer-spread": "error",
  69. "valid-jsdoc": [
  70. "error",
  71. {
  72. "requireReturn": false,
  73. "requireReturnType": true,
  74. "requireParamDescription": false,
  75. "requireReturnDescription": false,
  76. "requireParamType": true,
  77. "preferType": {
  78. "Any": "any",
  79. "Boolean": "boolean",
  80. "Number": "number",
  81. "object": "Object",
  82. "String": "string"
  83. }
  84. }
  85. ]
  86. }
  87. }
粤ICP备19079148号