Comments (7)
Hi Zeno,
I totally agree. We actually have a very consistent pattern in Liferay
(this is documented on our internal wiki), and ideally it would be the same
across the board (that way developers don't have to learn two types of
formatting).
Do you know of any tools that help enforce different coding standards?
Thanks Zeno,
Nate Cavanaugh
Director of UI Engineering
Liferay, Inc.
Enterprise. Open Source. For life
On Thu, Aug 9, 2012 at 7:29 PM, Zeno Rocha [email protected] wrote:
We need to define a code style for the project. I've seen a mix between
tabs vs spaces, for example.Some consolidated definitions:
- Idiomatic JS https://github.com/rwldrn/idiomatic.js/
- Idiomatic CSS https://github.com/necolas/idiomatic-css/
- jQuery Core Style Guidelineshttp://docs.jquery.com/JQuery_Core_Style_Guidelines
- Dojo Style Guide http://dojotoolkit.org/community/styleGuide
- Google JavaScript Guidehttp://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
Maybe we could follow the YUI's code style (if it exists).
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/12.
from alloy-ui.
I recommend Google Closure style guide with few exceptions, for instance, the underscore on private members in the end of the name.
I have been using this style on my components and personal projects and seems to be very close to what we have in Alloy/Liferay.
http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
from alloy-ui.
Nice!
I don't know any tools that can help us detecting different coding standards, but I'll see if I can find one.
from alloy-ui.
While I was writing examples for alloyui.com, I remembered how important this Code Style Guide is and because of that I returned to this issue again.
Well, I made some research and I think I finally found a solution.
YUI-Lint, a new project from YUI Team that offers a set of configurations to use with JSLint.
The good thing about this is:
- It's written in NodeJS, so we can easily integrate with Shifter (alloy-ui) or Docpad (alloyui.com)
- We are not going to have just a document that declares our rules
- Instead we are going to have a tool that can be attached to our code editors to automate the process of verifying if that piece of code follows our rules or not
What do you think?
from alloy-ui.
Just added it to the alloyui.com repository.
https://github.com/zenorocha/alloyui.com#jshint
from alloy-ui.
+1 for Shifter and JsLint.
from alloy-ui.
NIT PICKING ALERT
The current indentation is somewhat maddening, and note the function (Y)
vs function(Y)
.
YUI().use(
'node',
'transition',
function (Y) {
Y.one('.aui-btn').on(
'click', function() {
this.transition(
{
width: '500px'
}
);
}
);
}
);
YUI().use(
'aui-carousel',
function(Y) {
new Y.Carousel(
{
contentBox: '#myCarousel',
}
).render();
}
);
from alloy-ui.
Related Issues (20)
- Is it possible to set first day of weekview scheduler? HOT 1
- Safari Mac HOT 2
- Show More in Scheduler ui HOT 1
- How to open the loader in popup over button "Edit" on Schedule HOT 1
- In Time box my schedule event is not aligned its go to other time Box HOT 1
- How to set custom time view on SchedulerWeekView HOT 1
- Diagram builder connector overrides delete and backspace actions for other fields HOT 1
- Show weeknumber in datepicker? HOT 1
- Tooltip is shown right after init HOT 1
- Found a bug in SchedulerWeekView HOT 1
- Multiple day selection in week view HOT 1
- DatePicker doesn't show a message informing that the date pasted in the field is invalid. Instead it sets the current date HOT 3
- Migrate alloyui.com to GitHub pages HOT 13
- Displaying error container prevent fireing other events HOT 1
- Validation for fields Does not work properly. HOT 1
- Pagination does not automatically fold excessive page Numbers like I have 100 pages or more HOT 1
- Why is JavaScript preventing a <form> from work? HOT 1
- Link element is including obsolete charset attribute HOT 1
- Form doesn't validate and submit on a required hidden input HOT 2
- Test Issue: ignore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alloy-ui.