-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Exports assignments not being picked up by no-unused-modules #1984
Comments
I think #1974 may have fixed this, but is not yet released. |
Interesting, but I'm not sure it's the same. I looked through the PR, but I couldn't find anything regarding exports in there, only regarding imports. Either way, I'll make sure to monitor the status of this. Thanks again 🙂 |
It would be great if you wanted to create a PR with test cases - that would answer it immediately :-) |
I think this may be fixed, I tried to create a test case directly for it and it passes: I am still having issues with exports of this style in my project, but it may be due to misconfiguration or outdated versions. I'll try to update here if I fix it. |
Thanks! @paleite can you confirm? I'll reopen if it's still a problem for you. |
@ljharb actually, I think none of the TypeScript tests in I pushed up another commit to run the tests and now my test case fails + another TS test is actually failing already: |
Opened a PR to run the current tests: #2427 |
First of all, thanks for a great plugin! This has aided our team and saved us HOURS of debugging and it makes our imports and exports really consistent 🙂
I'm using export assignments (
export =
, see https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require ) in some of my TypeScript modules andno-unused-modules
claims the modules aren't exporting anything.Background, I'm writing my ESLint config in TypeScript, and want the compiled TypeScript code to say
module.exports = eslintConfig
My ESLint config for the rule looks like this:
"import/no-unused-modules": ["error", { missingExports: true }]
And the module looks like this:
index.ts
:no-unused-modules
withmissingExports
set totrue
will claimindex.ts
does not export a module.The text was updated successfully, but these errors were encountered: