question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exports assignments not being picked up by no-unused-modules

See original GitHub issue

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 and no-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:

const eslintConfig = {
  rules: {
    "import/no-unused-modules": ["error", { missingExports: true }],
  },
};

export = eslintConfig;

no-unused-modules with missingExports set to true will claim index.ts does not export a module.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ProdigySimcommented, Apr 7, 2022
2reactions
ProdigySimcommented, Apr 7, 2022

@ljharb actually, I think none of the TypeScript tests in named.js are wired up to actually run… it looks like the tests are collected in invalid/valid arrays but they are not run at all. So I was accidentally not running my test.

I pushed up another commit to run the tests and now my test case fails + another TS test is actually failing already:

https://github.com/import-js/eslint-plugin-import/commit/1e4d413f7ce74345e424c74196f54c35d7dcde53

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot SIS grade export - Classroom Help
Important: The SIS grade export feature is available for the these SaaS partners: ... What if my assignment ends up in the wrong...
Read more >
Tips for New Importers and Exporters
To assist you, we offer the following tips for new importers and exporters. What kind of license is required to import merchandise into...
Read more >
Export Content search results - Microsoft Purview (compliance)
To export search results, you have to be assigned the Export ... which means they're collected from the original content locations and then ......
Read more >
15 CFR 740.9 -- Temporary imports, exports, reexports ... - eCFR
Commodities to be inspected, tested, calibrated, or repaired abroad may be exported, reexported, and transferred (in-country) under this paragraph (a)(6) to all ...
Read more >
Migrating projects using file exports - GitLab Docs
Set up project to migrate using file exports. Before you can import or export a project and its data, you must set it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found