Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 338 Bytes

no-var-set.md

File metadata and controls

20 lines (13 loc) · 338 Bytes

Do not use var to declare variables

Rule name: no-var-set

Always use let or const to declare variables.

Rule Details

Examples of incorrect code for this rule:

var variable = 'hello'

Examples of correct code for this rule:

const variable = 'hello'
let variable = 'hello'