Javascript style guide inspired in Airbnb rules
EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.
-
Spaces must be used to indent instead of tabs.
-
Use 2 spaces to indent the code.
-
Use "lf" char at end of line.
-
UTF-8 charset.
-
Remove white spaces at the end of the line.
-
Last line must be blank.
Babel allows you to use ES6 features in your projects and then compiles ES5 for you to use in production.
All code must be written using babel ES6 rules. Get more ES6 info here.
-
Arrows and Lexical This
-
Classes
-
Template Strings
-
Default + Rest + Spread
-
Let + Const
-
Iterators + For..Of
-
Generators
-
Modules
-
And much more...
ESLint is an open source project, It's goal is to provide a pluggable linting utility for JavaScript.
This rules are optimized for ECMAScript 2015 and eslint versions ^3.0.0.
You can check the rules for BBVA eslint in this link.
npm install --save-dev eslint-config-bbva eslint
.- add
"extends": "bbva"
to your .eslintrc.js file in your project.
This little beautifier will reformat and reindent bookmarklets, ugly JavaScript, unpack scripts packed by Dean Edward’s popular packer, as well as deobfuscate scripts processed by javascriptobfuscator.
- Do not use console statements. When using Ember it's recommended to log with the Object Ember.Logger
Why? messages are considered to be for debugging purposes and therefore not suitable to ship to the client.
Ember.Logger.log("Hey!");
-
Trailing commas are not valid. eslint:
comma-dangle
Why? In some browsers trailing commas can throw an error.
// bad var foo = { bar: ":)", }; var wow = [1, 2]; // good var foo = { bar: ":)", }; var wow = [1, 2];
We use SemVer for versioning. For the versions available, see the tags on this repository.
See the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details