Skip to content

Create no-global-assign rule #5358

@jacksonrayhamilton

Description

@jacksonrayhamilton

What version are you using?

2.2.0

What did you do?

I have the file test.js:

/*global a:false */
a = 5;

I have the configuration .eslintrc.yaml:

root: true
rules:
  no-undef: 2

I linted the file with the command-line argument eslint test.js.

What happened?

It did not report any errors.

What did you expect to happen?

I expect it to warn me that I am assigning to a global variable with the false flag, as described in the documentation.

Metadata

Metadata

Assignees

Labels

acceptedThere 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 discussionfeatureThis change adds a new feature to ESLintruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions