Improve javascript coding style
This blueprint is about Javascript coding style improvement, like python has pep8, it could be interesting to have some rules for javascript too. JSHint provides some rules to perform this and I think it could be a great idea to discuss about which rules could be integrated into Horizon.
According to http://
- bitwise
- curly
- eqeqeq
- forin
- latedef
- noempty
- undef
- unused with vars
- trailing
Here is a second list of options which can be integrated but need some discussion before:
- camelcase
- quotmark
Blueprint information
- Status:
- Complete
- Approver:
- David Lyle
- Priority:
- Medium
- Drafter:
- Maxime Vidori
- Direction:
- Approved
- Assignee:
- Maxime Vidori
- Definition:
- Approved
- Series goal:
- Accepted for juno
- Implementation:
- Implemented
- Milestone target:
- 2014.2
- Started by
- David Lyle
- Completed by
- David Lyle
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Javascript coding style indent 2
For the first patch I have chosen to fix indentation at 2 spaces, due to the particularity of javascript to have a bunch of nested functions.
This is a personal choice, it can be changed, let me know your opinion on this.
Addressed by: https:/
Javascript force use of the identity operator
Addressed by: https:/
Javascript force use of the curly braces.
Addressed by: https:/
Javascript force filtering object items
Addressed by: https:/
Javascript prohibits the use of bitwise operators
Addressed by: https:/
Javascript detection of unused variables
Addressed by: https:/
Fix charts display in Resource Usage
Gerrit topic: https:/
Addressed by: https:/
Add jshint for javascript linting