Skip to content

Conversation

vikr01
Copy link
Contributor

@vikr01 vikr01 commented Oct 26, 2018

Requested in #700.

Adds an option esmodule to no-dynamic-require that defaults to false.

I think it'd be nice if no-dynamic-require was renamed to something like no-nonliteral-import, since it is confusing with import() being called "dynamic import".

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

5 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

coveralls commented Oct 26, 2018

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 97a7a44 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 97.365% when pulling 065f3f1 on vikr01:feature/no-nonliteral-import into db471a8 on benmosher:master.

@ljharb ljharb changed the title Add option esmodule to no-dynamic-require [New] no-dynamic-require: add option esmodule Aug 5, 2021
@ljharb ljharb merged commit 7163824 into import-js:master Aug 5, 2021
@vikr01 vikr01 deleted the feature/no-nonliteral-import branch August 5, 2021 20:49
@sindresorhus
Copy link

This pull request is missing documentation updates.

@ljharb
Copy link
Member

ljharb commented Aug 9, 2021

Thanks, you’re right. @vikr01 mind sending a PR for that?

@dasa
Copy link

dasa commented Sep 9, 2021

I'm unable to get this working in TypeScript. The new tests all include parser: require.resolve('babel-eslint'). Is this expected?

@ljharb
Copy link
Member

ljharb commented Sep 9, 2021

@dasa want to open a PR that duplicates those test cases, but with the TS parser?

@dasa
Copy link

dasa commented Apr 26, 2022

This is working in TypesScript now, but the esmodule option is missing from the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants