home
This commit is contained in:
parent
a71a3b5593
commit
cb52890889
16657 changed files with 1483086 additions and 1 deletions
28
home/ags/node_modules/eslint-plugin-es-x/lib/rules/no-initializers-in-for-in.js
generated
vendored
Normal file
28
home/ags/node_modules/eslint-plugin-es-x/lib/rules/no-initializers-in-for-in.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"use strict"
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description: "disallow initializers in for-in heads.",
|
||||
category: "legacy",
|
||||
recommended: false,
|
||||
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-initializers-in-for-in.html",
|
||||
},
|
||||
fixable: null,
|
||||
messages: {
|
||||
forbidden:
|
||||
"Annex B feature the initializers in for-in heads are forbidden.",
|
||||
},
|
||||
schema: [],
|
||||
type: "problem",
|
||||
},
|
||||
create(context) {
|
||||
return {
|
||||
"ForInStatement > VariableDeclaration.left > VariableDeclarator.declarations > *.init"(
|
||||
node,
|
||||
) {
|
||||
context.report({ node, messageId: "forbidden" })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue