Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] no-commonjs: Allow expressionless template literals #1958

Merged
merged 1 commit into from
Jan 26, 2021
Merged

[New] no-commonjs: Allow expressionless template literals #1958

merged 1 commit into from
Jan 26, 2021

Conversation

FloEdelmann
Copy link
Contributor

@FloEdelmann FloEdelmann commented Dec 1, 2020

Detect require calls with expressionless template literals: require(`x`)

Those are also not detected by the no-dynamic-require rule:

https://github.com/benmosher/eslint-plugin-import/blob/bdda0691cf703f13f6472b6e824d5168343dd52e/src/rules/no-dynamic-require.js#L11-L14

@coveralls
Copy link

coveralls commented Dec 1, 2020

Coverage Status

Coverage decreased (-0.0009%) to 97.867% when pulling 4c82ad0 on FloEdelmann:patch-1 into 802ce7d on benmosher:master.

@FloEdelmann

This comment has been minimized.

@ljharb ljharb changed the title Support (expressionless) template literals in no-commonjs [New] no-commonjs: Allow expressionless template literals Jan 25, 2021
@ljharb
Copy link
Member

ljharb commented Jan 25, 2021

no-dynamic-require seems to already pass with no changes.

@ljharb ljharb merged commit 4c82ad0 into import-js:master Jan 26, 2021
@FloEdelmann FloEdelmann deleted the patch-1 branch January 26, 2021 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants