question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'use strict' in all of the files

See original GitHub issue

Moving conversation from #341.

I am not against using 'use strict', but if we do so, I’d like to consider switching to using strict-standard instead of standard. Or possibly eslint + eslint-config-standard + some strict config (the reasoning being that it’s more likely that a given editor will have eslint support available more readily than standard - this may just mean that we keep some form of standard for npm test, and just add an .eslintrc to the project).

See also:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ferosscommented, Apr 24, 2016

Ahh, you can also just add eslint-config-standard as a dependency to package.json, and add an .eslintrc:

{
  "extends": "standard"
}
0reactions
develarcommented, Apr 27, 2016

The rest we should disable.

The problem that we cannot customize rules. As @feross suggested, in my upcoming PR I use eslint-config-standard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I 'use strict' for every single javascript function I write?
First, all of your code absolutely should be run in strict mode. Core modern javascript functionality is changed (see .call() and apply()) or ......
Read more >
Strict mode - JavaScript - MDN Web Docs
JavaScript's strict mode is a way to opt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode".
Read more >
JavaScript "use strict" - W3Schools
You can use strict mode in all your programs. It helps you to write cleaner code, like preventing you from using undeclared variables....
Read more >
The modern mode, "use strict"
The directive looks like a string: "use strict" or 'use strict' . When it is located at the top of a script, the...
Read more >
What does `"use strict"` do in JavaScript, and what is ... - Sentry
Enable strict mode globally by adding the string "use strict" as the first statement in your file. All subsequent code in the script...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found