chore: enforce file extensions on imports (#6202)

* chore: enforce file extensions on imports

To make our output agnostic it should include file extensions in the
output, as per the ESM spec. It's a bit odd for Node packages but makes
it easier to publish a browser build.
This commit is contained in:
Jack Franklin
2020-07-13 10:22:26 +01:00
committed by GitHub
parent 8d6e0d8a79
commit ffec2475d0
79 changed files with 356 additions and 306 deletions

13
test/.eslintrc.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = {
rules: {
'no-restricted-imports': [
'error',
{
/** The mocha tests run on the compiled output in the /lib directory
* so we should avoid importing from src.
*/
patterns: ['*src*'],
},
],
},
};