reject-relative-requires¶
拒绝使用相对路径的 require 调用。
此规则不符合代码示例:¶
require("./relative/path")
require("../parent/folder/path")
loader.lazyRequireGetter(this, "path", "../parent/folder/path", true)
此规则符合代码示例:¶
require("devtools/absolute/path")
require("resource://gre/modules/SomeModule.sys.mjs")
loader.lazyRequireGetter(this, "path", "devtools/absolute/path", true)