-
Notifications
You must be signed in to change notification settings - Fork 657
Conversation
import {Path} from '@romejs/js-compiler'; | ||
|
||
const DEFAULT_BASENAME_MESSAGE = | ||
'Variable declarations using `var` are disallowed, use `let` or `const` instead.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible improvement: Automatically suggest let
or const
based on how the variable is currently used (or at least refine down to just let
if it gets reassigned). If the variable isn't used yet (which will happen often when linting while typing) it could use the default message.
Missing a test, otherwise looks good. |
576aebf
to
b1960dd
Compare
var littleOffset = 26; | ||
var numberOffset = 52; | ||
const littleOffset = 26; | ||
const numberOffset = 52; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this lint rule caught some stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dope
Thank you! |
Just going through the list here: #20 (comment) Wanted to grab something easy.