Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pep-8 like style guidelines for JavaScript

Is there a style guidelines document for JavaScript? Something like pep-8 for python or similar.

I could find http://docs.jquery.com/JQuery_Core_Style_Guidelines, so looking for things in a similar spirit.

like image 245
agiliq Avatar asked Jun 18 '11 03:06

agiliq


People also ask

What is PEP8 style guide?

PEP 8, sometimes spelled PEP8 or PEP-8, is a document that provides guidelines and best practices on how to write Python code. It was written in 2001 by Guido van Rossum, Barry Warsaw, and Nick Coghlan. The primary focus of PEP 8 is to improve the readability and consistency of Python code.

Which of the following rules are provided by PEP 8 choose three options?

PEP 8 provides the following rules to write comment block. Indent block comment should be at the same level. Start each line with the # followed by a single space. Separate line using the single #.


1 Answers

This is quite a good one with JavaScript Code Quality Tool

JSLint

and the instruction

JSLint instruction

but be careful it may hurt your feeling

like image 115
royrui Avatar answered Sep 27 '22 20:09

royrui