.eslintrc.json 1.8 KB

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