-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
These test cases should be valid:
{
code: "var foo = function* ( arg1 ){};",
args: [1, "start"],
ecmaFeatures: { "generators": true }
},
{
code: "var foo = function *( arg1 ){};",
args: [1, "end"],
ecmaFeatures: { "generators": true }
}
Here are the errors:
1) generator-star var foo = function* ( arg1 ){};:
AssertionError: Should have no errors but had 1: [ { ruleId: 'generator-star',
severity: 1,
node:
{ type: 'FunctionExpression',
id: null,
params: [Object],
defaults: [],
body: [Object],
rest: null,
generator: true,
expression: false,
range: [Object],
loc: [Object],
parent: [Object] },
message: 'Expected no space before *.',
line: 1,
column: 10,
source: 'function* ( arg1 ){}' } ]: expected 1 to equal 0
2) generator-star var foo = function *( arg1 ){};:
AssertionError: Should have no errors but had 1: [ { ruleId: 'generator-star',
severity: 1,
node:
{ type: 'FunctionExpression',
id: null,
params: [Object],
defaults: [],
body: [Object],
rest: null,
generator: true,
expression: false,
range: [Object],
loc: [Object],
parent: [Object] },
message: 'Expected a space before *.',
line: 1,
column: 10,
source: 'function *( arg1 ){}' } ]: expected 1 to equal 0
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules