2

我的 eslint 定义是:

padded-blocks: ["error", { "blocks": "never" }]

我的代码是:

Vue.directive('confirm', {
  bind(el, binding) {
    el.addEventListener('click', () => {
...

但我仍然得到:

✘  http://eslint.org/docs/rules/padded-blocks  Block must not be padded by blank lines
   src/directives/confirm.js:6:40
     el.addEventListener('click', () => {

是不是什么bug?

谢谢

4

1 回答 1

3

如果我正确理解你的例子,那么它应该是

padded-blocks: ["error", { "blocks": "always" }]
于 2018-03-24T16:12:08.263 回答