_commons.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. "use strict"
  2. module.exports = {
  3. commonGlobals: {
  4. // ECMAScript
  5. ArrayBuffer: "readonly",
  6. Atomics: "readonly",
  7. BigInt: "readonly",
  8. BigInt64Array: "readonly",
  9. BigUint64Array: "readonly",
  10. DataView: "readonly",
  11. Float32Array: "readonly",
  12. Float64Array: "readonly",
  13. Int16Array: "readonly",
  14. Int32Array: "readonly",
  15. Int8Array: "readonly",
  16. Map: "readonly",
  17. Promise: "readonly",
  18. Proxy: "readonly",
  19. Reflect: "readonly",
  20. Set: "readonly",
  21. SharedArrayBuffer: "readonly",
  22. Symbol: "readonly",
  23. Uint16Array: "readonly",
  24. Uint32Array: "readonly",
  25. Uint8Array: "readonly",
  26. Uint8ClampedArray: "readonly",
  27. WeakMap: "readonly",
  28. WeakSet: "readonly",
  29. // ECMAScript (experimental)
  30. globalThis: "readonly",
  31. // ECMA-404
  32. Intl: "readonly",
  33. // Web Standard
  34. TextDecoder: "readonly",
  35. TextEncoder: "readonly",
  36. URL: "readonly",
  37. URLSearchParams: "readonly",
  38. WebAssembly: "readonly",
  39. clearInterval: "readonly",
  40. clearTimeout: "readonly",
  41. console: "readonly",
  42. queueMicrotask: "readonly",
  43. setInterval: "readonly",
  44. setTimeout: "readonly",
  45. // Node.js
  46. Buffer: "readonly",
  47. GLOBAL: "readonly",
  48. clearImmediate: "readonly",
  49. global: "readonly",
  50. process: "readonly",
  51. root: "readonly",
  52. setImmediate: "readonly",
  53. },
  54. commonRules: {
  55. "no-process-exit": "error",
  56. "node/no-deprecated-api": "error",
  57. "node/no-extraneous-import": "error",
  58. "node/no-extraneous-require": "error",
  59. "node/no-exports-assign": "error",
  60. "node/no-missing-import": "error",
  61. "node/no-missing-require": "error",
  62. "node/no-unpublished-bin": "error",
  63. "node/no-unpublished-import": "error",
  64. "node/no-unpublished-require": "error",
  65. "node/no-unsupported-features/es-builtins": "error",
  66. "node/no-unsupported-features/es-syntax": "error",
  67. "node/no-unsupported-features/node-builtins": "error",
  68. "node/process-exit-as-throw": "error",
  69. "node/shebang": "error",
  70. },
  71. }