enforceInMethodNames

此规则使用 { "enforceInMethodNames": true } 选项的错误代码示例:

Examples of incorrect code for this rule with the { "enforceInMethodNames": true } option:

/*eslint no-underscore-dangle: ["error", { "enforceInMethodNames": true }]*/

class Foo {
  _bar() {}
}

class Foo {
  bar_() {}
}

const o = {
  _bar() {}
};

const o = {
  bar_() = {}
};