Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Refactor lisk-core constants to use const, upper case with underscores #1774

Closed
ManuGowda opened this issue Mar 22, 2018 · 2 comments · Fixed by #2371
Closed

Refactor lisk-core constants to use const, upper case with underscores #1774

ManuGowda opened this issue Mar 22, 2018 · 2 comments · Fixed by #2371

Comments

@ManuGowda
Copy link
Contributor

Expected behavior

  • The constants should be defined using const
  • The constants names should have an upper case with underscores for separators.

Actual behavior

  • Lisk-core constants are using vars, this would lead to the mutability of the constants and leading to change in behaviour in the application.
  • The constants are defined using lowercase with camelCase for separators.

Steps to reproduce

var constants = require('../helpers/constants.js');
constants.activeDelegates = 300;
Now the activeDelegates count will be changed to 300 from 101.

Which version(s) does this affect? (Environment, OS, etc...)

1.0.0

@4miners
Copy link
Contributor

4miners commented Mar 22, 2018

Reopen, because it was closed automatically by mistake.

@MaciejBaj
Copy link
Contributor

Consecutively in the whole application change var to const when possible, and var to let when it gets mutated.

@MaciejBaj MaciejBaj added this to the Version 1.3.0 milestone Aug 22, 2018
@yatki yatki self-assigned this Sep 3, 2018
@diego-G diego-G modified the milestone: Version 1.3.0 Sep 11, 2018
MaciejBaj added a commit that referenced this issue Sep 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants