You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
9
9
### Added
10
10
-[`dynamic-import-chunkname`]: add `allowEmpty` option to allow empty leading comments ([#2942], thanks [@JiangWeixian])
11
11
-[`dynamic-import-chunkname`]: Allow empty chunk name when webpackMode: 'eager' is set; add suggestions to remove name in eager mode ([#3004], thanks [@amsardesai])
Copy file name to clipboardExpand all lines: docs/rules/no-unused-modules.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,9 @@ This rule takes the following option:
29
29
30
30
-**`missingExports`**: if `true`, files without any exports are reported (defaults to `false`)
31
31
-**`unusedExports`**: if `true`, exports without any static usage within other modules are reported (defaults to `false`)
32
-
-`src`: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided
33
-
-`ignoreExports`: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package)
32
+
-**`ignoreUnusedTypeExports`**: if `true`, TypeScript type exports without any static usage within other modules are reported (defaults to `false` and has no effect unless `unusedExports` is `true`)
33
+
-**`src`**: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided
34
+
-**`ignoreExports`**: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package)
34
35
35
36
### Example for missing exports
36
37
@@ -116,6 +117,16 @@ export function doAnything() {
116
117
exportdefault5// will not be reported
117
118
```
118
119
120
+
### Unused exports with `ignoreUnusedTypeExports` set to `true`
121
+
122
+
The following will not be reported:
123
+
124
+
```ts
125
+
exporttypeFoo= {}; // will not be reported
126
+
exportinterfaceFoo = {}; // will not be reported
127
+
exportenumFoo {}; // will not be reported
128
+
```
129
+
119
130
#### Important Note
120
131
121
132
Exports from files listed as a main file (`main`, `browser`, or `bin` fields in `package.json`) will be ignored by default. This only applies if the `package.json` is not set to `private: true`
0 commit comments