-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
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.