| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
"use strict" |
| 6 |
|
| 7 |
module.exports = { |
| 8 |
meta: { |
| 9 |
docs: { |
| 10 |
description: "disallow `for-of` statements.", |
| 11 |
category: "ES2015", |
| 12 |
recommended: false, |
| 13 |
url: |
| 14 |
"http://mysticatea.github.io/eslint-plugin-es/rules/no-for-of-loops.html", |
| 15 |
}, |
| 16 |
fixable: null, |
| 17 |
messages: { |
| 18 |
forbidden: "ES2015 'for-of' statements are forbidden.", |
| 19 |
}, |
| 20 |
schema: [], |
| 21 |
type: "problem", |
| 22 |
}, |
| 23 |
create(context) { |
| 24 |
return { |
| 25 |
ForOfStatement(node) { |
| 26 |
context.report({ node, messageId: "forbidden" }) |
| 27 |
}, |
| 28 |
} |
| 29 |
}, |
| 30 |
} |