On Wed, Oct 18, 2017 at 07:22:09PM -0700, Daniel Veditz wrote:
On Wed, Oct 18, 2017 at 4:51 AM, Mark Banner <mban...@mozilla.com> wrote:
I did an experiment, and the only way I got an error out was to have
"javascript.options.strict" on and
Why isn't it a code-style/review requirement that our own internal JS
include "use strict"? As a quick check I found 659 .jsm files in our tree
and only about 500 with "use strict". A quick skim of .js files shows a
similar ratio. It's not terrible (call it a "B" grade?) but we could do
better.
It is, in some areas, depending on their ESLint rules:
http://searchfox.org/mozilla-central/search?q=%22strict%22&case=true®exp=false&path=eslint
And it's automatically enforced everywhere in JSM and JS component code.
To date, we've mostly avoided enforcing it for browser window code to
avoid breaking extensions that used arguments.callee.caller (despite my
endorsement for breaking those extensions...), but that's not really an
issue anymore, so we should probably move towards enforcing it for all
chrome JS.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform