GithubHelp home page GithubHelp logo

Coding Standards about deathdeath HOT 4 OPEN

hoylemd avatar hoylemd commented on June 16, 2024
Coding Standards

from deathdeath.

Comments (4)

hoylemd avatar hoylemd commented on June 16, 2024

My ideas:
Javascript:
braces should be on their own lines whenever possible
lines should not be longer than 80 characters
When creating objects, use closures to hide as much object data as possible
camel-case all identifiers
operators should have one space on either side
indentation is to be done with tab characters (reccommend width of 4 characters to ease reading and staying under the 80 character limit)
The global scope is not to be used except for our top-level object "dd" Everything should be a subelement of dd.
HTML:
No javascript code should be present in an .html file. put them in their own files
javascript files should be included through script tags at the bottom of the html page.
CSS:
Every attribute should be on it's own line.
compound attributes are allowed.
No spaces between attribute names, ":", values, and ";"
{ / } on their own lines

from deathdeath.

rocky1138 avatar rocky1138 commented on June 16, 2024

Javascript files should be included in the tag as is common convention.
No javascript is run outside of what begins inside the window.onload() function to ensure everything has loaded first.

from deathdeath.

rocky1138 avatar rocky1138 commented on June 16, 2024

No block-level or inline elements outside of (this means we have to move your "Press arrow keys to move" into the )

from deathdeath.

rocky1138 avatar rocky1138 commented on June 16, 2024

All code blocks should have curly braces, including what would normally be short-ifs and next-line functions.

e.g.,
if (x=1)
{
x++;
}

from deathdeath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.