improve es-modules documentation (was: nyc ignores non-strict mode js files)
See original GitHub issueDescription
JS files that are not in strict mode ('use strict';) are ignored by nyc and never show up in the report, even with --all and explicit inclusion --include=non-strict-file.js. When I enable strict mode on the same file, it gets included.
I could not find any documentation that states this requirement or an option to control this.
Expected Behavior
Coverage is calculated for non strict mode files as well.
Observed Behavior
Coverage is not done for non-strict mode javascript source files.
Troubleshooting steps
- still occurring when I put
cache: falsein my nyc config
Environment Information
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 505.48 MB / 16.00 GB
Binaries:
Node: 12.12.0 - /usr/local/bin/node
npm: 6.12.0 - /usr/local/bin/npm
npmPackages:
nyc: ^14.1.1 => 14.1.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
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 >Node JS avoid laboriously adding "use strict" to all my files
use-strict-cli is a Node.js command line tool for adding/removing "use strict" statements within files found in given directories.
Read more >ECMAScript 2015 Language Specification – ECMA-262 6th ...
A complete ECMAScript program may be composed of both strict mode and non-strict mode ECMAScript source text units. In this case, strict mode...
Read more >Overview - TypeScript
TypeScript 3.5 improves on 3.4's --incremental build mode, by saving information ... See Type checking JavaScript Files documentation for more details.
Read more >@babel/plugin-transform-strict-mode | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It seems the documentation should be improved - see above. I updated the title.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.