jquery-boilerplate / jquery-patterns

A variety of jQuery plugin patterns for jump starting your plugin development
1.59k stars 242 forks source link

"use strict" #11

Closed zenorocha closed 6 years ago

zenorocha commented 12 years ago

Should we use it on these patterns?

yckart commented 11 years ago

I want to say yes! But, what is about those people who dont know about the "disadvantages"?!

addyosmani commented 11 years ago

+@sindresorhus

I'm tempted to say we should use it on these patterns and make a note about it in the readme/docs. An extract derived from John Resig's post about use strict:

Strict Mode is a feature in ECMAScript 5 that allows you to place a program, or a function, in a "strict" operating context. This strict context prevents certain actions from being taken and throws more exceptions.

Strict mode helps out in a couple ways:

yckart commented 11 years ago

Maybe the document from MDN about "strict mode" is a better point to read for unsuspecting.

addyosmani commented 11 years ago

or that ^. I'd be down with either.

sindresorhus commented 11 years ago

Yes!

There are no downsides if you know what you're doing. For everyone else there's documentation, preferably the MDN one.

addyosmani commented 11 years ago

Let's get this in sometime soon.